Database error root cause positioning method, device, equipment and medium

CN122963836APending Publication Date: 2026-10-23CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510502658.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]然而,受日志量巨大、分析成本高,微服务架构下日志分散难整体分析,日志与调用链无关联,日志无法定义业务异常评估影响等因素的影响,现有技术在访问出错时定位原因困难,用户体验和业务受损,从而存在定位效率差且定位准确率低的技术问题

Benefits of technology

[0053]本申请提供的数据库错误的根因定位方法、装置、设备及介质,首先,通过获取数据库访问错误数据,包括数据库类型和错误信息,为后续分析提供了基础数据支持。接着,确定每种数据库类型对应的第一错误占比,有助于了解不同数据库的错误分布情况。然后,进一步分析每种数据库类型中,每种结构化查询语句类型对应的第二错误占比,从而更精确地定位错误来源。此外,获取预设的错误信息类型,并对错误信息进行聚类处理,得到每种错误信息类型对应的第三错误占比,有助于识别出常见的错误模式。最后,综合第一、第二和第三错误占比,能够准确确定数据库访问错误数据的根因,为快速修复错误、提升数据库稳定性和性能提供了有力支持,从而实现了提高根因定位准确率以及定位效率的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963836A_ABST
    Figure CN122963836A_ABST
Patent Text Reader

Abstract

The application provides a database error root cause positioning method, device, equipment and medium. The method comprises the following steps: acquiring database access error data; wherein the database access error data comprises a database type and error information; determining a first error proportion corresponding to each database type according to the database access error data; determining a second error proportion corresponding to each structured query statement type in each database type according to the error information; acquiring a preset error information type; performing error clustering processing on the error information corresponding to each structured query statement type according to the error information type, to obtain a third error proportion corresponding to each error information type; and determining the root cause of the database access error data according to the first error proportion, the second error proportion and the third error proportion, so as to improve the root cause positioning accuracy and positioning efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, device and medium for root cause localization of database errors. Background Technology

[0002] Database systems, as the storage, processing, and management systems for core data assets in modern information technology (IT) systems, are crucial components. Data generated by IT systems needs to be stored in databases with a specific structure. Data mining, modeling, and analysis also require data to be retrieved from databases. The design and application of database systems have become increasingly complex and massive along with changes in IT system software architecture, increased IT system complexity, and the diversification of IT services. This presents unprecedented challenges to database operation and maintenance. Therefore, developing more efficient and accurate root cause localization methods for database errors has become a promising direction.

[0003] In existing technologies, the root cause localization method for database errors is mainly based on database access error logs, and the cause of the error is analyzed based on the exception logs.

[0004] However, due to factors such as the huge volume of logs, high analysis costs, the difficulty of overall analysis of scattered logs under microservice architecture, the lack of correlation between logs and call chains, and the inability to define the impact of business anomalies, existing technologies have difficulty locating the cause when access errors occur, resulting in damage to user experience and business, thus exhibiting technical problems of poor location efficiency and low location accuracy. Summary of the Invention

[0005] The method, apparatus, equipment, and medium for locating the root cause of database errors provided in this application are intended to improve the accuracy and efficiency of root cause localization.

[0006] Firstly, this application provides a method for root cause localization of database errors, including:

[0007] Retrieve database access error data; the database access error data includes the database type and error message;

[0008] Based on the database access error data, determine the percentage of the first error for each database type;

[0009] Based on the error information, determine the percentage of the second error for each type of structured query statement in each database type;

[0010] Retrieve the preset error message types;

[0011] Based on the error message type, error clustering is performed on the error messages corresponding to each type of structured statement to obtain the third error percentage for each error message type;

[0012] Based on the percentages of the first, second, and third errors, determine the root cause of database access errors.

[0013] In one possible implementation, obtaining database access error data includes:

[0014] Based on application performance management probes, database access error data of multiple database ports are monitored; among them, the application performance management probes are pre-adapted to the database drivers of multiple database ports.

[0015] In one possible implementation, based on database access error data, determining the percentage of first errors corresponding to each database type includes:

[0016] Bind the database type to the corresponding database instance;

[0017] At the database instance level, based on time series, calculate the number of database accesses, the number of errors, and the error rate per minute for each database type.

[0018] Using a clustering algorithm, the percentage of first errors for each database type is calculated based on the number of database accesses per minute, the number of errors, and the error rate corresponding to each database type.

[0019] In one possible implementation, based on the error information, the percentage of second errors corresponding to each structured query statement type in each database type is determined, including:

[0020] Based on the error message, obtain the corresponding structured query statement for each database type;

[0021] Associate structured query statements with database access error data;

[0022] The associated structured query statements are clustered, and based on the clustering results, the proportion of the second error for each type of structured query statement in each database type is determined.

[0023] In one possible implementation, the error message types include a first type of error message returned by the database system and a second type of error message with randomness.

[0024] In one possible implementation, error clustering is performed on the error messages corresponding to each structured statement type based on the error message type to obtain the third error percentage corresponding to each error message type, including:

[0025] Based on the error message type, the error messages corresponding to each type of structured statement are pre-classified to obtain the pre-classification results;

[0026] Using preset classification rules and / or artificial intelligence models, error clustering is performed on the error information corresponding to the pre-classification results to obtain the third error proportion corresponding to each error information type.

[0027] Secondly, this application provides a root cause localization device for database errors, comprising:

[0028] The first acquisition module is used to acquire database access error data; wherein, the database access error data includes database type and error information;

[0029] The first determination module is used to determine the percentage of first errors for each database type based on the database access error data.

[0030] The second determination module is used to determine the proportion of the second error for each type of structured query statement in each type of database based on the error information.

[0031] The second acquisition module is used to acquire preset error message types;

[0032] The third determination module is used to perform error clustering processing on the error information corresponding to each type of structured statement based on the error information type, so as to obtain the third error proportion corresponding to each error information type;

[0033] The fourth determination module is used to determine the root cause of database access errors based on the first error percentage, the second error percentage, and the third error percentage.

[0034] In one possible implementation, the first acquisition module is further configured to:

[0035] Based on application performance management probes, database access error data of multiple database ports are monitored; among them, the application performance management probes are pre-adapted to the database drivers of multiple database ports.

[0036] In one possible implementation, the first determining module is further configured to:

[0037] Bind the database type to the corresponding database instance;

[0038] At the database instance level, based on time series, calculate the number of database accesses, the number of errors, and the error rate per minute for each database type.

[0039] Using a clustering algorithm, the percentage of first errors for each database type is calculated based on the number of database accesses per minute, the number of errors, and the error rate corresponding to each database type.

[0040] In one possible implementation, the second determining module is further configured to:

[0041] Based on the error message, obtain the corresponding structured query statement for each database type;

[0042] Associate structured query statements with database access error data;

[0043] The associated structured query statements are clustered, and based on the clustering results, the proportion of the second error for each type of structured query statement in each database type is determined.

[0044] In one possible implementation, the second acquisition module is also used for error information types, including a first type of error information returned by the database system and a second type of error information with randomness.

[0045] In one possible implementation, the third determining module is further configured to:

[0046] Based on the error message type, the error messages corresponding to each type of structured statement are pre-classified to obtain the pre-classification results;

[0047] Using preset classification rules and / or artificial intelligence models, error clustering is performed on the error information corresponding to the pre-classification results to obtain the third error proportion corresponding to each error information type.

[0048] Thirdly, this application provides a root cause localization device for database errors, including: a memory and a processor;

[0049] The memory stores the instructions that the computer executes;

[0050] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0051] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0052] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0053] The database error root cause localization method, apparatus, device, and medium provided in this application first acquire database access error data, including database type and error information, providing basic data support for subsequent analysis. Next, determining the first error percentage corresponding to each database type helps to understand the error distribution across different databases. Then, further analysis of the second error percentage corresponding to each structured query statement type within each database type allows for more precise error localization. Furthermore, acquiring preset error information types and performing clustering processing on the error information yields a third error percentage corresponding to each error information type, which helps identify common error patterns. Finally, combining the first, second, and third error percentages accurately determines the root cause of database access errors, providing strong support for rapid error repair and improved database stability and performance, thereby achieving the technical effect of improving the accuracy and efficiency of root cause localization. Attached Figure Description

[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0055] Figure 1 This application provides a schematic diagram of an application data processing system architecture.

[0056] Figure 2 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 1 ;

[0057] Figure 3 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 2 ;

[0058] Figure 4 A statistical chart showing the number of errors in the database instance provided in this application embodiment;

[0059] Figure 5 A database access error trend analysis chart provided for embodiments of this application;

[0060] Figure 6 A diagram showing the list of database access error types provided in this application embodiment;

[0061] Figure 7 The impact analysis results diagram for each error type when encountering database access errors is provided in the embodiments of this application;

[0062] Figure 8 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 3 ;

[0063] Figure 9 A structured query statement analysis diagram for database access errors provided in this application embodiment;

[0064] Figure 10 A root cause analysis diagram of database access errors provided in the embodiments of this application;

[0065] Figure 11 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 4 ;

[0066] Figure 12 A schematic diagram of the structure of the root cause localization device for database errors provided in this application embodiment;

[0067] Figure 13 A schematic diagram of the structure of the root cause localization device for database errors provided in this application embodiment.

[0068] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0070] Due to factors such as the massive volume of logs, high analysis costs, the difficulty in analyzing scattered logs in microservice architectures, the lack of correlation between logs and call chains, and the inability to define the impact of business anomalies, existing technologies face difficulties in locating the cause when access errors occur, resulting in damage to user experience and business operations. Consequently, there are technical problems such as poor location efficiency and low location accuracy.

[0071] To address the aforementioned issues, this application provides a method, apparatus, device, and medium for root cause localization of database errors. First, it acquires database access error data, including database type and error information, providing foundational data support for subsequent analysis. Next, it determines the error percentage for each database type, helping to understand the error distribution across different databases. Then, it further analyzes the error percentage for each type of structured query statement within each database type, thereby more accurately locating the error source. Furthermore, it acquires preset error information types and performs clustering processing on the error information to obtain the error percentage for each type, helping to identify common error patterns. Finally, by combining the three error percentages, it can accurately determine the root cause of database access errors, providing strong support for rapid error repair and improving database stability and performance, thus achieving the technical effect of improving the accuracy and efficiency of root cause localization.

[0072] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0073] Figure 1 This is a schematic diagram of an application data processing system architecture provided in an embodiment of this application. The application data processing system is a computer device. Figure 1 As shown, the above architecture includes at least one of a data acquisition device 101, a processing device 102, and a display device 103.

[0074] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the architecture of the application data processing system. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.

[0075] In the specific implementation process, the data acquisition device 101 may include an input / output interface or a communication interface, and the data acquisition device 101 can be connected to the processing device through the input / output interface or the communication interface.

[0076] The processing device 102 first collects database access error data, covering database types and specific error information, providing a data foundation for subsequent analysis. Then, by statistically analyzing the error percentage for each database type, it gains a preliminary understanding of the overall error distribution. Further, for each database type, it conducts in-depth analysis of the error percentage for structured query statements to refine the error sources. In addition, it introduces preset error message types and performs clustering of error messages to reveal common error patterns. Finally, by synthesizing the above multi-level and multi-dimensional error data, it determines the root cause of database access errors, providing guidance for quickly and effectively repairing errors.

[0077] The display device 103 can also be a touch screen or the screen of a terminal device, used to receive user commands while displaying the above-mentioned content, so as to realize interaction with the user.

[0078] It should be understood that the aforementioned processing device can be implemented by a processor reading instructions from memory and executing those instructions, or it can be implemented by a chip circuit.

[0079] Furthermore, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0080] Figure 2 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the root cause localization method for database errors provided in this embodiment includes:

[0081] S201. Obtain database access error data; wherein, the database access error data includes database type and error information.

[0082] The system can use an Application Performance Management probe (APM probe) to obtain database access error data, including database type and error information, from the target database system vendor.

[0083] S202. Based on the database access error data, determine the percentage of the first error for each database type.

[0084] After identifying a database type error, the database access error data is analyzed to determine the percentage of the first error for each database type.

[0085] S203. Based on the error information, determine the percentage of the second error for each type of structured query statement in each database type.

[0086] In this embodiment, the structured query statement type refers to the SQL statement type.

[0087] Based on the error information in the database access error data, the error types are classified and statistically summarized, and the proportion of the second error corresponding to each type of structured query statement in each database type is calculated.

[0088] S204. Obtain the preset error message type.

[0089] In actual database access errors, error messages may contain various patterns and characteristics. In order to more effectively aggregate and analyze error messages, it is necessary to pre-define some error message types. Therefore, by obtaining the preset error message types, a clear standard and direction are provided for subsequent classification and aggregation of error messages, making the analysis process more standardized and targeted.

[0090] In one possible implementation, the error message types include a first type of error message returned by the database system and a second type of error message with randomness.

[0091] S205. Based on the error message type, perform error clustering processing on the error messages corresponding to each type of structured statement to obtain the third error percentage corresponding to each error message type.

[0092] After obtaining the preset error message type, based on the SQL statement obtained from the analysis of specific database error types in S204, analyze the error message of the database error thrown during the execution of the SQL. Since the error message often contains variables, it is necessary to perform error clustering on the error message corresponding to each type of structured statement, and obtain the third error percentage corresponding to each error message type through aggregation analysis.

[0093] S206. Determine the root cause of database access errors based on the proportion of the first error, the proportion of the second error, and the proportion of the third error.

[0094] The first error percentage reflects the distribution of different database types in the overall errors. The second error percentage reflects the degree to which each type of structured query statement causes errors in the corresponding database type. The third error percentage reveals the proportion of different error message types in specific SQL statement errors. By comprehensively considering these three percentages, combined with factors such as the frequency, trend, scope of impact, and correlation with SQL statements and error messages, the root cause of database access errors can be determined comprehensively and accurately.

[0095] This application provides a method for root cause localization of database errors. First, it acquires database access error data, including database type and error information, providing foundational data support for subsequent analysis. Next, it determines the first error percentage for each database type, helping to understand the error distribution across different databases. Then, it further analyzes the second error percentage for each type of structured query statement within each database type, thereby more accurately pinpointing the error source. Furthermore, it acquires preset error information types and performs clustering processing on the error information to obtain a third error percentage for each error information type, helping to identify common error patterns. Finally, by combining the first, second, and third error percentages, the root cause of database access errors can be accurately determined, providing strong support for rapid error repair and improving database stability and performance, thus achieving the technical effect of improving the accuracy and efficiency of root cause localization.

[0096] Figure 3 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 2 ,like Figure 3 As shown, this embodiment, based on the above embodiments, provides a detailed explanation of the process for determining the first error percentage, including:

[0097] S301. Based on application performance management probes, monitor database access error data for multiple database ports.

[0098] In this embodiment, the application performance management probe is used to pre-adapt the database drivers for multiple database ports.

[0099] With the help of the Application Performance Management (APM) probe, which is pre-adapted to the database drivers of multiple database ports, it can automatically inject, intercept exception handling, and obtain method parameters, thereby achieving comprehensive monitoring of database access error data of multiple database ports and obtaining database access error data including database type and error information.

[0100] S302. Bind the database type to the corresponding database instance.

[0101] After obtaining database access error data, in order to facilitate subsequent statistics and analysis, it is necessary to bind the database type with the corresponding database instance. The purpose of this step is to establish the association between the database type and the specific database instance, so that the specific database instance can be accurately located in the subsequent error statistics and analysis.

[0102] S303. At the level of database instances, calculate the number of database accesses, the number of errors, and the error rate per minute for each database type based on the time series.

[0103] Figure 4 A statistical chart showing the number of errors in the database instance provided in this application embodiment, such as... Figure 4 As shown, after binding the database type to the database instance, the database access statistics are performed according to the time series with the database instance as the dimension. First, the number of errors is counted for the database instance.

[0104] Figure 5 The database access error trend analysis chart provided in the embodiments of this application is as follows: Figure 5 As shown, by performing trend analysis on database access errors for selected database instances, error-related metrics include: number of requests, number of errors, and error rate; the number of database accesses, number of errors, and error rate for each database type are calculated per minute.

[0105] S304. Using a clustering algorithm, calculate the percentage of first errors for each database type based on the number of database accesses per minute, the number of errors, and the error rate corresponding to the database type.

[0106] Figure 6 A diagram illustrating the list of database access error types provided in this application embodiment is shown below. Figure 6 As shown, based on the list of database access error types, statistical data such as the number of database accesses per minute, the number of errors, and the error rate for each database type can be obtained. Then, a clustering algorithm is used to process these data. Through the classification and calculation of the clustering algorithm, the percentage of the first error for each database type can be obtained.

[0107] Figure 7 The impact analysis results diagram for each error type when encountering database access errors provided in the embodiments of this application is shown below. Figure 7 As shown, the percentage of first errors for each database type can be obtained; among them, Figure 7 'a' is a graph illustrating the impact of each error type on users, along with a corresponding graph showing the impact of database access errors on users. Figure 7 b is a diagram illustrating the impact of each error type on business products.

[0108] It is important to note that Figures 4 to 7 This is for reference only and is not intended as an improvement, nor does it affect the scope of protection of the embodiments of this application.

[0109] The database error root cause localization method provided in this application embodiment monitors database access error data based on application performance management probes adapted to multiple database port drivers. This allows for comprehensive and accurate acquisition of access error information from multi-port databases, providing fundamental data support for subsequent analysis. Binding database types to corresponding database instances makes data management more organized and targeted, facilitating in-depth analysis at the instance level. At the database instance level, the method calculates the number of database accesses, errors, and error rates per minute for each database type based on time series data, achieving detailed quantitative statistics on database access and clearly presenting the database access status. By using a clustering algorithm to calculate the percentage of first errors for each database type based on the aforementioned statistical data, the method efficiently and accurately summarizes the error distribution of different database types, providing key indicators for evaluating database performance and locating the root cause of problems. This helps in taking targeted optimization measures to improve the overall performance and stability of the database, thereby achieving the technical effect of improving the accuracy and reliability of database error root cause localization.

[0110] Figure 8 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 3 ,like Figure 8 As shown, this embodiment, based on the above embodiments, provides a detailed explanation of the process for determining the second error percentage, including:

[0111] S801. Based on the error message, obtain the corresponding structured query statement for each database type.

[0112] Figure 9 A structured query statement analysis diagram for database access errors provided in this application embodiment, such as... Figure 9 As shown, every time a database anomaly occurs, the APM probe will acquire SQL statements. By aggregating and analyzing multiple SQL statements, the distribution of SQL statements can be obtained.

[0113] To determine the proportion of the second type of error, we need to start with the database access error data and further mine the structured query statements corresponding to each database type based on the error information. This is because when a database access error occurs, the error information is often closely related to the specific SQL statement being executed. By analyzing the error information, we can locate the specific SQL statement, thus laying the foundation for subsequent analysis of error situations of different SQL statement types.

[0114] It is important to note that Figure 9 This is for reference only and is not intended as an improvement, nor does it affect the scope of protection of the embodiments of this application.

[0115] S802. Associate the structured query statement with database access error data.

[0116] Figure 10 The database access error root cause analysis diagram provided in this application embodiment requires, after obtaining the structured query statements corresponding to each database type, to associate these SQL statements with the original database access error data to construct a complete data chain, so that each SQL statement can correspond to the data that caused it. Figure 10 The error messages, error types, database instances, and other detailed information displayed provide a more comprehensive understanding of how each SQL statement behaves incorrectly during database access.

[0117] It is important to note that Figure 10 This is for reference only and is not intended as an improvement, nor does it affect the scope of protection of the embodiments of this application.

[0118] S803. Cluster the associated structured query statements and, based on the clustering results, determine the proportion of the second error for each type of structured query statement in each database type.

[0119] Clustering the associated structured query statements is based on the empirical principle that the error types of SQL parameters of the same type are usually consistent. Similar SQL statements are grouped together by clustering algorithms. Based on the clustering results, the number of database access errors caused by each type of structured query statement in each database type is counted, and its proportion in all errors of that database type is calculated, thus obtaining the second error proportion corresponding to each type of structured query statement.

[0120] The database error root cause localization method provided in this application obtains the structured query statements corresponding to each database type based on error information, which can accurately locate the specific query statement that caused the error, providing key clues for subsequent analysis. It associates the structured query statements with database access error data, establishing a direct link between the query statement and the error, making the tracing of error causes more targeted and helping to deeply understand the context in which the error occurred. The method performs clustering processing on the associated structured query statements and determines the proportion of the second error corresponding to each structured query statement type in each database type based on the clustering results. This achieves the classification, statistics, and analysis of query statement errors, clearly presenting the error distribution characteristics of different query statement types, providing a strong basis for evaluating the rationality of query statements and optimizing query statement structures, thereby achieving the technical effect of improving the accuracy and reliability of database error root cause localization.

[0121] Figure 11 A flowchart illustrating the root cause localization method for database errors provided in this application embodiment. Figure 4 ,like Figure 11As shown, this embodiment, based on the above embodiments, provides a detailed explanation of the process for determining the third error percentage, including:

[0122] S1101. Based on the error message type, perform pre-classification processing on the error messages corresponding to each type of structured statement to obtain the pre-classification results.

[0123] To determine the proportion of the third type of error, it is necessary to first classify the error information associated with each type of structured query statement based on the error information type. Since different structured query statements may produce similar types of error information, such as syntax errors and connection errors, pre-classification can preliminarily divide these error information according to their inherent characteristics to form a pre-classification result.

[0124] S1102. Using preset classification rules and / or artificial intelligence models, perform error clustering processing on the error information corresponding to the pre-classification results to obtain the third error proportion corresponding to each error information type.

[0125] After obtaining the pre-classification results, the error messages are diverse and fall into two types:

[0126] Type 1: Returned by the database system, defined in the database driver, and follows certain rules. Examples include: "ORA-0001: Dup_val_on_index", "ORA-6533: Subscript-beyond-count", and "ORA-00019: Maximum number of session licenses exceeded".

[0127] Type 2: User-defined errors, or database-driven errors, are random and have no rules. Therefore, error messages need to be segmented, clustered, and have variables identified based on rules or artificial intelligence (AI) models.

[0128] Using pre-defined classification rules and / or artificial intelligence models, the error information in the pre-classification results is further clustered. Through precise matching of classification rules and intelligent learning of artificial intelligence models, similar or related error information is grouped into one category. Based on this, the number of occurrences of each type of error information in the overall error is counted, and its proportion in all errors is calculated, thereby obtaining the third error proportion corresponding to each type of error information.

[0129] The database error root cause localization method provided in this application first pre-classifies the error information corresponding to each type of structured statement based on the error information type, so as to initially organize the error information and lay the foundation for subsequent accurate processing; secondly, it uses preset classification rules and / or artificial intelligence models to further cluster the errors in the pre-classification results to obtain the third error proportion corresponding to each error information type, which can more accurately summarize the error pattern and clearly present the distribution of different error information types, providing key data support for database error root cause localization, helping to quickly locate and resolve database errors, and achieving the technical effect of improving the accuracy and reliability of database error root cause localization.

[0130] Figure 12 This is a schematic diagram of the structure of a root cause localization device for database errors provided in an embodiment of this application. The device in this embodiment can be in the form of software and / or hardware. For example... Figure 12 As shown in the embodiment of this application, the database error root cause localization device 1200 includes: a first acquisition module 1201, a first determination module 1202, a second determination module 1203, a second acquisition module 1204, a third determination module 1205, and a fourth determination module 1206.

[0131] The first acquisition module 1201 is used to acquire database access error data; wherein, the database access error data includes database type and error information;

[0132] The first determining module 1202 is used to determine the percentage of first errors for each database type based on the database access error data.

[0133] The second determining module 1203 is used to determine the proportion of the second error for each type of structured query statement in each type of database based on the error information.

[0134] The second acquisition module 1204 is used to acquire preset error information types;

[0135] The third determination module 1205 is used to perform error clustering processing on the error information corresponding to each type of structured statement according to the error information type, so as to obtain the third error proportion corresponding to each error information type;

[0136] The fourth determination module 1206 is used to determine the root cause of database access error data based on the first error ratio, the second error ratio, and the third error ratio.

[0137] In one possible implementation, the first acquisition module 1201 is further configured to:

[0138] Based on application performance management probes, database access error data of multiple database ports are monitored; among them, the application performance management probes are pre-adapted to the database drivers of multiple database ports.

[0139] In one possible implementation, the first determining module 1202 is further configured to:

[0140] Bind the database type to the corresponding database instance;

[0141] At the database instance level, based on time series, calculate the number of database accesses, the number of errors, and the error rate per minute for each database type.

[0142] Using a clustering algorithm, the percentage of first errors for each database type is calculated based on the number of database accesses per minute, the number of errors, and the error rate corresponding to each database type.

[0143] In one possible implementation, the second determining module 1203 is further configured to:

[0144] Based on the error message, obtain the corresponding structured query statement for each database type;

[0145] Associate structured query statements with database access error data;

[0146] The associated structured query statements are clustered, and based on the clustering results, the proportion of the second error for each type of structured query statement in each database type is determined.

[0147] In one possible implementation, the second acquisition module 1204 is also used for error information types, including a first type of error information returned by the database system and a second type of error information with randomness.

[0148] In one possible implementation, the third determining module 1205 is further configured to:

[0149] Based on the error message type, the error messages corresponding to each type of structured statement are pre-classified to obtain the pre-classification results;

[0150] Using preset classification rules and / or artificial intelligence models, error clustering is performed on the error information corresponding to the pre-classification results to obtain the third error proportion corresponding to each error information type.

[0151] The root cause localization device for database errors provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0152] Figure 13A schematic diagram of the structure of a database error root cause localization device provided in an embodiment of this application. Figure 13 As shown, the database error root cause localization device 1300 provided in this embodiment includes at least one processor 1301 and a memory 1302. Optionally, the device 1300 also includes a communication component 1303. The processor 1301, memory 1302, and communication component 1303 are connected via a bus.

[0153] In a specific implementation, at least one processor 1301 executes computer execution instructions stored in memory 1302, causing at least one processor 1301 to perform the above-described method.

[0154] The specific implementation process of processor 1301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0155] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0156] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0157] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0158] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0159] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0160] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0161] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0162] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0163] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0164] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0165] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0166] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0167] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for locating the root cause of database errors, characterized in that, include: Obtain database access error data; wherein, the database access error data includes database type and error information; Based on the database access error data, determine the first error percentage for each database type; Based on the error information, determine the percentage of second errors corresponding to each type of structured query statement in each of the database types; Retrieve the preset error message types; Based on the error message type, error clustering is performed on the error messages corresponding to each of the structured statement types to obtain the third error percentage corresponding to each of the error message types; The root cause of the database access error data is determined based on the first error percentage, the second error percentage, and the third error percentage.

2. The method according to claim 1, characterized in that, The process of obtaining database access error data includes: Based on the application performance management probe, database access error data of multiple database ports are monitored; wherein, the application performance management probe is pre-adapted to the database drivers of the multiple database ports.

3. The method according to claim 1, characterized in that, The step of determining the first error percentage for each database type based on the database access error data includes: Bind the database type to the corresponding database instance; Based on the time series, calculate the number of database accesses, the number of errors, and the error rate per minute corresponding to the database type, within the dimension of the database instance. Using a clustering algorithm, the first error percentage for each database type is calculated based on the number of database accesses per minute, the number of errors, and the error rate corresponding to the database type.

4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the percentage of second errors corresponding to each structured query statement type in each database type based on the error information includes: Based on the error information, obtain the corresponding structured query statement for each of the database types; Associate the structured query statement with the database access error data; The associated structured query statements are clustered, and based on the clustering results, the percentage of second errors corresponding to each structured query statement type in each database type is determined.

5. The method according to any one of claims 1 to 3, characterized in that, The error message types include a first type of error message returned by the database system and a second type of error message with randomness.

6. The method according to claim 5, characterized in that, The step of performing error clustering processing on the error information corresponding to each of the structured statement types according to the error information types to obtain the third error proportion corresponding to each of the error information types includes: Based on the error message type, the error messages corresponding to each of the structured statement types are pre-classified to obtain pre-classification results; Using preset classification rules and / or artificial intelligence models, error clustering is performed on the error information corresponding to the pre-classification results to obtain the third error proportion corresponding to each type of error information.

7. A root cause localization device for database errors, characterized in that, include: The first acquisition module is used to acquire database access error data; wherein, the database access error data includes database type and error information; The first determining module is used to determine the first error percentage corresponding to each type of database based on the database access error data; The second determining module is used to determine, based on the error information, the percentage of a second error corresponding to each type of structured query statement in each type of database; The second acquisition module is used to acquire preset error message types; The third determining module is used to perform error clustering processing on the error information corresponding to each of the structured statement types according to the error information types, so as to obtain the third error proportion corresponding to each of the error information types; The fourth determining module is used to determine the root cause of the database access error data based on the first error percentage, the second error percentage, and the third error percentage.

8. A root cause localization device for database errors, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.