Database diagnosis method, device and equipment based on large model and storage medium

By constructing a knowledge system for the database and using natural language mapping technology, a large model is trained for fault detection, which solves the problems of high cost and incompleteness caused by the reliance on manual analysis in existing technologies for equipment fault detection, and realizes automated fault diagnosis and improved accuracy.

CN121479565APending Publication Date: 2026-02-06武汉达梦数据技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511627965.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing equipment fault detection methods rely on analysis by a large number of professionals, resulting in high time costs, incomplete fault analysis, and unclear root cause analysis.

Method used

By acquiring indicator data and metadata from the database, a knowledge system is constructed, natural language mapping processing of fault data is performed, and a large model is trained to detect faults and achieve automated diagnosis.

Benefits of technology

It improves the accuracy of fault diagnosis, reduces operation and maintenance costs, and solves the problem of low efficiency caused by relying on manual analysis in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479565A_ABST
    Figure CN121479565A_ABST
Patent Text Reader

Abstract

The invention relates to a database diagnosis method and device based on a large model, electronic equipment and a storage medium. The method comprises the steps that index data, an internal library table and field annotations in a database are obtained, and a knowledge system of the database is set; classifying the index data according to the knowledge system to obtain fault data corresponding to each fault system; performing natural language mapping processing on the fault data to obtain a large-model context knowledge system; training a preset fault large model according to the large model context knowledge system, the internal library table and the field annotation, and then performing fault detection to obtain a diagnosis result; fault data classification is achieved by building a knowledge system, a context knowledge system capable of being recognized by a large model is generated in combination with a natural language processing technology, automatic fault diagnosis is achieved based on the trained fault large model, and the technical problems that a traditional method depends on manual analysis and is low in complex fault processing efficiency are solved. The method has the advantages of improving diagnosis accuracy and reducing operation and maintenance cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of database diagnosis, and in particular relates to a database diagnosis method and device based on a large model, an electronic device and a storage medium. BACKGROUND

[0002] In the continuous industry, equipment failure is a common situation encountered in the production process of an enterprise. In order to ensure the smooth development of production work, equipment maintenance is an indispensable work for an enterprise. Before the maintenance process is carried out, the equipment needs to be analyzed for failure.

[0003] In the prior art, most of the time, manual detection and failure analysis of the equipment are carried out. The fault type can also be determined by matching the fault data of the equipment with previous fault data. However, the existing fault detection method relies on a large number of professional personnel for analysis, resulting in high time cost. In addition, the matching of previous fault data has the problems of incomplete fault analysis and unclear root cause analysis.

[0004] Therefore, it is necessary to provide a database diagnosis method and device based on a large model, an electronic device and a storage medium to solve the technical problems of the prior art, such as the existing fault detection method relying on a large number of professional personnel for analysis and previous fault data for matching, resulting in high time cost, incomplete fault analysis and unclear root cause analysis. SUMMARY

[0005] Therefore, it is necessary to provide a database diagnosis method and device based on a large model, an electronic device and a storage medium to solve the technical problems of the prior art, such as the existing fault detection method relying on a large number of professional personnel for analysis and previous fault data for matching, resulting in high time cost, incomplete fault analysis and unclear root cause analysis.

[0006] In order to solve the above problems, in a first aspect, the present application provides a database diagnosis method based on a large model, comprising: Obtaining index data and metadata in a database, and determining a knowledge system of the database, wherein the metadata comprises internal library tables and field annotations; Classifying the index data according to the knowledge system to obtain fault data corresponding to each fault system; Performing natural language mapping processing on the fault data to obtain a large model context knowledge system; After training a preset fault large model according to the large model context knowledge system, the internal library tables and the field annotations, performing fault detection on current equipment data to obtain a diagnosis result.

[0007] In a possible implementation, the knowledge system comprises a CPU fault type, a memory usage / assignment fault type, a network fault type, a slow SQL, a deadlock, and a transaction exception.

[0008] In a possible implementation, the natural language mapping processing of the fault data obtains a large model context knowledge system, comprising: According to the fault data, a fault standard image of each fault system is set, and processing data of each feature in the fault standard image is determined according to the fault data; The fault standard image of each fault system is associated with the processing data to obtain natural language mapping data, and the natural language mapping data is input into a Prompt prompt word to construct a large model context knowledge system.

[0009] In a possible implementation, the training of the preset fault large model according to the large model context knowledge system, the internal library table, and the field annotation comprises: The large model context knowledge system is brought into the preset fault large model through the Prompt prompt word in a preset front specification, and the preset fault large model is trained together with the internal library table and the field annotation.

[0010] In a possible implementation, the preset front specification is the format of instructions, inputs, and responses.

[0011] In a possible implementation, the fault detection of the current device data obtains a diagnosis result, comprising: According to the Prompt prompt word, the current device data is analyzed to obtain a fault analysis result; The fault analysis result is input into the trained preset fault large model for detection to obtain a diagnosis result.

[0012] In a possible implementation, the acquisition of the index data and the metadata in the database comprises: A metadata manager and a data source connector are established; The index data and the metadata in the database are acquired through the data source connector; The index data and the metadata are managed and stored through the metadata manager.

[0013] In a second aspect, the present application further provides a database diagnosis apparatus based on a large model, comprising: A data acquisition module is configured to acquire index data and metadata in a database, and determine a knowledge system of the database, wherein the metadata comprises an internal library table and field annotation. The data classification module is used to classify the indicator data according to the knowledge system to obtain the fault data corresponding to each fault system. The language mapping module is used to perform natural language mapping processing on the fault data to obtain a large model contextual knowledge system; The model training module is used to train a preset fault model based on the contextual knowledge system of the large model, the internal database tables, and the field annotations, and then perform fault detection on the current device data to obtain diagnostic results.

[0014] Thirdly, embodiments of the present invention disclose an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the various steps of the above-described embodiments of the database diagnostic method based on a large model.

[0015] Fourthly, embodiments of the present invention disclose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the various steps of the above-described embodiments of the database diagnostic method based on a large model.

[0016] The beneficial effects of this invention are as follows: It acquires indicator data and metadata from a database and determines the database's knowledge system, including internal tables and field annotations; it classifies the indicator data according to the knowledge system to obtain fault data corresponding to each fault system; it performs natural language mapping processing on the fault data to obtain a large-scale model contextual knowledge system; after training a preset fault large-scale model based on the large-scale model contextual knowledge system, internal tables, and field annotations, it performs fault detection on the current equipment data to obtain diagnostic results; by constructing a knowledge system to classify fault data, it combines natural language processing technology to generate a contextual knowledge system that the large-scale model can recognize, and achieves automated fault diagnosis based on the trained fault large-scale model. This solves the technical problems of traditional methods relying on manual analysis and low efficiency in handling complex faults, and has the advantages of improving diagnostic accuracy and reducing operation and maintenance costs. Attached Figure Description

[0017] Figure 1 This is a schematic flowchart of an embodiment of the database diagnostic method based on a large model provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of step S101; Figure 3 A schematic diagram of an embodiment of the database diagnostic device based on a large model provided by the present invention; Figure 4 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0018] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0019] In existing technologies, equipment fault diagnosis mainly relies on manual experience and historical data matching. Traditional methods require professionals to check equipment operating parameters item by item and determine the root cause of the problem by comparing historical fault cases. This model suffers from slow response time and high labor costs, especially when dealing with complex system faults. Since fault manifestations may involve multiple dimensions such as CPU, memory, and network, manual analysis is difficult to quickly locate the root cause. A large data center once experienced a sudden drop in database performance. The operations and maintenance team spent three days troubleshooting before discovering that it was a chain reaction of memory overflow caused by a network configuration error, exposing the shortcomings of traditional diagnostic methods in cross-system correlation analysis.

[0020] To address these challenges, the R&D team recognized the advantages of large language models in pattern recognition and contextual understanding. They began exploring how to transform structured equipment data into natural language descriptions and build a diagnostic knowledge base that the model could understand. By analyzing typical fault cases, they discovered a non-linear correspondence between fault representations and system indicators, necessitating the establishment of a multi-dimensional knowledge system to support model training. After repeated validation, they ultimately developed a solution that combines equipment metadata with operational indicators, using a knowledge system to categorize and construct contextual training sets.

[0021] Therefore, this application proposes a technical solution that involves acquiring database indicator data and metadata containing database table structures, constructing a knowledge system to classify indicators, transforming fault data into natural language contextual knowledge, and training a dedicated large model for intelligent diagnosis.

[0022] like Figure 1 As shown, a specific embodiment of the present invention discloses a database diagnostic method based on a large model, comprising: S101. Obtain the indicator data and metadata from the database, and determine the knowledge system of the database. The metadata includes internal database tables and field comments.

[0023] The database can be a DM database. Metric data refers to the set of performance parameters generated during database operation, specifically numerical data such as CPU utilization, memory allocation, and network throughput collected by a monitoring agent. This real-time data forms the basic input for fault diagnosis. Metadata refers to configuration information describing the database structure, specifically including data table field definitions, index structures, storage engine parameters, and other technical specifications. This structured information provides contextual support for the model to understand data relationships. The knowledge system refers to a predefined fault classification framework, specifically divided into three categories according to hardware resources: computing resources, storage resources, and network resources. Each category has corresponding diagnostic rules and related parameters to guide data classification and feature extraction. Specifically, at the code level, the acquisition of database knowledge information, database / table information, field information and annotations, index information, and command processing for database operations are encapsulated.

[0024] S102. Classify the indicator data according to the knowledge system to obtain the fault data corresponding to each fault system.

[0025] The knowledge system can be divided into multiple fault systems, such as CPU fault types, memory usage / allocation fault types, network fault types, slow SQL, deadlock, and transaction exceptions, making the knowledge system more systematic and the logic clearer. Thus, the indicator data can be classified according to the knowledge system to obtain the fault data corresponding to each fault system.

[0026] S103. Perform natural language mapping processing on the fault data to obtain the contextual knowledge system of the large model.

[0027] Natural language mapping processing refers to the process of converting numerical monitoring data into natural language descriptions. Specifically, a template engine is used to convert 85% CPU load into a text description of "computing resources are under high load", enabling large models to understand the semantics of device status.

[0028] S104. After training the preset fault model based on the contextual knowledge system, internal database tables, and field annotations of the large model, fault detection is performed on the current device data to obtain the diagnostic results.

[0029] Fault detection refers to real-time diagnosis based on a trained model. Specifically, it involves constructing a Prompt statement containing the current device status and using the model's multi-dimensional reasoning capabilities to output the cause of the fault and suggested solutions.

[0030] The database diagnostic method based on large models provided in this application can be applied to database diagnostic systems based on large models. The database diagnostic system based on large models can be a software system running on a terminal device. The terminal device can be a server, tablet computer, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), mobile phone, etc. This application does not impose any restrictions on the specific type of terminal device.

[0031] Specifically, the system first establishes a connection to the target database and continuously collects over twenty operational metrics, including CPU core temperature, memory page swapping frequency, and TCP retransmission rate. Simultaneously, it acquires the database schema definition file and extracts key metadata such as tablespace distribution, transaction locking mechanisms, and connection pool configuration. Following a pre-built three-layer knowledge system, abnormal queries per second are categorized as computational resource failures, and decreased cache hit rates are categorized as storage resource failures. A natural language processing engine transforms the 95% memory usage figure into a text description of "memory resources are nearly exhausted," creating a training corpus containing over three hundred typical failure scenarios. The processed text data and original metadata are then input into a large model for multiple rounds of fine-tuning, ultimately forming a diagnostic model capable of understanding the database's operational status. When a surge in transaction processing latency is detected, the system automatically constructs a diagnostic request containing the current status of each node. The model then analyzes multiple factors, including disk I / O, lock wait time, and query plans, to output accurate diagnostic results such as missing indexes or connection leaks.

[0032] Compared with existing technologies, this embodiment provides a method for acquiring indicator data and metadata from a database and determining the database's knowledge system. The metadata includes internal tables and field annotations. The indicator data is then categorized according to the knowledge system to obtain fault data corresponding to each fault system. Natural language mapping is performed on the fault data to obtain a large-scale model contextual knowledge system. After training a preset fault model based on the large-scale model contextual knowledge system, internal tables, and field annotations, fault detection is performed on the current device data to obtain diagnostic results. By constructing a knowledge system to classify fault data and combining it with natural language processing technology to generate a contextual knowledge system that the large model can recognize, automated fault diagnosis is achieved based on the trained fault model. This solves the technical problems of traditional methods relying on manual analysis and being inefficient in handling complex faults, and has the advantages of improving diagnostic accuracy and reducing operation and maintenance costs.

[0033] In some embodiments of the present invention, such as Figure 2 As shown, step S101 includes: S201. Establish metadata manager and data source connector.

[0034] The metadata manager is a component used for centralized management and storage of metadata. It can be implemented using a database management system or a dedicated metadata storage tool to ensure the structured and traceable nature of metadata. The data source connector is an interface module that connects to the database and retrieves data. It can be implemented using JDBC, ODBC, or a custom API to achieve compatible access with different databases. Establishing the metadata manager and data source connector facilitates integration and connection to the DM database, allowing access to the DM database's metric data, internal tables, field annotations, and other information. This helps the model better understand database knowledge and assists in automatically handling issues such as faults.

[0035] S202. Obtain indicator data and metadata from the database through the data source connector.

[0036] Metric data refers to quantitative parameters reflecting the database's operational status, specifically including real-time monitoring data such as CPU utilization, memory usage, or network latency, which provide basic data support for fault analysis. Metadata refers to information describing the database's internal structure, specifically including static information such as table names, field types, index definitions, or permission configurations, which helps in understanding the database's operational logic.

[0037] S203. Manage and store indicator data and metadata through the metadata manager.

[0038] Specifically, the metadata manager works in conjunction with the data source connector. Through the data source connector, it dynamically collects real-time metric data and static metadata from the target database and stores both types of data uniformly in the metadata manager. During this process, the metadata manager categorizes, tags, and versions the data; for example, it classifies CPU utilization as a performance metric and table structure definitions as metadata. By establishing a standardized data storage format, it ensures that the required data can be quickly retrieved and accessed during subsequent model training phases.

[0039] In some embodiments of the present invention, the knowledge system includes CPU fault types, memory usage / allocation fault types, network fault types, slow SQL, deadlock, and transaction anomalies.

[0040] Among these, CPU failure types refer to operational anomalies related to the central processing unit, which can be identified using indicators such as CPU utilization, temperature thresholds, and process blocking rate. These are used to detect failures caused by computing resource overload or hardware performance degradation. Memory usage / allocation failure types refer to abnormal states related to memory resources, which can be judged using indicators such as memory usage rate, allocation failure count, and cache hit rate. These are used to identify memory leaks or ineffective resource allocation strategies. Network failure types refer to abnormal situations related to data transmission, which can be monitored using indicators such as network latency, packet loss rate, and connection interruption frequency. These are used to locate communication failures caused by network congestion or configuration errors.

[0041] Specifically, after acquiring the metric data from the database, the data is mapped to CPU fault types, memory usage / allocation fault types, and network fault types using predefined classification rules. For example, when the metric data includes CPU utilization exceeding a preset threshold, it is categorized into the dataset corresponding to the CPU fault type; when the number of memory allocation failures reaches the alarm level within a specific time window, it is categorized into the memory usage / allocation fault type. Through this classification process, a structured dataset corresponding to each fault system is formed, providing clear data input for subsequent natural language mapping and model training.

[0042] In some embodiments of the present invention, step S103 includes: Based on the fault data, a fault standard profile is set for each fault system, and the processing data for each feature in the fault standard profile is determined based on the fault data.

[0043] The fault profile refers to a set of fault features described using natural language. This can be achieved using text templates, such as describing abnormal CPU usage as "CPU load continuously exceeding 90% threshold for 5 minutes". Processing data refers to the quantitative indicators that support the fault feature determination. This can be achieved using numerical ranges or statistical parameters. For example, the processing data for a memory leak could be set as "memory usage increases by 10% per hour with no memory release records".

[0044] The fault standard profile of each fault system is associated with the processed data to obtain natural language mapping data. The natural language mapping data is then input into the Prompt prompt to construct a large model contextual knowledge system.

[0045] Specifically, when constructing the contextual knowledge system of a large model, standardized natural language description frameworks are first established for fault systems such as CPU, memory, and network. For example, for the memory fault system, the standard profile of "memory overflow" can be defined as "process occupies more memory than the allocation limit and there is no reclamation operation," while associated with the processing data "memory usage rate _95% for 10 minutes." Then, the standard profiles of each system are associated with the processing data to obtain structured natural language mapping data. Prompt words are structured instructions used to guide the large model to focus on specific fault types. These can be implemented using natural language templates or keyword combinations. For example, "abnormal CPU usage" can be combined with keywords such as "threshold range" and "associated indicators" to enable the model to quickly identify fault characteristics by clearly defining the task objective. Prompt words are obtained after data feeding according to requirements. Natural language mapping data is input into the prompt words for data retrieval. The prompt words can output contextual knowledge based on the natural language mapping data, thereby constructing the contextual knowledge system of the large model and forming a knowledge graph that can be called by the large model.

[0046] Data retrieval refers to the process of filtering relevant information from a knowledge system based on prompts. This can be achieved using vector similarity matching or rule-based filtering algorithms. For example, after converting the prompts into vectors, their similarity is ranked with the vectors of the fault standard profile to extract the most relevant contextual data for the current fault system. A mapping module from database knowledge to natural language can be established, thus creating a large-scale model contextual knowledge system based on the prompts. The knowledge system format could be something like "What built-in packages, functions, libraries / tables does the database have?", "Faults caused by CPU: low cpu_rate utilization", "Faults caused by memory allocation: OOM_kill occurs", etc., enabling the DM fault model to understand and be aware of the database's systemic knowledge information, and to provide better responses.

[0047] In some embodiments of the present invention, step S104 includes: The contextual knowledge system of the large model is introduced into the preset fault large model with preset pre-defined specifications through the prompt words, and the preset fault large model is trained together with the internal library tables and the field annotations.

[0048] The training process refers to combining the retrieval results with database metadata to optimize model parameters. This can be achieved using a supervised learning framework, such as using structured field annotations from internal database tables as input features, pre-defined outputs as labels, and adjusting model weights through backpropagation.

[0049] Specifically, during the training phase, specific prompt words are first designed for each fault system. For example, prompt templates containing keywords such as "load peak" and "core utilization" are set for CPU fault types. Then, the prompt words are used to retrieve standard fault profiles from the knowledge system. For instance, when "memory leak detection" is input, the system automatically matches profile data of abnormal memory usage and its processing records. After the retrieval is complete, it is combined with field annotations in the internal database tables. For example, "tablespace utilization" in the field annotation is associated with the retrieved "memory allocation anomaly," forming training data input to a pre-set large-scale fault model. Through iterative learning, the model establishes a mapping relationship between fault features and database metadata.

[0050] In some embodiments of the present invention, the preset pre-specification is the format of instructions, inputs and responses.

[0051] In this process, database system knowledge can be input into the model for learning in the format of Instruction:, input:, and Response:. In order to utilize the knowledge system for comprehensive analysis, it is necessary to define the temperature coefficient and related DM library pre-specifications. Then, through the mapping relationship established with the model, the DM fault model can be called and returned using transformer technology.

[0052] The Instruction, Input, and Response formats refer to the structured organization of database knowledge into instructions, inputs, and responses. The instruction format refers to the textual description used to guide the model in performing specific tasks, which can be implemented using natural language templates. For example, defining a database table structure as "Instruction: Parse table field relationships". The input format refers to the data organization form processed by the model, which can be implemented using structured data mapping methods. For example, converting field comments into "input: The user table contains three fields: id, name, and age". The response format refers to the standardization requirements of the model output, which can be implemented using JSON format, such as setting "Response: {'Fault Type': 'Memory Overflow', 'Root Cause': 'Cache Not Released'}". The pre-set fault model refers to a pre-trained language model based on the Transformer architecture, which can be implemented through parameter fine-tuning, adjusting model weights to adapt to the database diagnostic scenario. The temperature coefficient refers to parameters that control the diversity of the model's generated results, which can be implemented by adjusting the probability distribution parameters of the model's output, used to balance the accuracy and flexibility of fault diagnosis results. The pre-defined specifications of the DM library refer to the pre-defined data standards and interface rules related to equipment management. This can be achieved through metadata constraints and field association mapping tables, ensuring the consistency of data format during model calls. Transformer technology refers to a deep learning model architecture based on a self-attention mechanism. Specifically, it can be implemented using an encoder-decoder structure of a pre-trained language model, used to efficiently process serialized fault data and generate diagnostic results.

[0053] Specifically, after the database system knowledge is converted into Instruction, Input, and Response formats, the model understands the task objective through instructions, receives real-time device data through input parameters, and outputs fault diagnosis conclusions through responses. The temperature coefficient is dynamically adjusted during the model inference phase; for example, the temperature value is lowered to focus on high-probability results when high-precision judgment is needed, while the temperature value is increased to enhance diversity when exploring multiple possibilities. The DM library's pre-specification ensures the integrity and consistency of input data by defining field types, data ranges, and association rules. Transformer technology captures long-distance dependencies in fault data through a self-attention mechanism, combining feature extraction by the encoder and diagnostic conclusions by the decoder to achieve end-to-end fault analysis.

[0054] In some embodiments of the present invention, step S104 includes: The current device data is analyzed based on the prompt words to obtain the fault analysis results.

[0055] The Prompt prompt refers to a command template constructed using natural language. Specifically, it can be implemented using predefined fault analysis templates, such as query statements containing elements like time range, indicator thresholds, and correlation dimensions, to guide the large model to focus on key data features. Current device data refers to real-time collected operational status information, which can be implemented using sensor data streams or database monitoring logs, including dynamic indicators such as CPU load rate, memory usage, and network latency.

[0056] The fault analysis results are input into the trained pre-set fault model for detection to obtain the diagnostic results.

[0057] Among them, the pre-defined fault model refers to a deep learning model trained with a knowledge system. Specifically, it can be implemented using a neural network model based on the Transformer architecture, which processes structured and unstructured data through a multi-layer attention mechanism.

[0058] In this embodiment of the invention, in order to provide certain feedback suggestions on fault data using a knowledge system, on the one hand, the prompt words are substituted into the model according to the specification of {"mistake":"adjust session memory quota", "suggestion":"adjust session_memory parameter", "diagnosis":"memory overflow"}, and fault data and descriptions are also substituted. The model performs diagnostic feedback based on the database knowledge system and fault knowledge system information. Combining multi-class fault types, the model provides a suggestion of "fault type and cause" and gives the reason for making such a judgment, so as to ensure the correctness of the final diagnostic results output to the user.

[0059] Specifically, during equipment operation, the real-time collected monitoring data is first formatted into a structured dataset containing timestamps, device numbers, and metric values. Using a pre-defined fault analysis prompt template, the raw data is transformed into a natural language query containing contextual semantics, such as "Analyze the factors related to device number A's CPU utilization exceeding 90% between 15:00 and 15:30". This query is input into a trained fault model. Based on fault standard profiles and field annotations stored in the knowledge system, the model automatically identifies the correlation characteristics of abnormal metrics and generates diagnostic reports, such as determining whether high CPU load is caused by unoptimized SQL queries or missing indexes.

[0060] This invention addresses the problem of large models exhibiting illusions in complex fault diagnosis scenarios, leading to a decrease in diagnostic accuracy. It also proposes a diagnostic method that combines database knowledge and fault multi-classification knowledge structure with large models. This method integrates comprehensive fault features and fault characteristic classification with contextual reasoning from the large model. Through a mind-map-like thinking process, it effectively diagnoses and handles database problems, helping relevant personnel manage the database. With variations, it may also be universally applicable to other relational databases.

[0061] To better implement the database diagnostic method based on a large model in the embodiments of the present invention, correspondingly, the embodiments of the present invention also provide a database diagnostic device based on a large model, such as... Figure 3 As shown, the database diagnostic device 300 based on a large model includes: The data acquisition module 301 is used to acquire indicator data and metadata from the database and determine the knowledge system of the database. The metadata includes internal database tables and field annotations. The data classification module 302 is used to classify the indicator data according to the knowledge system to obtain the fault data corresponding to each fault system. The language mapping module 303 is used to perform natural language mapping processing on fault data to obtain a large model context knowledge system; The model training module 304 is used to train a preset fault model based on the contextual knowledge system, internal database tables, and field annotations of the large model, and then perform fault detection on the current device data to obtain diagnostic results.

[0062] The database diagnostic device 300 based on a large model provided in the above embodiments can implement the technical solutions described in the above embodiments of the database diagnostic method based on a large model. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the database diagnostic method based on a large model, and will not be repeated here.

[0063] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402, and a display 403. Figure 4 Only some components of the electronic device 400 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0064] In some embodiments, memory 402 may be an internal storage unit of electronic device 400, such as a hard disk or memory of electronic device 400. In other embodiments, memory 402 may also be an external storage device of electronic device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 400.

[0065] Furthermore, the memory 402 may include both internal storage units of the electronic device 400 and external storage devices. The memory 402 is used to store application software and various types of data installed on the electronic device 400.

[0066] In some embodiments, processor 401 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the database diagnostic method based on a large model in this invention.

[0067] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information from electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.

[0068] In some embodiments of the present invention, when processor 401 executes a database diagnostic program based on a large model in memory 402, the following steps may be performed: Obtain metric data and metadata from the database, and determine the database's knowledge system. Metadata includes internal database tables and field comments. The indicator data are classified according to the knowledge system to obtain the fault data corresponding to each fault system; Natural language mapping is performed on the fault data to obtain a large model contextual knowledge system; After training the pre-defined fault model based on the contextual knowledge system, internal database tables, and field annotations, fault detection is performed on the current device data to obtain diagnostic results.

[0069] It should be understood that when the processor 401 executes the database diagnostic program based on the large model in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0070] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 400 mentioned. Electronic device 400 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0071] Accordingly, embodiments of this application also provide a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the database diagnostic method based on a large model provided in the above-described method embodiments.

[0072] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0073] The above provides a detailed description of the database diagnostic method, apparatus, electronic device, and storage medium based on a large model provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A database diagnostic method based on a large model, characterized in that, include: Obtain indicator data and metadata from the database, and determine the knowledge system of the database, wherein the metadata includes internal database tables and field annotations; The indicator data are classified according to the knowledge system to obtain the fault data corresponding to each fault system; The fault data is processed using natural language mapping to obtain a large model contextual knowledge system; After training the preset fault model based on the large model context knowledge system, the internal database tables, and the field annotations, fault detection is performed on the current device data to obtain diagnostic results.

2. The database diagnostic method based on a large model according to claim 1, characterized in that, The knowledge system includes CPU failure types, memory usage / allocation failure types, network failure types, slow SQL, deadlock, and transaction exceptions.

3. The database diagnostic method based on a large model according to claim 1, characterized in that, The natural language mapping process performed on the fault data yields a large model contextual knowledge system, including: Based on the fault data, a fault standard profile is set for each fault system, and the processing data for each feature in the fault standard profile is determined based on the fault data. The fault standard profile of each fault system is associated with the processed data to obtain natural language mapping data. The natural language mapping data is then input into the Prompt prompt to construct a large model contextual knowledge system.

4. The database diagnostic method based on a large model according to claim 3, characterized in that, The step of training the preset fault model based on the contextual knowledge system of the large model, the internal database tables, and the field annotations includes: The contextual knowledge system of the large model is introduced into the preset fault model with preset pre-defined specifications through the Prompt prompt, and the preset fault model is trained together with the internal library table and the field annotation.

5. The database diagnostic method based on a large model according to claim 4, characterized in that, The preset pre-defined specifications are the formats of instructions, inputs, and responses.

6. The database diagnostic method based on a large model according to claim 1, characterized in that, The process of performing fault detection on current device data to obtain diagnostic results includes: The current device data is analyzed based on the Prompt prompts to obtain fault analysis results; The fault analysis results are input into the trained preset fault model for detection to obtain the diagnostic results.

7. The database diagnostic method based on a large model according to claim 1, characterized in that, The acquisition of indicator data and metadata from the database includes: Establish metadata manager and data source connectors; The indicator data and metadata in the database are obtained through the data source connector; The metadata manager manages and stores the indicator data and the metadata.

8. A database diagnostic device based on a large model, characterized in that, include: The data acquisition module is used to acquire indicator data and metadata from the database and determine the knowledge system of the database. The metadata includes internal database tables and field annotations. The data classification module is used to classify the indicator data according to the knowledge system to obtain the fault data corresponding to each fault system. The language mapping module is used to perform natural language mapping processing on the fault data to obtain a large model contextual knowledge system; The model training module is used to train a preset fault model based on the contextual knowledge system of the large model, the internal database tables, and the field annotations, and then perform fault detection on the current device data to obtain diagnostic results.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the database diagnostic method based on a large model as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the database diagnostic method based on a large model as described in any one of claims 1-7.