Database management method and device and electronic equipment
By using a database management method driven by a large language model, database management tasks are processed automatically, solving the problem of low efficiency due to manual intervention in existing technologies, and achieving efficient and low-cost database management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-08
AI Technical Summary
Current database management requires a large amount of manual intervention, resulting in low efficiency and high labor costs.
A database management method based on a large language model is adopted. By acquiring the management information to be processed, a management plan is generated using a knowledge base and a target model, and database operations are executed automatically.
It improves database management efficiency, reduces labor costs, and achieves intelligent and automated database management.
Smart Images

Figure CN121996500A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a database management method, apparatus, and electronic device. Background Technology
[0002] Database management primarily encompasses user operations, maintenance operations, and operational operations. User operations support user actions such as adding, deleting, and modifying databases and tables, as well as adding new users. Maintenance operations monitor database alert configuration and optimization, handle alerts, scale the database up or down, and resolve hardware failures. Operational operations perform database governance, lineage analysis, audit log analysis, user management, connection / transaction management, and read / write management. However, most of these tasks require the intervention of relevant personnel to handle various situations, resulting in high labor costs and low efficiency. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a database management method, apparatus and electronic device to improve the efficiency of database management and reduce labor costs.
[0004] In a first aspect, embodiments of the present invention provide a database management method, the method comprising: acquiring management information to be processed for a target database; the management information to be processed includes at least one of the following: interaction information generated by a user account for the target database, alarm information corresponding to a monitoring system for the target database, and specified data generated by the target database; determining target description information based on the management information to be processed and a preset knowledge base; establishing the knowledge base based on historical management information, management operations for historical management information, and metadata of the target database; inputting the target description information into a target model, acquiring a target processing scheme output by the target model for the target description information, and performing management operations on the target database based on the target processing scheme; the target model is implemented based on a large language model.
[0005] Secondly, embodiments of the present invention provide a database management device, which is disposed on a server; the device includes: an information acquisition module, used to acquire management information to be processed for a target database; the management information to be processed includes at least one of the following: interactive information generated by a user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database; a target description information determination module, used to determine target description information based on the management information to be processed and a preset knowledge base; the knowledge base is established based on historical management information, management operations for historical management information, and metadata of the target database; a management processing module, used to input the target description information into a target model, obtain a target processing scheme output by the target model for the target description information, and perform management operations on the target database based on the target processing scheme; the target model is implemented based on a large language model.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned database management method. Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned database management method.
[0007] The embodiments of the present invention bring the following beneficial effects: The aforementioned database management method, apparatus, and electronic device acquire unprocessed management information for a target database. This unprocessed management information includes at least one of the following: interactive information generated by a user account for the target database, alarm information from the monitoring system corresponding to the target database, and specified data generated by the target database. Based on historical version data, local version data, updated version data, and configuration information, version update parameters are determined. These parameters include file update information and / or unprocessed difference data. Target description information is input into a target model, and a target processing scheme output by the target model for the target description information is obtained. Management operations are then performed on the target database based on the target processing scheme. The target model is implemented based on a large language model. This method improves database management efficiency and reduces labor costs.
[0008] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0009] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0010] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a database management method provided in an embodiment of the present invention; Figure 2 A schematic diagram of the system structure for a database management method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a knowledge base construction module provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a core module of a large model provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a management service module provided in an embodiment of the present invention; Figure 6 A schematic diagram of the structure of a database management device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] Database management tasks mainly fall into three categories: user operations, maintenance operations, and operational operations. User operations support users in adding, deleting, and modifying database data and tables, as well as adding new users to the database. Maintenance operations monitor database alarm configuration and optimization, alarm handling, scaling up and down, and hardware failure handling. Operational operations perform database governance, lineage analysis, audit log analysis, user management, connection / transaction management, and read / write management. However, more than half of these tasks are repetitive daily tasks, resulting in high labor costs and low efficiency.
[0014] Based on this, embodiments of the present invention provide a database management method, apparatus, and electronic device, which can be applied to version update scenarios.
[0015] See Figure 1 First, a database management method provided by an embodiment of the present invention will be introduced. The method includes the following steps: Step S102: Obtain the management information to be processed for the target database; the management information to be processed includes at least one of the following: interactive information generated by the user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database.
[0016] The aforementioned management information to be processed may include interactive information generated by a user account that can access the target database. This user account can be any user account, or a user with administrative privileges over the target database. Specific settings can be configured according to requirements. The interactive information can be generated based on text, images, voice, video content, etc., entered by the user account through a webpage or application interface.
[0017] The management information to be processed may also include alarm information generated by monitoring systems that monitor the operation of the target database. Alarm information can include performance-related alarms, resource usage alarms, security-related alarms, and system status alarms. Performance alarms can be generated for issues such as slow Structured Query Language (SQL), disk write latency, and abnormal connection counts. Resource usage alarms can be generated for issues such as abnormal memory usage, abnormal CPU usage, and disk usage exceeding limits. Security-related alarms can be generated for issues such as unauthorized access, data leaks, and database service unavailability due to attacks. System status alarms can be generated for issues such as database instance downtime or cluster failure, and missing or incorrectly formatted critical operation logs.
[0018] Alarm data typically includes alarm level, occurrence time, and alarm type. The alarm level distinguishes the severity of the problem; the alarm occurrence time records the specific timestamp of the anomaly, facilitating traceability and time-series analysis; the alarm type identifies the problem category, such as network latency or hardware failure. Alarm data can be parsed to determine the specific information in these categories and generate pending processing information based on this information.
[0019] The management information to be processed may also include specified data generated by the target database. In some cases, the target database has self-monitoring capabilities. The specified data mentioned above can be alarm data or anomaly log data generated by the target database itself. Specific settings can be configured according to requirements and are not limited here. Similar to the processing of alarm information, the specified data can be parsed to determine its content, thereby generating the information to be processed.
[0020] Step S104: Based on the management information to be processed and the preset knowledge base, determine the target description information; the knowledge base is established based on historical management information, management operations for historical management information, and metadata of the target database.
[0021] A knowledge base is a database or knowledge graph that stores and organizes large amounts of structured or unstructured information. These knowledge bases contain various types of information, such as facts, concepts, relationships, and rules, and are used to help artificial intelligence systems understand the world, answer questions, and make decisions. Knowledge bases typically utilize artificial intelligence technologies to classify, store, retrieve, reason about, and learn knowledge, specifically employing techniques such as natural language processing, machine learning, and deep learning.
[0022] To manage the target database, the knowledge base needs to store historical management information, management operations related to that information, and data such as table and column information. It can also be updated in real-time after these updates. The knowledge base is typically represented as a vector database. The aforementioned information can usually be converted into vector data and stored in the vector database.
[0023] After obtaining the management information to be processed, it is necessary to retrieve related data from the knowledge base. When the data in the knowledge base is stored in vector form, it is usually necessary to generate a vector corresponding to the management information to be processed, and then use this vector to search for similar vectors in the knowledge base to obtain more information about the management information to be processed. This information may include historical management information similar to the management information to be processed, as well as corresponding management operations, and may also include database table information related to the management information to be processed. After obtaining the management information to be processed and its related information, target description information can be generated for input into the target model. This target description information is often referred to as "cue words." Cue word templates can usually be preset. After obtaining the management information to be processed and its related information, target description information can be generated based on the cue word templates and this information.
[0024] Step S106: Input the target description information into the target model, obtain the target processing scheme output by the target model in response to the target description information, and perform management operations on the target database based on the target processing scheme; the target model is implemented based on a large language model.
[0025] After obtaining the target description information, it needs to be input into the target model. The target model is typically based on a Large Language Model (LLM). A Large Language Model (LLM) is a deep learning model trained on a large amount of text data, enabling it to generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language production on various topics by training on massive datasets. Common LLM models include ChatGPT, Wenxin Yiyan, Tongyi Qianwen, Newbing, and Bard. The specific LLM model selected to implement the target model depends on the specific needs and is not limited here.
[0026] Management data from other databases similar to the target database can be collected beforehand, and this data can be used to fine-tune the large language model. During the tuning process, both positive and negative samples can be used to help the large language model better learn the database management methods.
[0027] After the target description information is input into the target model, the target model can output a corresponding target processing solution based on the target description information. The target processing solution is usually in text format. Based on the target processing solution, the necessary management operations on the target database need to be determined. For example, adding or deleting data tables in the target database, suspending external access to the target database, etc., can be determined according to the actual situation.
[0028] Risk levels can be pre-set for different management operations. Management operations with a greater impact on the target database are typically assigned a higher risk level. In practice, if the solution provided by the target model requires a high-risk management operation on the target database, such as suspending its external use, a notification message can be sent to relevant personnel. The operation can then be performed on the target database only after confirmation from these personnel.
[0029] The aforementioned database management method involves acquiring pending management information for a target database. This pending management information includes at least one of the following: interactive information generated by a user account for the target database, alarm information from the monitoring system corresponding to the target database, and specified data generated by the target database. Based on the pending management information and a pre-defined knowledge base, target description information is determined. The knowledge base is established based on historical management information, management operations related to historical management information, and metadata of the target database. The target description information is input into a target model, and a target processing scheme output by the target model for the target description information is obtained. Management operations are then performed on the target database based on the target processing scheme. The target model is implemented based on a large language model. This method improves database management efficiency and reduces labor costs.
[0030] The following embodiments provide a method for determining the specific target description information based on the management information to be processed and a preset knowledge base.
[0031] In practical applications, when receiving alarm information from a monitoring system targeting a target database, the alarm information needs to be standardized to generate pending management information for the target database. Standardization processing may include priority determination and cluster analysis of the alarm information to extract more information from it.
[0032] If user account interaction information generated for the target database is received, the interaction information can be parsed to determine if it corresponds to one of a set of pre-defined management operations. If the interaction information corresponds to only one management operation, that operation can be executed directly on the target database. If the interaction information corresponds to multiple management operations, or if the management operation is unclear, the interaction information is identified as pending management information, which then needs to be processed by the larger model.
[0033] The following embodiments provide a method for determining the specific target description information based on the management information to be processed and a preset knowledge base.
[0034] In practical applications, knowledge bases typically include vector data generated based on historical management information, processing schemes for that information, and metadata from the target database. Determining the target description information first requires generating a target vector corresponding to the management information to be processed, which can be achieved using embedding techniques. Next, matching vector data corresponding to the target vector needs to be obtained from the knowledge base. This can be done using RAG techniques to search the knowledge base based on the target vector, obtaining vector data matching the target vector, and using this as the matching vector data corresponding to the target vector. Further, the target description information can be determined based on the target vector and the matching vector data.
[0035] In practical applications, a model context protocol is typically set up for large language models to unify communication between the large language model and external data sources and tools. A prompt word template can be obtained through the model context protocol corresponding to the target model; this prompt word template can be set specifically for the target model. Then, based on the target vector, matching vector data, and prompt word template, target description information is generated.
[0036] The following embodiments provide a specific method for managing a target database based on a target processing scheme.
[0037] After obtaining the target processing solution output by the target model, the solution can be parsed to determine the target management operations it provides. Typically, the risk level of each management operation can be pre-set; operations with higher risk levels generally have a greater impact on the target database. A risk threshold can be pre-set; operations with risk levels equal to or lower than this threshold can be executed directly, while higher-risk operations require approval before execution.
[0038] After determining the target management operation, it is necessary to assess whether its risk level exceeds a preset threshold. If the risk level exceeds the threshold, a work order corresponding to the operation is generated, along with its approval information. Then, the approval information is sent to a designated user account. The staff member using the designated user account can generate a confirmation instruction for the approval information. If a confirmation instruction is received, the target management operation is executed on the target database.
[0039] After executing a management operation, the corresponding log data can be retrieved, and the knowledge base can be updated based on this log data. This log data typically records pending management information corresponding to the management operation, target description information corresponding to the pending management information, and approval information for the management operation. The required information can be extracted from the log data, and then vector data can be generated based on this information. These vector data are then stored in the knowledge base to update the knowledge base.
[0040] The following embodiments provide a method for determining the specific target advertisement based on the attribute parameters of the target user and the quality parameters of multiple advertisements to be delivered.
[0041] In one specific embodiment, the above method is implemented through a knowledge base construction module, a large model core module, and a management service module, such as... Figure 2 As shown.
[0042] In this process, based on a large language model, combined with technologies such as knowledge base, embedding, vector database, and MCP, user contextual knowledge feedback is integrated to form a closed-loop management process. At the same time, it supports user interactive operation capabilities, realizes intelligent management capabilities, and improves efficiency.
[0043] The aforementioned knowledge base construction module is responsible for building a database domain knowledge system in real time. The knowledge base built through this module includes database usage syntax, daily operation and maintenance procedures, database table metadata, historical question-and-answer processing data, monitoring and alarm data, etc. The knowledge base exchanges information with other modules through the knowledge base management service. The knowledge base management service periodically collects and processes relevant information, converting it into vectors using embedding technology and storing it in the knowledge base (also known as a vector database) for vector similarity retrieval. Simultaneously, it is also responsible for collecting user interaction and feedback data within the management service, forming positive and negative samples, and storing them in the historical question-and-answer database for model optimization.
[0044] like Figure 3 As shown, the knowledge construction module is implemented based on a knowledge base management service, a historical question and answer database, a retrieval service, a metadata management service, and a vector database. The core functions of the knowledge base construction module are threefold: 1. Collect various data to build a knowledge base system and continuously improve professional domain knowledge: The historical question and answer database is used to collect relevant interaction data of management services, usually the log data corresponding to the above management operations; the metadata management service is used to collect the metadata information of the database, including database table information, column information, etc.; the knowledge base management service is used to collect alarm data and process relevant data such as "historical question and answer database" and "metadata management service".
[0045] 2. Process the data and write it to the vector database: Use Embedding vectorization technology to convert text data into vector data and write it to the vector database.
[0046] 3. Provide similarity retrieval capabilities: Based on the user's request data (equivalent to the "management information to be processed" mentioned above), retrieve knowledge data (equivalent to the "target vector data" mentioned above) that has a high degree of similarity to it.
[0047] The core module of the aforementioned large model is responsible for receiving service prompts and integrating Agent capabilities. It then invokes Model Context Protocol (MCP) related tools to obtain database-related information in real time or perform low-risk database-related operations. The Agent, also known as an AI agent, is a software entity that receives tasks, checks the environment, performs operations according to its role, and adjusts based on experience.
[0048] like Figure 4 As shown, this module includes an Agent module, a large model (equivalent to the "target model" mentioned above), a RAG module, and an MCP service. This module receives requests from the "Management Service Module," and through the Agent combined with the RAG system and MCP-related service tools, generates a complete Prompt, which is sent to the large model to obtain and execute specific action plans, such as obtaining database table information and performing low-risk database operations (queries).
[0049] The Agent is responsible for receiving requests from the "Management Service Module." Based on the user request information, it retrieves relevant knowledge base information from the RAG system and necessary tool information through the MCP service. This information is then integrated to generate a detailed Prompt, which is sent to the large model. The large model returns the execution results, and the Agent then executes the next step based on these results, either by calling the MCP service to perform related operations or by returning the relevant processing methods to the Management Service Module. The RAG service provides vectorized embedding and vector retrieval capabilities. The MCP service provides tools, resources, and Prompt templates, such as tools for executing SQL statements and obtaining table schemas. The large model provides capabilities such as natural language processing and thought chaining.
[0050] The aforementioned management service module is responsible for receiving and processing user input dialogues or alarm information. This information is then sent to the core module of the large model, enabling the core module to use vector retrieval capabilities to obtain data from the knowledge base and generate easily recognizable prompt messages for the large model. These prompts are then sent to the large model module, and relevant processing suggestions are received from the large model. Based on this feedback, the system returns the suggestions to the user or performs the necessary operations. High-risk operations (such as deleting database tables) require a work order and audit service to notify the relevant personnel for approval.
[0051] This module serves as the core external entry point, primarily supporting user interaction, alarm processing, and work order handling. It mainly comprises a web module, an information processing module, a model integration module, and an archiving module. The functions of each module are as follows: 1. The Web module is used to support user interaction and operations, such as creating and querying database tables. It supports users in querying database table lineage, auditing and other information, supports administrators in scaling up and down operations and maintenance, and can identify high-risk operations (such as deleting database tables, taking machines offline, etc.) and forward them to the work order and auditing system.
[0052] 2. The information processing module receives alarm information, standardizes it (priority judgment, cluster judgment, etc.), sends it to the model integration module, and performs further processing based on the returned results, such as sending diagnostic suggestions to the relevant personnel. It also receives work order processing information, organizes it (e.g., performs forward and reverse judgments), and sends it to the archiving module. Furthermore, it receives user interaction information and sends it to the model or other systems for processing. If the user interaction information corresponds to a specific matter, it can be directly sent to the corresponding system, such as creating a table; otherwise, it is sent to the main model for further interaction and determination. In addition, the information processing module can also receive log data, administrator operation step data, and other information.
[0053] 3. The model integration module receives information from the "Web module" and the "Information Processing module" and sends it to the knowledge base construction module. This allows the knowledge base construction module to retrieve highly relevant data, integrate it to generate a Prompt message, and send it to the "Large Model Core Module" to process the large model's returned information. It also sends relevant final data to the "Archiving Module." The relevant result data refers to the data from the receipt of the alarm information to the final processing, forming a data loop. For example, it includes information such as whether the processing solution generated by the large model was accepted and the operating methods of the on-duty personnel.
[0054] 4. The archiving module is used to archive user interaction data, alarm information processing data, result feedback data, and other information into the knowledge base construction module. This approach connects data, services, and large-scale models, forming a closed-loop database management system and intelligently supporting three core aspects of database management. Through its end-to-end closed-loop capabilities, it creates a data flywheel effect encompassing behavior, knowledge, processing, and feedback; by integrating large-scale model capabilities, internal data systems, and monitoring and alerting systems, it achieves intelligent operation and maintenance; and through knowledge bases, MCP (Multi-Channel Programming) systems, it automates routine operation and maintenance tasks. This method supports automated daily operations, automated problem diagnosis, and can be continuously expanded to support various scenarios.
[0055] In one specific embodiment, an implementation process is provided for applying database management methods to an automatic table creation scenario. This is specifically achieved through the following method: 1. The user requests the "Management Service Module" through the interactive page and enters the following management information to be processed: Please create a song table music_song_info under the music library. The table contains five fields: id bigint, namevarchar(*), c_time datatime, singer_name varchar(*), and singer_sex varchar(10). The table is partitioned by c_time at the day level.
[0056] 2. After receiving the request, the "Management Service Module" forwards it to the corresponding Agent in the "Large Model Core Module".
[0057] 3. The "Large Model Core Module," upon receiving a request, embeds the user request and retrieves matching knowledge information from the vector database via the RAG service, such as the syntax specifications for Doris table creation and supported data types. It then obtains a list of tools provided by the MCP service, sends this information to the large model, and retrieves the model's return results.
[0058] 4. Based on the information returned by the large model, identify that it is a request to create a table, determine that a work order approval is required, and send the generated SQL statement, approver, work order type and other information back to the "Management Service Module".
[0059] 5. The "Management Service Module" calls the work order service to create order information based on the returned information and returns the work order link to the user.
[0060] 6. After the user obtains approval from the relevant person in charge based on the returned work order information, the work order service will connect to the database to perform table creation operations.
[0061] 7. Once the database execution is complete and the table is created, an audit log message will be generated. This message will be sent to the "Knowledge Base Construction Module" to complete the knowledge base metadata.
[0062] In one specific embodiment, an implementation process is provided for applying database management methods to an automated alarm processing scenario. Specifically, this is achieved through the following methods: 1. Taking "sudden increase in CPU usage of database cluster nodes" as an example, after the alarm is triggered, the specific alarm information will be sent to the "management service module".
[0063] 2. After receiving the alarm information, the "Management Service Module" calls the Agent service of the "Large Model Core Module" to handle the alarm.
[0064] 3. The Alarm Handling Agent service, based on the alarm information, requests relevant processing knowledge information from the vector database from the RAG system. For example, it determines whether the problem is caused by reading or writing by querying monitoring data, checks for sudden increases in read / write activity by querying audit statistics, and combines this information with tools and prompt templates provided by the MCP service to generate a complete prompt message which is sent to the large model service. The large model service processes the message and returns the processing steps. The Agent service then processes the message according to these steps. For example, it first queries monitoring data to determine whether the problem is on a single machine or across the entire system. If it is a system-wide problem, it then calls the MCP service to query audit information and statistically analyze sudden increases in read / write activity during the problematic time period. This process is repeated until the cause is identified as a single user suddenly querying a large amount of data, or until no cause is found.
[0065] 4. Send the above diagnostic results to the "Management Service Module", and then send them to the administrator via email, SMS, or other means.
[0066] 5. After receiving the information, the administrator clicks to view it and then performs subsequent processing actions.
[0067] 6. At the same time, the entire process of the chain will generate audit information and send it to the "knowledge base construction module", which will collect and statistically analyze the relevant information into the knowledge base.
[0068] For the above method embodiments, see Figure 6 The diagram shows a database management device, the device comprising: The information acquisition module 602 is used to acquire pending management information for the target database; the pending management information includes at least one of the following: interactive information generated by the user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database; The target description information determination module 604 is used to determine the target description information based on the management information to be processed and the preset knowledge base; the knowledge base is established based on historical management information, management operations on historical management information, and metadata of the target database; The management and processing module 606 is used to input target description information into the target model, obtain the target processing scheme output by the target model in response to the target description information, and perform management operations on the target database based on the target processing scheme; the target model is implemented based on a large language model.
[0069] The aforementioned database management device acquires pending management information for a target database. This pending management information includes at least one of the following: interactive information generated by a user account for the target database, alarm information from the monitoring system corresponding to the target database, and specified data generated by the target database. Based on the pending management information and a preset knowledge base, target description information is determined. The knowledge base is established based on historical management information, management operations related to historical management information, and metadata of the target database. The target description information is input into a target model, and a target processing scheme output by the target model for the target description information is obtained. Management operations are then performed on the target database based on the target processing scheme. The target model is implemented based on a large language model. This method improves database management efficiency and reduces labor costs.
[0070] The aforementioned knowledge base includes vector data generated based on historical management information, processing schemes for historical management information, and metadata of the target database. The target description information determination module is also used to: generate target vectors corresponding to the management information to be processed; obtain matching vector data corresponding to the target vectors in the knowledge base; and determine target description information based on the target vectors and matching vector data.
[0071] The aforementioned target description information determination module is also used to: obtain prompt word templates through the model context protocol corresponding to the target model; and generate target description information based on the target vector, matching vector data, and prompt word templates.
[0072] The aforementioned device also includes a knowledge base update module, used to acquire log data corresponding to management operations and update the knowledge base based on the log data.
[0073] The aforementioned management and processing module is also used to: parse the target processing scheme and determine the target management operation; determine whether the risk level of the target management operation is higher than the preset level threshold; if so, generate a work task sheet corresponding to the target management operation and generate the approval information corresponding to the work task sheet; send the approval information to the specified user account; and if a confirmation instruction corresponding to the approval information is received, execute the target management operation on the target database.
[0074] The aforementioned information acquisition module is also used to: if it receives alarm information generated by the monitoring system for the target database, to standardize the alarm information and generate management information to be processed for the target database; the standardization process includes at least: priority judgment processing and cluster judgment processing.
[0075] The aforementioned information acquisition module is also used to: if it receives interactive information generated by a user account for a target database, determine whether the interactive information corresponds to one of a set of preset management operations; if not, determine the interactive information as management information to be processed.
[0076] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the aforementioned database management method, for example: Obtain the pending management information for the target database; the pending management information includes at least one of the following: interactive information generated by the user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database; determine the target description information based on the pending management information and the preset knowledge base; the knowledge base is established based on historical management information, management operations for historical management information, and metadata of the target database; input the target description information into the target model, obtain the target processing solution output by the target model for the target description information, and perform management operations on the target database based on the target processing solution; the target model is implemented based on a large language model.
[0077] The above methods improve the efficiency of database management and reduce labor costs.
[0078] Optionally, the aforementioned knowledge base includes vector data generated based on historical management information, processing schemes for historical management information, and metadata of the target database; the step of determining target description information based on the management information to be processed and the preset knowledge base includes: generating a target vector corresponding to the management information to be processed; obtaining matching vector data corresponding to the target vector in the knowledge base; and determining target description information based on the target vector and the matching vector data.
[0079] Optionally, the steps for determining target description information based on target vector and matching vector data include: obtaining prompt word templates through the model context protocol corresponding to the target model; and generating target description information based on the target vector, matching vector data, and prompt word templates.
[0080] Optionally, after performing management operations on the target database based on the target processing scheme, the method further includes: obtaining log data corresponding to the management operations and updating the knowledge base based on the log data.
[0081] Optionally, the above steps for managing the target database based on the target processing scheme include: parsing the target processing scheme to determine the target management operation; determining whether the risk level of the target management operation is higher than a preset level threshold; if so, generating a work order corresponding to the target management operation and generating approval information corresponding to the work order; sending approval information to a designated user account; and if a confirmation instruction corresponding to the approval information is received, performing the target management operation on the target database.
[0082] Optionally, the above steps for obtaining pending management information for the target database include: if alarm information generated by the monitoring system for the target database is received, the alarm information is standardized to generate pending management information for the target database; the standardization process includes at least priority judgment processing and cluster judgment processing.
[0083] Optionally, the above steps for obtaining management information to be processed for the target database include: if interactive information generated by a user account for the target database is received, determining whether the interactive information corresponds to one of a set of preset management operations; if not, determining the interactive information as management information to be processed.
[0084] See Figure 7 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the database management method described above.
[0085] Furthermore, Figure 7 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0086] The memory 101 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0087] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams of the invention in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method invented in conjunction with the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0088] This embodiment also provides a machine-readable storage medium that stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described database management method.
[0089] The present invention provides a database management method, apparatus, and electronic device, including a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the methods described in the preceding method embodiments, for example: Obtain the pending management information for the target database; the pending management information includes at least one of the following: interactive information generated by the user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database; determine the target description information based on the pending management information and the preset knowledge base; the knowledge base is established based on historical management information, management operations for historical management information, and metadata of the target database; input the target description information into the target model, obtain the target processing solution output by the target model for the target description information, and perform management operations on the target database based on the target processing solution; the target model is implemented based on a large language model.
[0090] The above methods improve the efficiency of database management and reduce labor costs.
[0091] Optionally, the aforementioned knowledge base includes vector data generated based on historical management information, processing schemes for historical management information, and metadata of the target database; the step of determining target description information based on the management information to be processed and the preset knowledge base includes: generating a target vector corresponding to the management information to be processed; obtaining matching vector data corresponding to the target vector in the knowledge base; and determining target description information based on the target vector and the matching vector data.
[0092] Optionally, the steps for determining target description information based on target vector and matching vector data include: obtaining prompt word templates through the model context protocol corresponding to the target model; and generating target description information based on the target vector, matching vector data, and prompt word templates.
[0093] Optionally, after performing management operations on the target database based on the target processing scheme, the method further includes: obtaining log data corresponding to the management operations and updating the knowledge base based on the log data.
[0094] Optionally, the above steps for managing the target database based on the target processing scheme include: parsing the target processing scheme to determine the target management operation; determining whether the risk level of the target management operation is higher than a preset level threshold; if so, generating a work order corresponding to the target management operation and generating approval information corresponding to the work order; sending approval information to a designated user account; and if a confirmation instruction corresponding to the approval information is received, performing the target management operation on the target database.
[0095] Optionally, the above steps for obtaining pending management information for the target database include: if alarm information generated by the monitoring system for the target database is received, the alarm information is standardized to generate pending management information for the target database; the standardization process includes at least priority judgment processing and cluster judgment processing.
[0096] Optionally, the above steps for obtaining management information to be processed for the target database include: if interactive information generated by a user account for the target database is received, determining whether the interactive information corresponds to one of a set of preset management operations; if not, determining the interactive information as management information to be processed.
[0097] The instructions included in the program code can be used to execute another method described in the preceding method embodiments, for example: The graphical user interface displays the files corresponding to the discrepancies to be processed; the files have corresponding business functions; files with the same business functions are displayed together; in response to a viewing command for a file, the file content and the discrepancies to be processed are displayed; in response to a data processing command, the processing data corresponding to the discrepancies to be processed is generated, and the processing data is sent to the server so that the server updates the local version data corresponding to the discrepancies to be processed based on the processing data.
[0098] The above methods improve the efficiency of version data updates and reduce labor costs.
[0099] Optionally, the step of displaying the file corresponding to the differential data to be processed in the graphical user interface includes: running specified software through a first process, and displaying the file corresponding to the differential data to be processed in a first interface provided by the specified software; the method further includes: recording the process identifier of the first process through a first thread, and monitoring the running status of the first process; if the first process finishes running, displaying a prompt window; the prompt window is used to prompt: update the file status of the file corresponding to the differential data to be processed; the file status is used to indicate whether the file has been processed.
[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0101] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0102] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0104] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A database management method, characterized in that, The method includes: Obtain pending management information for the target database; the pending management information includes at least one of the following: interaction information generated by the user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database; Based on the management information to be processed and the preset knowledge base, target description information is determined; the knowledge base is established based on historical management information, management operations on the historical management information, and metadata of the target database; The target description information is input into the target model, and the target processing scheme output by the target model in response to the target description information is obtained. The target database is managed based on the target processing scheme. The target model is implemented based on a large language model.
2. The method according to claim 1, characterized in that, The knowledge base includes vector data generated based on historical management information, processing schemes for the historical management information, and metadata of the target database; The step of determining the target description information based on the management information to be processed and the preset knowledge base includes: Generate the target vector corresponding to the management information to be processed; Obtain the matching vector data corresponding to the target vector from the knowledge base; Based on the target vector and the matching vector data, the target description information is determined.
3. The method according to claim 2, characterized in that, The step of determining target description information based on the target vector and the matching vector data includes: The prompt word template is obtained through the model context protocol corresponding to the target model; Based on the target vector, the matching vector data, and the prompt word template, target description information is generated.
4. The method according to claim 1, characterized in that, After performing management operations on the target database based on the target processing scheme, the method further includes: Obtain the log data corresponding to the management operation, and update the knowledge base based on the log data.
5. The method according to claim 1, characterized in that, The steps for managing the target database based on the target processing scheme include: The target processing scheme is analyzed to determine the target management operations; Determine whether the risk level of the target management operation is higher than a preset risk level threshold; If so, generate a work task sheet corresponding to the target management operation, and generate the approval information corresponding to the work task sheet; Send the approval information to the designated user account. If a confirmation instruction corresponding to the approval information is received, perform the target management operation on the target database.
6. The method according to claim 1, characterized in that, The steps for obtaining pending management information for a target database include: If an alarm message is received from the monitoring system for the target database, the alarm message is standardized to generate management information to be processed for the target database; the standardization process includes at least priority judgment processing and cluster judgment processing.
7. The method according to claim 1, characterized in that, The steps for obtaining pending management information for a target database include: If interactive information generated by a user account for the target database is received, determine whether the interactive information corresponds to one of a set of preset management operations; If not, the interactive information is identified as management information to be processed.
8. A database management device, characterized in that, The device includes: The information acquisition module is used to acquire pending management information for a target database; the pending management information includes at least one of the following: interactive information generated by a user account for the target database, alarm information corresponding to the monitoring system of the target database, and specified data generated by the target database. The target description information determination module is used to determine target description information based on the management information to be processed and a preset knowledge base; the knowledge base is established based on historical management information, management operations on the historical management information, and metadata of the target database; The management and processing module is used to input the target description information into the target model, obtain the target processing scheme output by the target model in response to the target description information, and perform management operations on the target database based on the target processing scheme; the target model is implemented based on a large language model.
9. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the database management method according to any one of claims 1-7.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the database management method according to any one of claims 1-7.