Database management method, device, storage medium, and program product
Through a large language model, analyzing database problems, generating operation and maintenance suggestions and automating operations, solving the problems of heavy and delayed manual operations in existing database operations and maintenance, and achieving efficient and intelligent database management.
Patent Information
- Application Number
- PCT/IB2025/050654
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-23
- Filing Date
- 2025-01-22
- Publication Date
- 2025-08-28
AI Technical Summary
The existing database operation and maintenance relies on manual operations, which has a large workload, delayed response and strong dependence on the knowledge and experience of operation and maintenance personnel, which has affected the normal operation of the database services.
The database problem is analyzed using a large language model, and by obtaining the current status, querying historical operation and maintenance case data, building prompt words and generating operation and maintenance suggestions, including API interface names and call parameters, to achieve automated operation and maintenance operations.
It reduces the difficulty and cost of users to solve database problems, improves operation and maintenance efficiency, reduces response delays, and enhances the effectiveness of operation and maintenance suggestions.
Smart Images

Figure IB2025050654_28082025_PF_FP_ABST
Abstract
Description
[0001] TECHNICAL FIELD The present disclosure relates to the field of database technology, and more particularly to a database management method, device, storage medium, and program product. Background: A database instance consists of a database service process. Generally speaking, a database instance corresponds to a database and is the basic unit of database use. A database instance is the channel for accessing the database; any user operation on database data, including data definition, data query, data maintenance, and database operation control, is performed within the database instance. Applications can only interact with the database through the database instance. Currently, database operation and maintenance primarily relies on professional database operation and maintenance teams. This database operation and maintenance approach has the following problems: 1. High manual workload. Database operation and maintenance includes configuration, maintenance, and optimization operations. These operations are arduous for large databases and require significant time and resources. 2. High reliance on the knowledge and experience of operation and maintenance personnel. 3. Response delays. Manual operation and maintenance requires a considerable amount of time to detect and resolve issues, including operations such as clicking through multiple functional pages in the database operation and maintenance console to perform correlation analysis. This can extend response times to faults, thereby impacting the normal operation of database services. In view of the aforementioned issues, the present disclosure provides a database management method, device, storage medium, and program product that address, or at least partially address, the aforementioned database issues. In a first aspect, the present disclosure provides a database management method, comprising: obtaining a database issue and a current database status; based on the current status, querying historical operation and maintenance case data that matches the current status; the historical operation and maintenance case data including: historical database status when abnormal events occurred and the operation and maintenance actions taken in response to the abnormal events; constructing prompt words based on the database issue, the current status, and the historical operation and maintenance case data; and inputting the prompt words into a trained large language model to obtain database operation and maintenance recommendations for the database issue. In one embodiment of the first aspect, the database operation and maintenance recommendations include: the interface name of an API interface required for operation and maintenance, and the call parameters required to call the API interface. In an implementation provided in the first aspect, the method further includes: notifying a terminal to display a database operation and maintenance suggestion message based on the database operation and maintenance suggestion; the database operation and maintenance suggestion message includes an operation and maintenance control; wherein the terminal generates and sends an API request for the API interface after the operation and maintenance control is triggered.In one embodiment of the first aspect, the method further includes: generating and sending an API request for the API interface based on the database operation and maintenance suggestion. In one embodiment of the first aspect, the method further includes: querying a database document matching the database issue based on the database issue; the database document recording database anomaly diagnosis experience; constructing a prompt word based on the database issue, the current status, and the historical operation and maintenance case data, including: constructing a prompt word based on the database issue, the current status, the historical operation and maintenance case data, and the database document. In one embodiment of the first aspect, the method further includes: inputting a state sequence of the database within a preset time period into an anomaly detection and prediction algorithm based on time series analysis to obtain a prediction result; constructing a prompt word based on the database issue, the current status, and the historical operation and maintenance case data, including: constructing a prompt word based on the database issue, the current status, the historical operation and maintenance case data, and the prediction result. In one embodiment of the first aspect, querying historical operation and maintenance case data matching the current state based on the current state includes: determining the historical operation and maintenance case data from the multiple historical operation and maintenance case data based on a match between the current state and the database state recorded in each of the multiple historical operation and maintenance case data. In one embodiment of the first aspect, the method further includes: obtaining user feedback regarding the database operation and maintenance suggestion; determining whether the database operation and maintenance suggestion is valid based on the feedback; and, if the database operation and maintenance suggestion is valid, generating training samples for fine-tuning the large language model based on the database issue, the current state, and the database operation and maintenance suggestion. A second aspect of the present disclosure provides a database management method, comprising: displaying an interactive interface; in response to a user inputting a database problem on the interactive interface, displaying a database operation and maintenance suggestion message for the database problem on the interactive interface; the database operation and maintenance suggestion message being generated based on a database suggestion fed back by a trained large language model for the database problem; the database operation and maintenance suggestion including: the interface name of an API interface required for operation and maintenance and call parameters required for calling the API interface; the database operation and maintenance suggestion message including an operation and maintenance control; and in response to the user triggering the operation and maintenance control, generating and sending an API request for the API interface.In one embodiment provided in the second aspect, the process of determining the database operation and maintenance recommendations includes: obtaining the database problem and the current database status; based on the current status, querying historical operation and maintenance case data that matches the current status; the historical operation and maintenance case data including: historical database status when abnormal events occurred and the operation and maintenance actions taken in response to the abnormal events; constructing prompt words based on the database problem, the current database status, and the historical operation and maintenance case data; and inputting the prompt words into the large language model to obtain the database operation and maintenance recommendations output by the large language model. A third aspect of the present disclosure provides an electronic device. The electronic device includes: a memory and a processor, wherein the memory is configured to store a program; and the processor is coupled to the memory and configured to execute the program stored in the memory to implement any of the aforementioned methods. A fourth aspect of the present disclosure provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer, can implement any of the aforementioned methods. A fifth aspect of the present disclosure provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements any of the aforementioned methods. The technical solutions provided by the embodiments of the present disclosure utilize the reasoning capabilities of a large language model to analyze database issues and generate database operation and maintenance recommendations, reducing the difficulty, cost, and delay for users in resolving database issues. Furthermore, in the embodiments of the present disclosure, the large language model incorporates an understanding of real-world operation and maintenance cases in its reasoning process, helping to improve the effectiveness of the database operation and maintenance recommendations output by the large language model. BRIEF DESCRIPTION OF THE DRAWINGS To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the figures required for use in the embodiments or the prior art descriptions. Obviously, the figures described below illustrate some embodiments of the present disclosure. Persons skilled in the art can also derive other figures based on these figures without inventive effort. Figure 1 is a schematic diagram of the system architecture involved in the database management method provided in one embodiment of the present disclosure; Figure 2 is a schematic flow diagram of the database management method provided in one embodiment of the present disclosure; Figure 3 is a schematic diagram of a chat interface with a robot provided in one embodiment of the present disclosure; Figure 4 is a schematic flow diagram of a database management method provided in another embodiment of the present disclosure; and Figure 5 is a block diagram of the electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to enable persons skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below based on the accompanying drawings in the embodiments of the present disclosure.Obviously, the described embodiments are only some of the embodiments of this disclosure, and not all of them. All other embodiments derived by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Furthermore, some processes described in the specification, claims, and figures of this disclosure include multiple operations that appear in a specific order. These operations may be executed out of the order in which they appear herein or in parallel. Operation numbers, such as 101 and 102, are merely used to distinguish between different operations and do not represent any specific order of execution. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that terms such as "first" and "second" are used herein to distinguish between different messages, devices, modules, etc., and do not indicate a sequential order or limit the "first" and "second" to different types. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse. First, the vocabulary involved in the embodiments of this disclosure is explained. It should be understood that this explanation is for a clearer understanding of the embodiments of this disclosure and does not necessarily constitute a limitation of the embodiments of this disclosure. Large Language Models (LLMs): Also known as large language models, large language models are artificial intelligence models designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. LLMs are characterized by their large scale, containing billions of parameters, which help them learn complex patterns in language data. These models are typically based on deep learning architectures. Vector databases are specialized databases for storing and querying vectors. These vectors are derived from vectorized text, speech, images, and video. Compared to traditional databases, vector databases can handle more unstructured data (such as images and audio). In machine learning and deep learning, data is often represented in vector form.Database Autonomy Service (DAS): A cloud service based on machine learning and expert experience that enables database self-awareness, self-repair, self-optimization, self-operation and maintenance, and self-security. It helps users eliminate the complexity of database management and service failures caused by manual operations, effectively ensuring the stability, security, and efficiency of database services.
[0002] AI Hallucinations: Due to insufficient coverage of the model's initial training data, the model's answers to the user's database questions may be irrelevant or randomly fabricated and irrelevant to the actual scenario.
[0003] GRPC is a high-performance, open-source Remote Procedure Call (RPC) framework. To facilitate understanding of the technical solutions provided by the embodiments of this disclosure, we first introduce the LLMs, prompt words, and prompt word templates involved in the technical solutions provided by the embodiments of this disclosure.
[0004] LLM
[0005] LLM is a machine learning-based artificial intelligence model used to process text information, complete complex artificial intelligence tasks, and enhance human-computer interaction. LLM utilizes a deep learning-based architecture and is trained on a large amount of training data. With sufficient training data, LLM can handle diverse problems and predict or generate different types of content. The LLM training process typically involves pre-training and fine-tuning. During the pre-training phase, the model learns from a large and diverse dataset. During the fine-tuning phase, the model is further trained on a specific dataset related to the target task or domain to adapt to the specific requirements of the task. Examples of LLM models include bidirectional encoder representation from transformers, generative pre-trained transformer-3 (GPT-3), and chatGPT.
[0006] LLM has numerous application scenarios, serving diverse tasks such as intelligent writing, machine translation, drawing, data analysis, and lifestyle assistance. Intelligent writing can be further categorized into speech writing, text question-and-answering, text summarization, text polishing, poetry creation, screenwriting, film reviews, and image description. Data analysis can include data sorting, data comparison, and data concatenation. Drawing can include avatar generation and interior design previews. Lifestyle assistance can include gift lists and character encyclopedias. Prompt words serve as a reminder of the objectives of downstream LLM tasks, eliciting answers or informing the LLM of the tasks to be performed. For example, taking the sentiment classification task of movie reviews, the input is "I like this movie" and the output is "The sentiment polarity label of this sentence: positive / negative." A prompt word "The film is [mask]" can be constructed to prompt the LLM to perform the sentiment classification task. The [mask] position is the word you want the LLM to predict. For another example, taking the translation task as an example, the input is "I like ***" and the output is "Translate this sentence into French." A prompt word "Translate the sentence into system response: I like ***" can be constructed to prompt the LLM to perform the translation task. The prompt word is input to the LLM, and the output result is obtained. Prompt words may include but are not limited to: system prompts (SystemPrompt), user messages (UserMessage), and reply prompts (ReplyPrompt). System prompts are used to set the role of the model; user messages are questions entered by the user; and reply prompts are used to indicate the format of the model's response. To avoid possible knowledge leakage and financial risks, This solution can add a pre-question-answer fence to the prompt to determine the scope of the user's question. Specifically, the prompt can also include an intention prompt. The intention prompt could be, "Please determine whether the user's question is related to computer science or databases." To speed up fence determination, a quantitative model with fewer parameters can be used for this part. After returning a judgment value indicating that the question is related to computer science or databases, the relevant answer output by the large language model is then returned. Prompt templates can be set to facilitate prompt reuse.For example, a prompt word template may be "Please write a modern poem on the theme of university graduation in the style of ${var}", where the placeholder $(var) is filled with the information entered by the user as a variable. In this way, the prompt word template can be combined with the information entered by the user to obtain a prompt word. If the user input is "Haizi," then combining the prompt word template with this information yields the prompt word "Please write a modern poem on the theme of university graduation in the style of Haizi." Similarly, if the user input is "Lin Huiyin," combining the prompt word template with this information yields the prompt word "Please write a modern poem on the theme of university graduation in the style of Lin Huiyin." As can be seen, a prompt word template can be used to construct a prompt word. It can include fixed components and placeholders that can be filled with user-entered information. The fixed components can describe the primary objective of the prompt word and the type of task to be constructed, such as writing a modern poem on the theme of university graduation in the above example. Placeholders can be filled with replaceable content, such as ${} in the above example. A prompt word template can contain one or more placeholders, meaning that a prompt word template can contain multiple variables. After the user-entered information is filled in the placeholders of the prompt word template, the prompt word template and the user-entered information are constructed into a single prompt word. Different task types have different objectives. Different prompt word templates can correspond to different prompt word templates. Therefore, the relationship between the three concepts described above is that prompt word templates are used to construct prompt words. After the prompt words are input into the LLM, the LLM can predict the results of the prompt words. Figure 1 is a system architecture diagram of the database management method provided in an embodiment of the present disclosure. As shown in Figure 1, the system architecture includes a front-end application, a back-end service, and a model service. The front-end application can be a web application or a native application, which provides a human-computer interaction interface for users, such as a chat interface with a robot. It is also used to receive database questions input by users and send the database questions to the back-end service. The back-end service can be deployed in the cloud and is used to: receive database questions input by users; send the database questions to the model service; receive database operation and maintenance suggestions from the model service for the database questions; and notify the front-end application to display a response message to the database question in the chat interface based on the database operation and maintenance suggestions. The model service can be deployed in the cloud and is used to: perform reasoning analysis on the database questions input by users based on the LLM to obtain database operation and maintenance suggestions. The model service may include: multiple GPU (Graphics Processing Unit) servers, GPU The server interacts with the vector database.The front-end application and back-end service communicate via HTTP Restful requests, while the back-end service and model service communicate via gRPC. Both the back-end and model services can be expanded through plugin extension mechanisms, and load balancing is achieved using their respective load balancing protocols. Furthermore, the back-end service has added a bypass feature to collect user questions and LLM responses. Subsequently, training samples for LLM fine-tuning are constructed based on user feedback on model responses (e.g., manual labeling). This allows for continuous updating of the model fine-tuning data source as the number of users or database instances increases. The database management method provided by an embodiment of the present disclosure will be described below with reference to Figure 2. The execution entity of this method may be a server. In one example, the server may be the model service in Figure 1. In another example, the server may be both the back-end service and the model service in Figure 1. In other words, the back-end service and the model service jointly implement the database management method shown in Figure 2. As shown in Figure 2, this method includes:
[0007] 201. Get database issues and the current status of the database.
[0008] 202. Query historical operation and maintenance case data that matches the current state based on the current state. The historical operation and maintenance case data includes: historical states of abnormal events that occurred in the database and operation and maintenance operations taken in response to the abnormal events.
[0009] 203. Construct prompt words based on the database problem, the current status, and the historical operation and maintenance case data.
[0010] 204. Input the prompt word into the trained large language model to obtain database operation and maintenance suggestions for the database problem. In 201 above, illustratively, when a user's database fails, the user can enter the database problem on a human-computer interaction interface. Exemplarily, the human-computer interaction interface can be a chat interface with a robot. Upon receiving the database problem input by the user, the server can obtain the current status of the user's database. The database status may include, but is not limited to, database operation status, database resource configuration, and received SQL (Structured Query Language) requests. The database operation status may include database performance indicators, such as CPU occupancy and memory usage. Database resource configuration may include memory, CPU, disk, etc. In 202 above, a historical operation and maintenance case database may be pre-established. The historical operation and maintenance case database collects multiple historical operation and maintenance case data. Each historical operation and maintenance case data includes the historical database status when a certain abnormal event occurred and the operation and maintenance actions taken in response to the abnormal event. Each historical operation and maintenance case represents a real-world historical case. Operations refer to adjustments to database resource configuration parameters (or database specifications) or specific operations on certain SQL statements (e.g., slow SQL statements). Optionally, each historical operation and maintenance case data record contains a first flag that indicates whether the operation and maintenance operation recorded in the historical operation and maintenance case data is valid. Optionally, each historical operation and maintenance case data record may also include the historical database state before and after a specific abnormal event. For example, the historical database state within half an hour before and after the abnormal event occurs. Optionally, based on the match between the current database state and the database state recorded in each of the multiple historical operation and maintenance case data, historical operation and maintenance case data that is similar to the current database state can be identified from the multiple historical operation and maintenance case data sets. There may be one or more historical operation and maintenance case data sets, and this is not specifically limited in the present embodiments. For example, the current state of the database and the database state recorded in each historical operation and maintenance case data in the historical operation and maintenance case database can be input into a trained similarity calculation model to obtain the similarity between the two. Historical operation and maintenance case data with a similarity greater than a preset threshold is determined as historical operation and maintenance case data. The similarity calculation model can be a machine learning model, such as a deep learning model, which is not specifically limited in the present embodiment.For example, the current state of the database can be matched against the database state recorded in each historical operation and maintenance case data in the historical operation and maintenance case database according to preset matching rules to determine whether the two match. The preset matching rules can be designed based on actual needs and are not specifically limited in this embodiment. In step 203 above, in one example, a prompt word template can be obtained; prompt words can be constructed based on the database problem, the current state, the historical operation and maintenance case data, and the prompt word template. For example, the database problem, the current state of the database, and the historical operation and maintenance case data can be added to corresponding positions in the prompt word template to obtain prompt words. In step 204 above, a large language model can be pre-trained using training samples to obtain a large language model that meets the requirements. After training, the large language model possesses capabilities such as problem understanding, knowledge summarization, and logical reasoning. The prompt words are input into the trained large language model to obtain database operation and maintenance recommendations for the database problem. The internal structure of the large language model can be designed based on actual needs and is not specifically limited in this embodiment. The technical solutions provided by the embodiments of the present disclosure utilize the reasoning capabilities of a large language model to analyze database issues and generate database operation and maintenance recommendations, reducing the difficulty, cost, and delay for users resolving database issues. Furthermore, in the embodiments of the present disclosure, the large language model incorporates an understanding of real-world operation and maintenance cases in its reasoning process, helping to improve the effectiveness of the database operation and maintenance recommendations output by the large language model. In one example, based on the database operation and maintenance recommendations, users can find the corresponding function entry in the database operation and maintenance service's front-end application and perform operation and maintenance operations through this function entry. For example, the operation and maintenance recommendation may be, "Please increase the database instance's memory. It is recommended to increase the database instance's memory from XXX to XXX." In another example, the database operation and maintenance recommendation may include the name of the API interface required for operation and maintenance, as well as the call parameters required to call the API interface. Database issues can be resolved by calling the API interface. In other words, the large language model directly provides users with the API interface and its call parameters required for operation and maintenance. In this way, users can directly call the API interface based on the database operation and maintenance suggestions to solve database problems, without having to spend a lot of time searching for relevant functional entrances to solve database problems in the front-end application of the database operation and maintenance service. In addition, the technical solutions provided by the embodiments of the present disclosure do not rely on the user's proficiency in the front-end application of the database operation and maintenance service.Illustratively, the operation and maintenance operation data recorded in the historical operation and maintenance case data includes the API interfaces called by the operation and maintenance and the parameters required to call the API interfaces. In one example, the vector database may also embed parameter templates for each API interface call provided by the database operation and maintenance service. Thus, after the large language model determines the API interface to be called, the parameter template for the API interface is retrieved from the vector database, and the large language model then outputs the parameters required to call the API interface based on the parameter template. In one embodiment, the above method may further include:
[0011] 205. Generate and send an API request for the API interface based on the database operation and maintenance suggestion. In this embodiment, since the large language model can output the name of the API interface required to resolve the database problem and the call parameters required to call the API interface, an API request for the API interface can be directly generated based on the name of the API interface required to call and the call parameters required to call the API interface. The server can send the API request to the database operation and maintenance service that provides the API interface, so that the service responds to the API request, thereby resolving the database problem. In another embodiment, the above method further includes:
[0012] 206. Based on the database operation and maintenance suggestion, notify the user's terminal to display a database operation and maintenance suggestion message. The database operation and maintenance suggestion message includes an operation and maintenance control. After the operation and maintenance control is triggered, the terminal generates and sends an API request for the API interface. The terminal can display the database operation and maintenance suggestion message as an instant message on the chat interface with the robot. For example, as shown in FIG3 , the chat interface with the robot displays a database question 300 entered by the user and a database operation and maintenance suggestion message 301. Database operation and maintenance suggestion message 301 includes the text "Please increase the memory of the database instance" and the operation and maintenance control "One-click operation and maintenance." The user clicks the operation and maintenance control "One-click operation and maintenance." In response to the click, the terminal generates and sends an API request for the API interface. After receiving the API request, the service providing the API interface processes the API request and returns the processing result to the terminal. Based on the processing result, the terminal displays the processing result 302 as an instant message on the chat interface. In this embodiment, users only need to trigger operations on the operation and maintenance controls to complete the operation and maintenance of the database instance, which is simple. To improve the accuracy of the large language model in locating the root cause of database problems, database documents used for root cause location can be provided to the large language model. Specifically, the above method may also include:
[0013] 207. Based on the database problem, query for database documents matching the database problem. The database documents may include experience in diagnosing database anomalies. Exemplarily, the database documents may include the database problem and at least one root cause that may have caused the problem. Based on the database problem, query the vector database for database documents matching the database problem. The vector database contains multiple database documents. These database documents can be understood as user-oriented database help documents. To facilitate indexing, the database documents may be segmented to obtain keywords; and a vectorized index of the database documents may be constructed based on the keyword word vectors. Subsequently, the database problem may be vectorized to obtain a database problem vector; the database problem vector may be matched with the vectorized index of the database documents in the vector database to obtain database documents matching the database problem vector. The "constructing prompt words based on the database problem, the current status, and the historical operation and maintenance case data" in 203 above may include:
[0014] 2031. Construct a prompt word based on the database issue, the current status, the historical operation and maintenance case data, and the database document. Exemplarily, the database issue, the current status, the historical operation and maintenance case data, and the database document may be added to corresponding positions in a prompt word template to obtain a prompt word. Optionally, the above method may further include:
[0015] 208. Input the database state sequence within a preset time period into an anomaly detection and prediction algorithm based on time series analysis to obtain a prediction result. The preset time period can end at the current time, and its duration can be set according to actual needs, for example, half an hour. The prediction result is used to predict whether the database will experience anomalies in the future time period. Time series analysis is a method for analyzing time-related data. In anomaly detection and prediction, time series analysis can be used to establish a time model and determine whether an abnormal event has occurred by comparing the difference between actual observations and model predictions. Accordingly, the step of "constructing a prompt word based on the database problem, the current state, and the historical operation and maintenance case data" in 203 above can be implemented using the following steps: constructing a prompt word based on the database problem, the current state, the historical operation and maintenance case data, and the prediction result. Exemplarily, the database problem, the current state, the historical operation and maintenance case data, and the prediction result can be added to corresponding positions in a prompt word template to obtain a prompt word. In this embodiment, more reasoning basis is added to the large language model, thereby improving the reasoning accuracy of the large language model. In another example, a prompt word can be constructed based on the database question, the current status, the historical operation and maintenance case data, the database document, and the prediction result. Exemplarily, the database question, the current status, the historical operation and maintenance case data, the database document, and the prediction result can be added to the corresponding positions of a prompt word template to obtain a prompt word. Optionally, the above method may further include:
[0016] 209. Obtain feedback information from the user regarding the database operation and maintenance suggestion.
[0017] 210. Determine whether the database operation and maintenance suggestion is effective according to the feedback information.
[0018] 211. When the database operation and maintenance suggestion is valid, training samples for fine-tuning the large language model are generated based on the database problem, the current status, and the database operation and maintenance suggestion. In the above 209, in one example, after performing the corresponding operation and maintenance operation according to the database operation and maintenance suggestion, the user can provide feedback on the database operation and maintenance suggestion. Exemplarily, after performing the corresponding operation and maintenance operation according to the database operation and maintenance suggestion, the server notifies the user's terminal to display a prompt message prompting the user to provide feedback on the database operation and maintenance suggestion. For example, the prompt message can be displayed as an instant message in the chat interface with the robot; the user can enter feedback on the database operation and maintenance suggestion through the chat interface. Exemplarily, the user's feedback on the database operation and maintenance suggestion can be either valid or invalid. Using valid database operation and maintenance cases to fine-tune the large language model helps improve the reasoning accuracy of the large language model. FIG4 shows a flow chart of the database management method provided by an embodiment of the present disclosure. The execution subject of the method can be a terminal, specifically, the front-end application of FIG1 . As shown in FIG4 ,
[0019] 401. Display the interactive interface.
[0020] 402. In response to a user inputting a database problem on the interactive interface, displaying a database operation and maintenance suggestion message for the database problem on the interactive interface. The database operation and maintenance suggestion message is generated based on a database suggestion provided by a trained large language model for the database problem; the database operation and maintenance suggestion includes: the name of an API interface required for operation and maintenance, and parameters required for calling the API interface; and the database operation and maintenance suggestion message includes an operation and maintenance control.
[0021] 403. In response to the user triggering the operation and maintenance control, an API request for the API interface is generated and sent. Exemplarily, the interactive interface can be a chat interface with the robot. It should be noted that the embodiments of this disclosure do not specifically limit the interactive interface; any interface that supports user input of database issues and displays database operation and maintenance suggestion messages will suffice. Any details not fully described in steps 401 through 403 can be found in the corresponding sections of the aforementioned embodiments and are not further elaborated here. In the technical solution provided by the embodiments of this disclosure, users can obtain specific operational suggestions for resolving database issues by simply entering a database issue in the interactive interface. Furthermore, users can resolve database issues simply by triggering the operation and maintenance control in the interactive interface. This demonstrates that the technical solution provided by the embodiments of this disclosure can more intelligently and quickly resolve database issues. Optionally, the process for determining the data operation and maintenance suggestions can be found in the corresponding sections of the aforementioned embodiments and are not further elaborated here. It should be noted that any details not fully described in the steps of the method provided by the embodiments of this disclosure can be found in the corresponding sections of the aforementioned embodiments and are not further elaborated here. In addition to the aforementioned steps, the method provided in the embodiments of the present disclosure may also include some or all of the other steps in the aforementioned embodiments. For details, please refer to the corresponding contents of the aforementioned embodiments and will not be repeated here. In summary, the technical solutions provided by the embodiments of the present disclosure organically combine the anomaly detection and alerting, root cause analysis and location, and automated operation and maintenance solution capabilities of database operation and maintenance services with a large language model, thereby improving database operation and maintenance efficiency. It integrates the functions of database operation and maintenance services with database documentation and real-world case experience. Leveraging the capabilities of the large language model, it provides users with on-demand request and operation capabilities. The large language model uses reasoning to analyze user requests and determine user intent, changing the previous situation of fragmented functions and documentation, making it easier for users to find the information they need and providing proactive information output. Based on user question and answer data and user case data, it generates domain knowledge that the large language model can rely on to construct prompt words. Furthermore, using user case data, it forms a closed loop of intelligent diagnostic capabilities: event detection -> root cause analysis -> case accumulation -> model training -> knowledge accumulation and accumulation -> intelligent diagnosis. The technical solutions provided by the embodiments of the present disclosure can achieve the following technical effects:
[0022] 1. This system has achieved process innovation based on natural language interaction, introducing LLM into real-world large-scale database scenarios. A vector database incorporates database scenario operation and maintenance knowledge, and prompt templates assist LLM understanding and build a database domain knowledge vector database. LLM is used to diagnose and attribute database anomalies, directly transitioning from problem location to specific actions. This not only helps users analyze the root cause of anomalies but also enables them to directly use the operation and maintenance functions provided by the database operation and maintenance service through natural conversation to resolve anomalies.
[0023] 2. Improved database operation and maintenance efficiency, decoupling database operation and maintenance efficiency from users' proficiency in using database operation and maintenance functions, helping users to stop losses in time when database anomalies occur.
[0024] 3. Through the accumulation of abnormal cases in the database, the model answers are made more accurate, covering a wider range of intelligent diagnosis scenarios while avoiding illusions in the model answers.
[0025] 4. It enables distributed deployment of LLM models, enabling rapid deployment and expansion based on load. It also enables pluggable model services, enabling decentralized communication between different functional model deployment services. Figure 5 shows a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. As shown in Figure 5, the electronic device includes a memory 1101 and a processor 1102. Memory 1101 can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), electrically 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 memory 1101 is used to store programs; the processor 1102, coupled to the memory 1101, is used to execute the programs stored in the memory 1101 to implement the methods provided in the above-mentioned method embodiments. Furthermore, as shown in FIG5 , the electronic device also includes other components, such as a communication component 1103, a display 1104, a power supply component 1105, and an audio component 1106. FIG5 only schematically illustrates some components, and does not mean that the electronic device only includes the components shown in FIG5 . Accordingly, embodiments of the present disclosure also provide a computer-readable storage medium storing a computer program. When executed by a computer, the computer program can implement the steps or functions of the methods provided in the above-described method embodiments. The apparatus embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one location or distributed across multiple network units. Some or all of these modules may be selected based on actual needs to achieve the objectives of the present embodiments.A person of ordinary skill in the art can understand and implement the present invention without inventive effort. Through the above description of the embodiments, a person of ordinary skill in the art can clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a ROM (Read Only Memory) / RAM (Random Access Memory), a magnetic disk, or an optical disk, and includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or portions thereof. Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of the present disclosure, and are not intended to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art will appreciate that modifications may be made to the technical solutions described in the aforementioned embodiments, or that some of the technical features therein may be replaced with equivalents. Such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the various embodiments of the present disclosure. Industrial Applicability: The technical solutions provided by the embodiments of the present disclosure utilize the reasoning capabilities of a large language model to analyze database problems and generate database operation and maintenance recommendations, reducing the difficulty, cost, and delay for users in resolving database problems. Furthermore, in the embodiments of the present disclosure, the large language model incorporates an understanding of real-world operation and maintenance cases in its reasoning process, which helps to improve the effectiveness of the database operation and maintenance recommendations output by the large language model.
Claims
Claims 1. A database management method, comprising: Get database issues and the current status of the database; According to the current state, query historical operation and maintenance case data that matches the current state; The historical operation and maintenance case data includes: historical database status when abnormal events occurred and the operation and maintenance actions taken in response to the abnormal events; constructing prompt words based on the database problem, the current status, and the historical operation and maintenance case data; and inputting the prompt words into a trained large language model to obtain database operation and maintenance suggestions for the database problem.
2. The method according to claim 1, wherein: The database operation and maintenance suggestion includes: the interface name of the API interface required for operation and maintenance and the calling parameters required for calling the API interface.
3. The method according to claim 2, wherein: It also includes: according to the database operation and maintenance suggestion, notifying the terminal to display a database operation and maintenance suggestion message; the database operation and maintenance suggestion message includes an operation and maintenance control; wherein, the terminal generates and sends an API request for the API interface after the operation and maintenance control is triggered.
4. The method according to claim 2, wherein: Also includes: Generate and send an API request for the API interface based on the database operation and maintenance suggestion.
5. The method according to any one of claims 1 to 4, wherein: The method further includes: querying a database document matching the database problem according to the database problem; wherein the database document records database anomaly diagnosis experience; and constructing a prompt word according to the database problem, the current status, and the historical operation and maintenance case data, including: constructing a prompt word according to the database problem, the current status, the historical operation and maintenance case data, and the database document.
6. The method according to any one of claims 1 to 4, wherein: The method further includes: inputting a state sequence of the database within a preset time period into an anomaly detection and prediction algorithm based on time series analysis to obtain a prediction result; and constructing a prompt word based on the database problem, the current state, and the historical operation and maintenance case data, including: constructing a prompt word based on the database problem, the current state, the historical operation and maintenance case data, and the prediction result.
7. The method according to any one of claims 1 to 4, wherein: According to the current state, querying historical operation and maintenance case data that matches the current state includes: determining the historical operation and maintenance case data that matches the current state from the multiple historical operation and maintenance case data based on the matching between the current state and the database state recorded in each of the multiple historical operation and maintenance case data. Case data.
8. The method according to any one of claims 1 to 4, wherein: The method further includes: obtaining user feedback information regarding the database operation and maintenance suggestion; determining whether the database operation and maintenance suggestion is valid based on the feedback information; and when the database operation and maintenance suggestion is valid, generating training samples for fine-tuning the large language model based on the database problem, the current state, and the database operation and maintenance suggestion.
9. A database management method, comprising: Display the interactive interface; In response to a user inputting a database problem on the interactive interface, displaying a database operation and maintenance suggestion message for the database problem on the interactive interface; The database operation and maintenance suggestion message is generated based on the database suggestion feedback from the trained large language model for the database problem; the database operation and maintenance suggestion includes: the interface name of the API interface required for operation and maintenance and the calling parameters required to call the API interface; The database operation and maintenance suggestion message includes an operation and maintenance control; in response to the user triggering the operation and maintenance control, an API request for an API interface is generated and sent.
10. The method according to claim 9, wherein: The process of determining the database operation and maintenance recommendation includes: obtaining the database problem and the current status of the database; based on the current status, querying historical operation and maintenance case data that matches the current status; the historical operation and maintenance case data includes: the status of the database when abnormal events occurred in the past and the operation and maintenance operations taken in response to the abnormal events; constructing a prompt word based on the database problem, the current status, and the historical operation and maintenance case data; and inputting the prompt word into the large language model to obtain the database operation and maintenance recommendation output by the large language model.
11. An electronic device, comprising: A memory and a processor, wherein the memory is used to store a program; and the processor is coupled to the memory and is used to execute the program stored in the memory to implement the method according to any one of claims 1 to 10.
12. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer, can implement the method according to any one of claims 1 to 10.
13. A computer program product, comprising a computer program / instruction, which implements the method according to any one of claims 1 to 10 when executed by a processor.
Citation Information
Patent Citations
Intelligent fault processing method and device based on information system, equipment and medium
CN117234774A
Cited By
Intelligent archive storage and distribution method and system
CN121412236A
Intelligent file storage allocation method and system
CN121412236B
Cloud platform operation and maintenance system, operation and maintenance method and electronic equipment
CN121567602A
Software code exception handling method and device, equipment, medium and program product
CN121743094A
Pumping well production condition analysis method based on cue word self-adaptive generation
CN121882220A