Database operation and maintenance auxiliary method and device based on large model, equipment and medium
Through the database operation and maintenance assistance method based on large models, the inference ability and natural language processing ability of large models are used to solve the operation and maintenance problems of complex database systems, and the operation and maintenance efficiency and quality are improved, especially for operation and maintenance personnel with limited understanding.
Patent Information
- Application Number
- CN202510780249.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-12
AI Technical Summary
With the development of database technology, the complexity of the database system has increased, the database operation and maintenance is difficult, and the manual analysis and processing process is lengthy and prone to errors. Especially for operation and maintenance personnel with limited understanding, it leads to a decrease in operation and maintenance efficiency and quality.
The database operation and maintenance assistance method based on the big model is used to determine the initial demand image information through user input, operation and maintenance scenarios and input paths and user intention identification rules, and obtain supplementary data from the information supplement database, generate target prompts and enter the big model, and use the inference ability and natural language processing ability of the big model to feedback the services required by the user.
It improves the efficiency and quality of database operation and maintenance, helps operation and maintenance personnel with limited depth to successfully complete database deployment and operation status management, and reduces the difficulty of operation and maintenance.
Smart Images

Figure CN120336292A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of large language models, and particularly relates to a database operation and maintenance assistance method, device, equipment and medium based on a large model. Background Art
[0002] Database operation and maintenance can ensure the stable, efficient and secure operation of the database system. It requires operation and maintenance personnel to manually operate and judge according to experience to handle problems such as faults, data recovery and performance bottlenecks. However, with the continuous development of database technology, the complexity of the database system has been continuously deepened. The manual analysis and processing process in the database operation and maintenance process is lengthy and prone to errors. Especially for operation and maintenance personnel with limited understanding of the database deployment and running status, the database operation and maintenance is difficult, which further reduces the efficiency and quality of database operation and maintenance. Summary of the Invention
[0003] The embodiments of this application provide a database operation and maintenance assistance method, device, equipment and medium based on a large model, which can improve the efficiency and quality of database operation and maintenance.
[0004] In the first aspect, the embodiments of this application provide a database operation and maintenance assistance method based on a large model, including: determining initial demand portrait information of a user according to the user's input, a mapping relationship between a preset operation and maintenance scenario and an input path, and a user intention recognition rule, where the initial demand portrait information includes a target operation and maintenance scenario and user intention information; obtaining supplementary data matching the initial demand portrait information from an information supplementary database associated with database operation and maintenance, and generating a target prompt by combining a prompt template corresponding to the initial demand portrait information; sending the target prompt to a large model corresponding to the initial demand portrait information, and generating inference answer information to push to the user according to the output information fed back by the large model corresponding to the initial demand portrait information.
[0005] In the second aspect, the embodiments of this application provide a database operation and maintenance assistance device based on a large model, including: a user demand determination module, configured to determine initial demand portrait information of a user according to the user's input, a mapping relationship between a preset operation and maintenance scenario and an input path, and a user intention recognition rule, where the initial demand portrait information includes a target operation and maintenance scenario and user intention information; a prompt generation module, configured to obtain supplementary data matching the initial demand portrait information from an information supplementary database associated with database operation and maintenance, and generate a target prompt by combining a prompt template corresponding to the initial demand portrait information; an information push module, configured to send the target prompt to a large model corresponding to the initial demand portrait information, and generate inference answer information to push to the user according to the output information fed back by the large model corresponding to the initial demand portrait information.
[0006] In a third aspect, an embodiment of the present application provides a database operation and maintenance assistance device based on a large model, including: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the database operation and maintenance assistance method based on the large model in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a database operation and maintenance assistance system based on a large model, including: a database cloud platform for executing the database operation and maintenance assistance method based on the large model in the first aspect; a large model subsystem communicatively connected to the database cloud platform for receiving a target prompt sent by the database cloud platform and obtaining output information according to the target prompt to feedback to the database cloud platform.
[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium with computer program instructions stored thereon. When the computer program instructions are executed by a processor, they implement the database operation and maintenance assistance method based on the large model in the first aspect.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the database operation and maintenance assistance method based on the large model in the first aspect.
[0010] An embodiment of the present application provides a database operation and maintenance assistance method, device, equipment, and medium based on a large model. It can determine the initial demand portrait information that can represent the user's needs according to the user's input, the mapping relationship between the operation and maintenance scenario and the input path, and the user intention recognition rule. Obtain supplementary data that matches the user's needs from the information supplementary database. The supplementary data can depict the user's needs. Fill the supplementary data into the prompt template corresponding to the initial demand portrait to generate a target prompt. The target prompt can gather professional information on database operation and maintenance and reflect more complete user needs in a structured, comprehensive, and detailed manner. When the target prompt is input into the large model, the reasoning ability and natural language processing ability of the large model can be utilized to feedback the service required by the user and assist the user in database operation and maintenance. Even if the user has a limited understanding of the database deployment and running status, they can smoothly and accurately achieve database operation and maintenance with the assistance, improving the efficiency and quality of database operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0012] Figure 1 It is a flowchart of the database operation and maintenance assistance method based on a large model provided by an embodiment of the present application; Figure 2 A flowchart of an example for extracting database table names provided by an embodiment of the present application; Figure 3 A schematic diagram of an example for adjusting the weight parameters of a large model provided by an embodiment of the present application; Figure 4 A schematic diagram of an example for a database operation and maintenance assistance system based on a large model provided by an embodiment of the present application; Figure 5 A flowchart of an example for constructing an operation and maintenance scenario provided by an embodiment of the present application; Figure 6 A flowchart of an example for obtaining user requirements provided by an embodiment of the present application; Figure 7 A flowchart of an example for assembling target prompt words provided by an embodiment of the present application; Figure 8 A flowchart of an example for question and answer feedback provided by an embodiment of the present application; Figure 9 A schematic diagram of the structure of a database operation and maintenance assistance device based on a large model provided by an embodiment of the present application; Figure 10 A schematic diagram of the structure of a database operation and maintenance assistance device based on a large model provided by an embodiment of the present application; Figure 11 A schematic diagram of the structure of a database operation and maintenance assistance system based on a large model provided by an embodiment of the present application. Detailed implementation manners
[0013] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present application by showing examples of the present application. It should be noted that the acquisition, storage, use, processing, etc. of information and data in the embodiments of the present application have obtained the authorization of users or relevant institutions and comply with the relevant regulations of national laws and regulations.
[0014] Database operation and maintenance can ensure the stable, efficient, and secure operation of the database system. It requires operators to manually handle and make judgments based on experience to address issues such as faults, data recovery, and performance bottlenecks. With the rise of cloud computing technology, database cloud platforms have emerged. Database cloud platforms can provide database management services with a multi-cloud architecture and across multiple types of databases. They support containerized deployment and enable full-life cycle management of database instances from creation, monitoring, migration, backup, recovery to destruction, reducing maintenance costs while improving efficiency and resource utilization. However, with the continuous development of database technology, the complexity of database systems has been increasing. For example, a database cloud platform can manage dozens of databases and hundreds of thousands of instances. There is a wide variety of database types and a large number of instances, and the database versions are constantly evolving, increasing the difficulty of database operation and maintenance. In this context, the manual analysis and processing in the database operation and maintenance process are time-consuming and error-prone. Especially for operators with limited understanding of the database deployment and running status, the difficulty of database operation and maintenance is relatively high, further reducing the efficiency and accuracy of database operation and maintenance.
[0015] This application provides a large model-based database operation and maintenance assistance method, device, equipment, system, medium, and program product. It can integrate the operation and maintenance scenario-based large model into the database cloud platform and utilize the inference ability and natural language processing ability of the large model to solve technical problems in database operation and maintenance, provide multi-scenario and multi-dimensional technical support for database operation and maintenance, assist in database operation and maintenance, reduce the difficulty of database operation and maintenance, enable operators with limited understanding of the database deployment and running status to complete database operation and maintenance efficiently and with high quality, and improve the efficiency and quality of database operation and maintenance.
[0016] It should be noted that the large model in the embodiments of this application is short for large language model and will not be elaborated further hereinafter. The large model-based database operation and maintenance assistance method, device, equipment, system, and medium provided by this application will be described separately below.
[0017] This application provides a large model-based database operation and maintenance assistance method, which can be used in the database operation and maintenance scenario. The databases in the database operation and maintenance scenario can be uniformly managed by the database cloud platform. This large model-based database operation and maintenance assistance method can be specifically executed by the database cloud platform, and the database cloud platform can be implemented as a large model-based database operation and maintenance assistance device, equipment, system, etc., which is not limited herein. Figure 1 It is a flowchart of the large model-based database operation and maintenance assistance method provided by an embodiment of this application. As Figure 1 shown, this large model-based database operation and maintenance assistance method includes steps S101 to S103.
[0018] In step S101, according to the user's input, the mapping relationship between the preset operation and maintenance scenarios and the input path, and the user intention recognition rules, the initial requirement portrait information of the user is determined.
[0019] The operation and maintenance scenarios represent the specific scenario types of database operation and maintenance, and can be preset according to one or more of the following information: the architecture of the database cloud platform, the historical data of various database operations and maintenance in different historical periods, and the historical operation and maintenance knowledge information of various database operations and maintenance. The historical operation and maintenance knowledge information of database operation and maintenance may include, but is not limited to, database operation and maintenance manuals, database product guides, database troubleshooting guides, expert experience summaries, etc. An operation and maintenance knowledge base can be constructed based on the historical operation and maintenance knowledge information of database operation and maintenance. For example, the historical operation and maintenance knowledge information of database operation and maintenance can be processed such as data extraction and vectorization to obtain data with a unified structure, thereby constructing an operation and maintenance knowledge base. The operation and maintenance knowledge base can also provide information support for generating target prompt messages in subsequent steps in the embodiments of the present application. Problems in the process of database operation and maintenance can be statistically analyzed and summarized according to the architecture of the database cloud platform, the historical data of various database operations and maintenance in different historical periods, and the historical operation and maintenance knowledge information of various database operations and maintenance, so as to obtain various operation and maintenance scenarios. The types and quantities of operation and maintenance scenarios are not limited here and can be set according to specific requirements. For example, the operation and maintenance scenarios may include, but are not limited to, three major categories: explanation scenarios, optimization scenarios, and error correction scenarios. The above three major categories of operation and maintenance scenarios can be further classified in detail. For example, the operation and maintenance scenarios may include, but are not limited to, knowledge Q&A scenarios, Structured Query Language (SQL) translation scenarios, parameter explanation scenarios, permission explanation scenarios, SQL optimization scenarios, configuration optimization scenarios, slow log optimization scenarios, configuration verification scenarios, and fault diagnosis and processing scenarios, etc. Different operation and maintenance scenarios can correspond to different large models, and the large models corresponding to the operation and maintenance scenarios are specialized in these operation and maintenance scenarios. The large models corresponding to the operation and maintenance scenarios can be obtained by training the original large model based on the historical data and historical operation and maintenance knowledge information of the databases under these operation and maintenance scenarios and adjusting the weight parameters of the large model. For example, based on the historical data and historical operation and maintenance knowledge information of the databases under the operation and maintenance scenarios, methods such as supervised learning can be used to adjust the weight parameters of the original large model to obtain the large models corresponding to the operation and maintenance scenarios. The large models corresponding to the operation and maintenance scenarios can master domain-related terms, operation steps, excellent practice methods, etc. under these operation and maintenance scenarios. Processing using the corresponding large models under the operation and maintenance scenarios can further improve the quality of database operation and maintenance.
[0020] The input of the user can specifically implement the interaction between the user and the human-computer interaction interface. The input of the user can include, but is not limited to, input operations such as page selection, function area selection, button clicking, icon clicking, text input in the input box, file upload, etc. on the human-computer interaction interface. If the input of the user includes file upload, the file format uploaded is not limited here. For example, the file can be in text format, picture format, video format, voice format, etc., which is not limited here. If the input of the user includes multi-modal data such as text format, picture format, video format, voice format, etc., the multi-modal data can be respectively identified, analyzed and other processed. If an abnormality occurs in the identification, a prompt message can be fed back to the user to guide the user to re-enter. The human-computer interaction interface can pre-integrate the operation and maintenance scenarios with the architecture of the database cloud platform, and combine the existing management functions of the database cloud platform to distribute the positions of the functions corresponding to each operation and maintenance scenario on the human-computer interaction interface, so as to facilitate the user to quickly enter the usage state and reduce the difficulty of the user in performing database operation and maintenance. For example, controls such as buttons, icons, and input boxes corresponding to the knowledge Q&A scenario can be set on the home page of the cloud platform database, controls such as buttons, icons, and input boxes corresponding to the parameter explanation scenario can be set on the parameter management page of the cloud platform database, controls such as buttons, icons, and input boxes corresponding to the configuration verification scenario can be set on the configuration management page of the cloud platform database, and controls such as buttons, icons, and input boxes corresponding to the fault diagnosis and processing scenario can be set on the alarm management page of the cloud platform database. The user can reflect their own needs through the input of the human-computer interaction interface. The input of the user can include a single input or a series of continuous inputs. The input of the user can form an input path, and the input path is the path formed by the interaction information corresponding to the input of the user, which can explicitly or implicitly reflect the needs of the user. The mapping relationship between the operation and maintenance scenario and the input path can be preset, so that the operation and maintenance scenario indicated by the input path can be obtained when the input path is known.
[0021] The initial demand portrait information can characterize the user's demand for database operation and maintenance, and can be determined according to the user's input, the preset mapping relationship and the user intention recognition rule. The initial demand portrait information can include, but is not limited to, the target operation and maintenance scenario and the user intention information. In some examples, the initial demand portrait information can also include the basic information of the database operated and maintained by the user and other information that can be extended according to the basic information. The database operated and maintained by the user can specifically be an instance database. The basic information can include, but is not limited to, information that can characterize the instance database such as database type, database architecture, database deployment container information, etc. Classification, annotation and other processing can be performed according to the basic information to obtain the feature tags of the instance database, so that the database cloud platform can more accurately determine the user intention. Other information that can be extended according to the basic information can include, but is not limited to, information that can be used as the feature tags of the database such as database query mode, database operation and maintenance target, database workload, etc.
[0022] The target operation and maintenance scenario is the operation and maintenance scenario for the database operation and maintenance of the user's current requirements, which can be determined according to the user's input and the mapping relationship. Through the mapping relationship, the user's current operation and maintenance scenario can be quickly located, so as to provide more matching information and assistance for the user's current operation and maintenance scenario in the subsequent database operation and maintenance assistance process. The user intention information represents the intention of the database operation and maintenance of the user's current requirements, that is, it represents what kind of database operation and maintenance the user wants to perform and what kind of assistance the user hopes to obtain. The user intention information can be determined according to the user's input and the user intention recognition rules. The user intention recognition rules are the rules used to recognize the user's intention, and the user intention information can be determined by matching the user's input with the rules for intention recognition. The user intention recognition rules can include, but are not limited to, one or more of keywords, phrases, regular expressions, logical combinations, etc. The logical combination can include multiple rules combined with logical operators such as AND, OR, etc. Through the user intention recognition rules, the user's intention can be accurately inferred, so as to effectively guide the process in the database operation and maintenance assistance process, improve the interaction efficiency, the quality of database operation and maintenance, and the user experience.
[0023] In step S102, supplementary data matching the initial requirement portrait information is obtained from the information supplementary database associated with the database operation and maintenance, and a target prompt is generated in combination with the prompt template corresponding to the initial requirement portrait information.
[0024] The information supplementary database can provide supplementary information for the database operation and maintenance assistance based on the large model, so as to alleviate the possible "hallucination" problem of the large model when using the large model subsequently. The "hallucination" problem of the large model refers to the errors, inaccuracies or content inconsistent with reality that may occur when the large model generates answers. In some examples, the information supplementary database can include an operation and maintenance knowledge base and / or an instance database. For the specific content of the operation and maintenance knowledge base, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here. The instance database is a database storing instance data, and the object of database operation and maintenance in the embodiments of the present application includes the instance database. For example, the instance database corresponding to the transaction business can store instance data such as order data, payer data, payee data, etc.; the instance database corresponding to the user management business can store instance data such as user identifiers and user identity information. Data related to the initial requirement portrait information can be queried in the information supplementary database, and the data related to the initial requirement portrait information is used as supplementary data.
[0025] Different specific prompt templates can be set according to different user needs. The prompt templates can include, but are not limited to, reflection iteration templates, chain of thought templates, etc. If the requirements represented by the initial requirement portrait have corresponding specific prompt templates, then the specific prompt template can be determined as the prompt template corresponding to the initial requirement portrait information. A general prompt template can also be preset. If the requirements represented by the initial requirement portrait information do not have corresponding specific prompt templates, then the general prompt template is determined as the prompt template corresponding to the initial requirement portrait information. Supplementary data can be filled into the prompt template to assemble into a target prompt. The target prompt can be regarded as more comprehensive and detailed requirement portrait information. The supplementary data matching the initial requirement portrait information in the information supplement database can depict user requirements. Generating a target prompt through supplementary data can further constrain the thinking boundary of the large model, reduce the inference latency of the large model, and improve the inference accuracy of the large model.
[0026] In step S103, send the target prompt to the large model corresponding to the initial requirement portrait information, and generate an inference answer information to push to the user according to the output information fed back by the large model corresponding to the initial requirement portrait information.
[0027] Multiple large models can be pre-trained in advance. When large model assistance is needed for database operation and maintenance, select the one that best meets the user's needs from multiple large models for use. The initial requirement portrait information can include the target operation and maintenance scenario, the basic information of the instance database, and other information extended based on the basic information. The large model corresponding to the initial requirement portrait information can be jointly determined by combining the target operation and maintenance scenario, the basic information of the instance database, and other information extended based on the basic information. For example, based on the target operation and maintenance scenario, database type, database query mode, database operation and maintenance target, database workload, etc., a large model that meets the user's needs can be selected from the pre-trained multiple large models in a data-driven manner to process the target prompt; if there is no large model that meets the user's needs among the pre-trained multiple large models, then a general large model is selected to process the target prompt. In some examples, the large model can receive the target prompt through an application programming interface (API). Correspondingly, after obtaining the target prompt, a request body and Token that conform to the API format of the large model can be constructed, and after encapsulating the request body and Token, a Hyper Text Transfer Protocol (HTTP) call is initiated to transmit the encapsulated information to the large model so that the large model processes the target prompt.
[0028] In some examples, the output information fed back by the large model can be directly pushed to the user as the inference answer information. In other examples, in addition to the large model processing, the user's needs represented by the initial demand portrait information may also include other needs such as data query and performance monitoring. Other needs can create other tasks to execute and obtain the execution result information. The output information fed back by the large model and the execution result information can be integrated to obtain the inference answer information and pushed to the user. The inference answer information includes the information provided to the user to meet the user's needs. In some examples, the Server-Sent Events (EES) mechanism can be adopted, and the front end of the database cloud platform actively and asynchronously pushes the inference answer information to the user to display the inference answer information in real time.
[0029] In the embodiments of the present application, the initial demand portrait information that can represent the user's needs can be determined according to the mapping relationship between the user's input, the operation and maintenance scenario and the input path, and the user intention recognition rule. The supplementary data matching the user's needs is obtained from the information supplementary database. The supplementary data can depict the user's needs. The supplementary data is filled into the prompt template corresponding to the initial demand portrait to generate the target prompt. The target prompt can collect the professional information of database operation and maintenance, and reflect the more complete user needs with structured, comprehensive and detailed data. The target prompt is input into the large model, and the inference ability and natural language processing ability of the large model can be used to feedback the service required by the user, assist the user in database operation and maintenance. Even if the user has a limited understanding of the database deployment and running status, the database operation and maintenance can be successfully and accurately realized with the assistance, improving the efficiency and quality of database operation and maintenance.
[0030] In some embodiments, the above step S101 can be specifically refined as follows: obtaining the operation and maintenance scenario corresponding to the input path formed by the user's input in the mapping relationship as the target operation and maintenance scenario; obtaining the user intention information according to the matching result of the user's input and the user intention recognition rule; determining the target instance database according to the user's input, and obtaining the basic information of the target instance database; obtaining the initial demand portrait information according to the target operation and maintenance scenario, the user intention information and the basic information.
[0031] The operation and maintenance scenario corresponding to the input path formed by the user's input in the mapping relationship is the target operation and maintenance scenario. For example, when the user clicks the parameter management label on the home page of the cloud platform database, the cloud platform database jumps to the parameter management page. When the user clicks the button representing parameter A1 and the button representing the use of the large model on the parameter management page, the input path formed by the user's input can be parameter management label → parameter A1 button + large model button. In the mapping relationship, the operation and maintenance scenario corresponding to the input path of parameter management label → parameter A1 button + large model button is the parameter interpretation scenario, and it can be determined that the current target operation and maintenance scenario is the parameter interpretation scenario. In the scenario where the user's input is text input or file upload, if the user's input is text input, the input text can be directly obtained. If the user's input is file upload, data extraction, conversion, etc. can be performed on the uploaded file to obtain text, and the text can be analyzed to obtain the input path. For example, when the user enters "I want to query database connection problems, 'MySQL database cannot be remotely connected, and the error code is XXXX'" in the input box, the input path formed by the user's input can be database connection → cannot be remotely connected → error code XXXX. In the mapping relationship, the operation and maintenance scenario corresponding to the input path of database connection → cannot be remotely connected → error code XXXX is the fault diagnosis and processing scenario.
[0032] The number of user intention recognition rules can be multiple. One user intention recognition rule can correspond to one user intention, that is, one user intention recognition rule can correspond to one user intention information. The information to be matched used for matching with the user intention recognition rules can be obtained according to the user's input, and the information to be matched is matched with multiple user intention recognition rules one by one. If the match is successful, the user intention information corresponding to the successfully matched user intention recognition rule is determined as the user intention information in the initial demand portrait information. In some examples, word segmenters such as jieba and hanlp can be used to extract words, phrases, etc. as the information to be matched from the user's input, and the words, phrases, etc. as the information to be matched are matched with the user intention recognition rules. If the user intention recognition rule includes keywords, the matching between the user's input and the user intention recognition rule can be achieved by detecting whether the information to be matched contains the keywords. If the user intention recognition rule includes a regular expression, the matching between the user's input and the user intention recognition rule can be achieved by the matching of the information to be matched with the regular expression. If the user intention recognition rule includes a logical combination, the matching between the user's input and the user intention recognition rule can be achieved by the matching of the information to be matched with the logical combination. For example, the matching between the user's input and the user intention recognition rule can be represented by the following formula (1): (1) where is the user intention determined according to the user's input and the user intention recognition rule, and can be represented by the user intention information; , , …, are n preset user intents; , , …, are n user intent recognition rules corresponding to the above-mentioned n preset user intents; is the user input; represents a match; represents an unknown user intent; represents except , , …, other situations.
[0033] In the case where the information to be matched successfully matches multiple user intent recognition rules, the matching results of the information to be matched and multiple user intent recognition rules can not only represent whether the match is successful, but also represent the degree of matching. The user intent information corresponding to the user intent recognition rule with the highest matching degree represented by the matching result can be determined as the user intent information in the initial demand portrait information. The matching result that can represent the degree of matching can be obtained according to the priority of the information to be matched and each user intent recognition rule or the weight coefficient of the information to be matched and the matching of each user intent recognition rule, etc., which is not limited here.
[0034] The user input can indicate one or more instance databases, and the target instance database includes the instance databases indicated by the user. For the specific content of the basic information of the instance database, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here. The initial demand portrait information may further include the basic information of the target instance database and other information extended based on the basic information. For the specific content of other information, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0035] The database cloud platform may include a front-end part and a back-end part. Determining the user's initial demand portrait information can be executed by the front-end part. After determining the initial demand portrait information, the front-end part can transmit the initial demand portrait information to the back-end part. The back-end part can perform anomaly detection on the transmission of the initial demand portrait information. If an anomaly is found, it will automatically trigger a retransmission.
[0036] In some embodiments, after obtaining the initial demand portrait information, a task set may also be generated according to the initial demand portrait information, and the tasks in the task set are assigned to the corresponding task queues for processing. The task set includes at least one task. The classification of tasks can be preset, and different types of tasks can be set with different task queues. Tasks belonging to the same type are assigned to the corresponding task processing chain, so that the tasks are assigned to the corresponding task queues for asynchronous invocation in sequence, so as to implement the processing of database operation and maintenance tasks in multiple scenarios and high concurrency. The task set may include large model tasks and other tasks such as database access and performance monitoring. The task queue to which the large model task belongs can be monitored. When the task set includes large model tasks, supplementary data is obtained from the information supplement database, and combined with the prompt template corresponding to the initial demand portrait information, a target prompt is generated to send the target prompt to the large model.
[0037] In some examples, the database cloud platform can also regularly query the initiation status of each task. If the task has unconfirmed or abnormal confirmation and other situations, the task processing chain needs to resend the task and record the exception and resend record in the log for subsequent tracking and troubleshooting of the event.
[0038] In some embodiments, the information supplement database includes an operation and maintenance knowledge base and / or an instance database. In the application embodiments, the databases for operation and maintenance are basically instance databases. For the specific content of the operation and maintenance knowledge base and / or the instance database, please refer to the relevant descriptions above and will not be elaborated here. The above step S102 can be specifically refined as follows: retrieving knowledge information matching the initial demand portrait information in the operation and maintenance knowledge base as supplementary data, and / or, calling an interface to obtain instance data matching the initial demand portrait information from the instance database corresponding to the initial demand portrait information as supplementary data; filling the supplementary data into the corresponding position in the prompt template to generate a target prompt.
[0039] The initial requirement profile information may include the target operation and maintenance scenario, user intention information, basic information of the target instance database, and other information extended based on the basic information, etc. Keywords can be extracted from the initial requirement profile information to retrieve operation and maintenance knowledge information related to user requirements in the operation and maintenance knowledge base. In some examples, a first keyword extracted from the initial requirement profile information can be used to perform a first retrieval in the operation and maintenance knowledge base, and the first retrieval result data that meets the quality standard conditions is determined as supplementary data; based on the first keyword, expansion is performed to obtain a second keyword, and the second keyword is used to perform a second retrieval in the operation and maintenance database, and the second retrieval result data that meets the quality standard conditions is determined as supplementary data. The first keyword is the keyword extracted from the initial requirement profile, and the first retrieval result data includes the operation and maintenance knowledge information retrieved in the operation and maintenance knowledge base using the first keyword. After obtaining the first retrieval result data, quality detection can be performed on the first retrieval result data. The quality detection can detect the accuracy, integrity of the first retrieval result data, and the relevance between the first retrieval result data and the initial requirement profile information. The first retrieval result data that meets the quality standard conditions can be screened from the first retrieval result data. If there is first retrieval result data that meets the quality standard conditions, the first retrieval result data that meets the quality standard conditions is determined as supplementary data. The second keyword can be obtained by expanding the first keyword with synonyms, context expansion, etc. The second retrieval result data includes the operation and maintenance knowledge information retrieved in the operation and maintenance knowledge base using the second keyword. Quality detection is performed on the second retrieval result data, and the second retrieval result data that meets the quality standard conditions is screened from the second retrieval result data as supplementary data.
[0040] In some examples, instance data corresponding to the target operation and maintenance scenario can be obtained from the target instance database corresponding to the initial requirement profile information as supplementary data. For example, if the target operation and maintenance scenario includes a slow log optimization scenario, database table structure information can be obtained from the target instance database; if the target operation and maintenance scenario includes a parameter optimization scenario, historical alarm information, current resource utilization rate, etc. can be obtained from the target instance database.
[0041] In some examples, the instance data in the supplementary data includes table structure information, and the initial requirement profile information also includes the SQL statement selected by the user's input. The SQL statement in the initial requirement profile information can be parsed to generate an Abstract Syntax Tree (AST) of the SQL statement. Specifically, the JSqlParser library in Java can be used to parse the SQL statement into a syntax tree; traverse the nodes in the syntax tree, filter out the target nodes containing the database table name, and obtain the database table name in the target nodes; traverse the tables in the instance database according to the obtained database table name to obtain the table structure information as supplementary data.
[0042] For example, Figure 2 is a flowchart of an example for extracting the database table name provided by an embodiment of this application. As Figure 2 shown, after obtaining the syntax tree, the process of extracting the database table name may include steps a1 to a8.
[0043] In step a1, the SQL statement is parsed into a Statement object. Specifically, parsing tools such as the CCJSqlParserUtil tool can be used to parse the SQL statement into a Statement object.
[0044] In step a2, a Select object is filtered out from the Statement object.
[0045] In step a3, if the Select object belongs to a simple joined table query, a simple joined table query is performed. A simple joined table query can also be called non-nested subquery table name parsing. Specifically, the From node, Expression node, and Select node in the syntax tree can be parsed in sequence. The Expression node can include the Where node, Having node, Function node, etc., and the Select node can include function fields, character fields, Case fields, etc.
[0046] In step a4, if the Select object belongs to a nested subquery, each subquery is traversed. The simple joined table query in step a3 is performed on each subquery.
[0047] In step a5, it is determined whether the From node, Where node, Having node, and Function node contain nested subqueries. If they contain nested subqueries, step a3 is executed; if they do not contain nested subqueries, step a6 is executed.
[0048] In step a6, the table name in the node is obtained.
[0049] In step a7, the table name is obtained in the Select node.
[0050] In step a8, a set of table names is obtained by integrating the table names. The table names obtained in step a6 and the table names obtained in step a7 can be added to the set of table names and duplicates are removed. Subsequently, the tables in the set of table names can be traversed through the API to obtain the table structure information.
[0051] The syntax tree can accurately parse the structure of SQL statements. By decomposing the SQL statement into the various nodes of the syntax tree, the syntactic position where the table name is located can be clearly identified. For complex SQL statements such as nested subqueries, multi-table joins, and union queries, the syntax tree can be parsed layer by layer to ensure the correctness and comprehensiveness of table name extraction, avoid omissions in table name extraction, and the efficiency of database table name extraction based on the syntax tree is also higher.
[0052] In some examples, the SQL statement can be transformed into multiple subtasks that can be processed in parallel, thereby improving the efficiency of obtaining table structure information. Specifically, the SQL statement can be split into multiple subtasks according to the query logic; multiple subtasks are processed in parallel, and the table structure information corresponding to each subtask is obtained in the instance database as supplementary data. The query logic can include but is not limited to multi-table logic, subquery logic, filter condition logic, etc. For example, if the SQL statement involves a multi-table join, such as the SQL statement includes a JOIN statement, the query for each table can be used as an independent subtask; the independent subqueries in the SQL statement can be disassembled into separate statements and used as subtasks; if the part of the SQL statement that involves conditions, such as the WHERE condition, includes multiple logical branches in forms such as OR or complex combinations, it can be split according to the conditions, and the split parts are used as subtasks. Processing these obtained subtasks in parallel can quickly obtain the corresponding table structure information from the instance database, thereby improving the efficiency of obtaining the table structure information as supplementary data.
[0053] In some embodiments, when the large model processes the target prompt, it needs to obtain relevant information from the instance database, and the obtained information may include sensitive information such as user identity information and transaction information. To ensure the security of sensitive information, the sensitive information can be desensitized, and different desensitization processes can be performed according to the different sensitivity levels of the sensitive information. Specifically, when the information that the large model processing target prompt corresponding to the initial demand portrait information needs to obtain from the instance database includes first-level sensitive information, the first-level sensitive information can be replaced with secure desensitized information to obtain desensitized data; when the information that the large model processing target prompt corresponding to the initial demand portrait information needs to obtain from the instance database includes second-level sensitive information, the second-level sensitive information can be processed using the substitution masking method and / or the masking with placeholder method to obtain desensitized data; the desensitized data is transmitted to the large model corresponding to the initial demand portrait information as the output information of the feedback. Among them, the sensitivity level of the first-level sensitive information is higher than that of the second-level sensitive information. For example, the first-level sensitive information may include, but is not limited to, user identity information, bank card numbers, order numbers, etc., and the second-level sensitive information may include, but is not limited to, email addresses, merchant numbers, addresses, etc. The higher the sensitivity level of the sensitive information, the stricter the desensitization means.
[0054] For the first-level sensitive information, the entire first-level sensitive information can be replaced, such as being replaced with secure sensitive information such as random values or hash values. The desensitized data includes the secure sensitive information. The secure sensitive information will not disclose the first-level sensitive information, that is, if a user obtains the secure sensitive information, it is impossible to restore the first-level sensitive information.
[0055] For the second-level sensitive information, substitution masking and / or masking with placeholder are used, and the desensitized data includes the information processed by the substitution masking method and / or the masking with placeholder method. The masking with placeholder can be represented by the following formula (2): (2) Where, is the information after masking with placeholder; is the original information; is the masking rule, and the parts to be retained and replaced during desensitization can be defined through the masking rule; It is a masking function, which is used to desensitize the original information according to the masking rules. The masking rules may include rules for masking and desensitizing sensitive information such as telephone numbers, email addresses, user identification numbers, bank card numbers, merchant numbers, addresses, etc. For example, the masking rule corresponding to a telephone number may be to retain the first 3 digits and the last 4 digits of the telephone number, with * in the middle; the masking rule corresponding to an email address may be to retain the first character and the domain name, with * in the middle; the masking rule corresponding to a user identification number may be to retain the first 6 digits and the last 4 digits, with * in the middle; the masking rule corresponding to a bank card number may be to retain the first 6 digits and the last 4 digits, with * in the middle; the masking rule corresponding to a merchant number may be to retain the first 6 digits and the last 4 digits, with * in the middle; the masking rule corresponding to an address may be to retain the first 6 digits and the last 4 digits, with * in the middle.
[0056] The database cloud platform can parse the information to be transmitted to the large model in real time, and the information to be transmitted to the large model can be implemented with JSON data in the input stream. While desensitizing sensitive information, the database cloud platform can also perform format conversion and monitor whether there are any abnormalities in the parsing process and the conversion process. If an abnormality occurs, local exception handling is performed to avoid affecting the database operation and maintenance assistance.
[0057] By desensitizing sensitive information, it is possible to effectively mask the sensitive parts of the sensitive information while avoiding affecting the real-time interaction effect between the user and the large model.
[0058] In some embodiments, if the user is not satisfied with the inference answer information, the user can be guided to re-enter, and the content of the inference answer information can be used in the generation process of the target prompt for re-entry, so as to improve the compliance between the inference answer information and the user's needs. Specifically, when the received user feedback information indicates that the inference answer information does not meet the user's needs, an input interaction with the user can be performed again to determine the new initial demand portrait information; obtain new supplementary data that matches the new initial demand portrait information from the information supplement database; use at least part of the information in the inference answer information and / or at least part of the information in the target prompt corresponding to the inference answer information as supplementary data; according to the supplementary data, combined with the prompt template corresponding to the new initial demand portrait information, generate a new target prompt for the large model to process.
[0059] The process of interacting with the user again to determine new initial demand portrait information and obtaining supplementary data from the information supplement database is basically the same as that of determining the initial demand portrait and obtaining supplementary data from the information supplement database in the above text, and will not be elaborated again. The input interaction with the user again may include the evaluation marks of each piece of information in the inference answer information and the content in the target prompt. The evaluation marks may include the mark of meeting the demand and the mark of not meeting the demand. The inference answer information with the mark of meeting the demand and / or the inference answer information with the mark of meeting the demand can be used as positive supplementary data, and the inference answer information with the mark of not meeting the demand and / or the inference answer information with the mark of not meeting the demand can be used as negative supplementary data. The positive supplementary data and the negative supplementary data are filled into the prompt template corresponding to the new initial demand portrait information. Both the positive supplementary data and the negative supplementary data are supplementary data. The positive supplementary data instructs the large model to provide answers according to the positive supplementary data, and the negative supplementary data instructs the large model to avoid the negative supplementary data, enriching the context information from both positive and negative directions, thereby further improving the accuracy of the large model's answers.
[0060] In some embodiments, the weight parameters of the large model include incremental weight parameters and the original weight parameters of the original large model. The incremental weight parameters are obtained by training the original large model based on the operation and maintenance knowledge information in the operation and maintenance knowledge base. Here, the weight parameters, the original weight parameters, and the incremental weight parameters can all be implemented as parameter matrices. The weight parameters of the large model can be specifically implemented as the core weight parameter matrix that has the greatest impact on the model behavior in the large model. The large model can be adjusted according to the user's feedback to make it more in line with the user's needs and the output more accurate. Specifically, after receiving the user feedback information, the original weight parameters can be frozen, and the incremental weight parameters can be decomposed into two low-rank matrices; the received user feedback information is used as a reward signal to adjust the low-rank matrices; according to the original weight parameters and the new incremental weight parameters obtained based on the adjusted low-rank matrices, the updated weight parameters of the large model are obtained.
[0061] Freezing the original weight parameters means not adjusting the original weight parameters. In the embodiments of the present application, the incremental weight parameters are adjusted, and the Low-Rank Adaptation (LoRA) technology is adopted to decompose the incremental weight parameters into two low-rank matrices. The rank of the low-rank matrices is less than the rank of the incremental weight parameters. By adjusting the low-rank matrices, the update of the weight parameters of the large model is realized, accelerating the convergence of the large model and further reducing the calculation and storage costs. For example, Figure 3 is a schematic diagram of an example of adjusting the weight parameters of the large model provided by the embodiments of the present application. As Figure 3 shown, the adjustment method of the weight parameters of the large model can refer to the forward propagation of the LoRA technology. The forward propagation of the LoRA technology can be shown as the following formula (3): (3) Among them, is the feature before the weight parameter matrix of the large model, which can be realized as a d-dimensional vector feature; is the weight parameter of the large model; is the original weight parameter; is the incremental weight parameter; and are two low-rank matrices obtained by decomposition, , that is can be realized as a low-rank matrix of d×r, and the initial can be a matrix of all zeros, , that is can be realized as a low-rank matrix of r×d, and the initial can be a Gaussian random distribution matrix, where d is much smaller than r; is the feature after the middle parameter matrix of the large model.
[0062] The ranks of the two low-rank matrices obtained by decomposing the incremental weight parameter can determine the number and expression ability of the incremental weight parameter. The lower the rank of the low-rank matrix means fewer trainable parameters are required, but it may limit the adaptability of the trained large model to complex tasks; the higher the rank of the low-rank matrix means more trainable parameters are required, which can make the trained large model better fit specific tasks, but it will increase resource consumption, such as increasing computational cost and storage requirements. In the embodiments of the present application, an appropriate rank can be selected during the training of the large model to balance the model ability and the number of trainable parameters. Specifically, based on the resource consumption information of training the original large model, a rank range can be set, and the rank in the rank range has a negative correlation with the resource consumption characterized by the resource consumption information; multiple ranks are selected as candidate ranks of the low-rank matrix within the rank range, and the weight parameters of the large model are updated respectively based on the low-rank matrices with different candidate ranks; using the validation sample set, the performance parameters of the large model with the weight parameters updated by the low-rank matrices of different candidate ranks are obtained, and the candidate rank corresponding to the large model with the highest performance characterized by the performance parameters is determined as the rank of the low-rank matrix.
[0063] The resource consumption information may include, but is not limited to, information such as the task complexity of model training, the data scale required for model training, and the hardware resources for model training. According to the resource consumption information, a rank range with resource consumption within an acceptable range can be selected. For example, the rank range can be [4, 16], that is, the minimum value of the rank range is 4, and the maximum value is 16. Multiple candidate ranks are selected within the rank range. For each candidate rank, the incremental weight parameters are decomposed into low-rank matrices with the candidate rank, and the large model is trained. The trained large model corresponding to each candidate rank is verified using a validation sample set to obtain the performance parameters of the large model. The performance parameters characterize the performance of the large model and may include, but are not limited to, parameters such as loss values and accuracies. The candidate rank corresponding to the large model with the highest performance is determined as the rank of the low-rank matrix, and the large model with the highest performance is put into use to generate inference answer information based on the output information fed back by the large model. In this way, a more appropriate low-rank matrix with a certain rank can be automatically selected during the training of the large model, thereby improving the inference accuracy of the large model.
[0064] By introducing small, low-rank weight matrices in the decisive layers of the large model, adjusting the large model based on the feedback information of users, adapting to the database operation and maintenance scenario with a small number of incremental weight coefficients, accelerating the convergence speed of the large model, and reducing the computing and storage costs of large model training.
[0065] In the embodiments of the present application, the database operation and maintenance assistance method based on a large model can be executed by a database operation and maintenance assistance system based on a large model. The database operation and maintenance assistance method based on a large model will be described below in conjunction with the database operation and maintenance assistance system based on a large model. Figure 4 The following is a schematic diagram of an example of the database operation and maintenance assistance system based on a large model provided by the embodiments of the present application. As Figure 4 shown, the database operation and maintenance assistance system based on a large model may include a scenario setting unit 21, a user requirement acquisition unit 22, a prompt word assembly unit 23, and a question and answer feedback unit 24.
[0066] The scenario setting unit 21 is used to construct and manage the operation and maintenance scenarios, set up a human-computer interaction interface, and provide an effective operation and maintenance scenario framework, laying a foundation and providing a basis for subsequent database operation and maintenance assistance. Figure 5 The following is a flowchart of an example of the operation and maintenance scenario construction provided by the embodiments of the present application. As Figure 5 shown, the operation and maintenance scenario construction process may include steps b1 to b7.
[0067] In step b1, an operation and maintenance knowledge base is constructed. The construction of the operation and maintenance knowledge base can be referred to above and will not be elaborated here. For the convenience of storage, the historical operation and maintenance knowledge information can be vectorized and stored in the operation and maintenance knowledge base in the form of vectors. The operation and maintenance knowledge information in the operation and maintenance knowledge base needs to be updated in a timely manner.
[0068] In step b2, train and adjust the large model. Based on the open-source original large model, the weight coefficients of the original large model can be adjusted by using methods such as supervised learning with the operation and maintenance knowledge base, so that the trained and adjusted large model can master the operation and maintenance knowledge information. Different large models can be trained and adjusted according to operation and maintenance scenarios, user requirements, etc., using the operation and maintenance knowledge information corresponding to different operation and maintenance scenarios and user requirements. For example, corresponding large models can be trained and adjusted for scenarios and requirements such as programming assistance, event analysis, resource orchestration, and long text generation. Multiple large models can be integrated into the database cloud platform for being called during the database operation and maintenance assistance process.
[0069] In step b3, divide the operation and maintenance scenarios. The data of different types of databases and the operation and maintenance data of different historical periods can be obtained, and various operation and maintenance scenarios can be statistically summarized. For the classification of operation and maintenance scenarios, reference can be made to Figure 5 the relevant descriptions in the above embodiments, which will not be elaborated here.
[0070] In step b4, set the prompt template. For different operation and maintenance scenarios, the prompt template can be set. Personalized vocabulary, grammar structures, and better prompt strategies can be set for the prompt template corresponding to each operation and maintenance scenario, so that the prompt template can optimize the output of the large model, make the output of the large model more accurate and targeted, and improve the reasoning efficiency and quality of the large model.
[0071] In step b5, perform functional structure integration. The realization of the operation and maintenance scenario depends on the database cloud platform. Combining the database cloud platform architecture and the various operation and maintenance scenarios obtained in step b3, the specific structure of the database cloud platform can be selected for the functional deployment of the operation and maintenance scenario, realizing the seamless connection and effective integration of the operation and maintenance scenario and the database cloud platform.
[0072] In step b6, set the human-computer interaction interface. Set the front-end human-computer interaction interface of the database cloud platform for the operation and maintenance scenario. Ensure to provide a simple, friendly, and efficient human-computer interaction interface on the premise that necessary information can be accurately transmitted. Elements such as icons, buttons, and input boxes can be used to simplify user operations, reduce the difficulty of user operations, and improve the user experience.
[0073] In step b7, manage operation permissions. The role-based access control (RBAC) strategy can be adopted to assign different usage permissions of operation and maintenance scenarios to different user roles, ensuring that users can use the functions in the operation and maintenance scenarios that match their own permissions when performing database operation and maintenance, and improving security and operation accuracy.
[0074] For the specific content of the above steps b1 to b7, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0075] The user requirement acquisition unit 22 can understand the user's operation and maintenance requirements through the objective trigger points preset by the scenario setting unit 21 and the user's subjective behaviors represented by the received user inputs, and assist the database cloud platform to efficiently transmit the user requirements to the large model to obtain more accurate answers. Figure 6 It is a flowchart of an example for obtaining user requirements provided by an embodiment of this application. As Figure 6 shown, the process of obtaining user requirements may include steps c1 to c13.
[0076] In step c1, the acquisition of user requirements is triggered. The user logs in to the database cloud platform and operates according to the requirements, triggering the process of obtaining user requirements.
[0077] In step c2, authentication is performed to determine whether the authentication is successful. According to the permission control policy set by the scenario setting unit 21, it is determined whether the user has the operation permission, so as to determine whether the authentication is successful. If the authentication fails, step c3 is executed; if the authentication is successful, step c4 is executed.
[0078] In step c3, a prompt message is sent. This prompt message is used to prompt the user to apply for permission upgrade or retry.
[0079] In step c4, interactive input is performed. The interactive input can be guided by the human-machine interaction interface preset by the scenario setting unit 21. The human-machine interaction interface can support the input of multi-modal data, such as the input of text, image, voice, etc., and the operation and maintenance scenario is configured with customized guidance.
[0080] In step c5, it is determined whether the data format of the user input conforms to the specification. This determination can be achieved by verifying the data format of the user input. If it conforms to the specification, step c6 is executed; if it does not conform to the specification, it returns to step c4.
[0081] In step c6, preliminary requirement portrait information is constructed. The front end of the database cloud platform can automatically supplement the basic information of the target instance database, and can also classify and label the basic information to set data labels for the target instance database. The database cloud platform can also assist in identifying user requirements and subsequent processing directions according to the data labels.
[0082] In step c7, the preliminary requirement portrait information is transmitted. The front end of the database cloud platform can transmit the preliminary requirement portrait information to the back end of the database cloud platform through the HTTP protocol.
[0083] In step c8, it is detected whether the transmission is successful. If the transmission is successful, step c9 is executed; if the transmission is not successful, it returns to step c7, that is, an automatic retransmission is initiated.
[0084] In step c9, the recognition and conversion of multimodal data are performed. The background of the database cloud platform can parse the incoming multimodal data to clarify the auxiliary scenario and user requirements.
[0085] In step c10, it is determined whether the recognition is normal. If the recognition is normal, step c11 is executed; if the recognition is not normal, return to step c4 to guide the user to initiate the interaction input again, and the reason for the abnormal recognition can also be fed back to the user.
[0086] In step c11, the tasks are distributed. A task set can be generated according to the initial demand portrait information, and according to the target operation and maintenance scenario, feature tags, database type, user intention information, etc. in the initial demand portrait information, the tasks in the task set are assigned to the corresponding task processing chain and stored in the corresponding task queue, waiting for asynchronous invocation to achieve multi-scenario and high-concurrency operation and maintenance auxiliary access.
[0087] In step c12, the task status is polled. The database cloud platform regularly queries the task initiation status and ensures the smooth execution of the task through the consumption confirmation and retry mechanism.
[0088] In step c13, it is determined whether the task is successfully initiated. If it is successfully initiated, the process ends; if it is not successfully initiated, return to step c11.
[0089] For the specific content of the above steps c1 to c13, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0090] The prompt word assembly unit 23 can consume the task queue through multiple threads, execute the distributed large model tasks, call the API interface to obtain information to supplement the professional context information in the database, and combine with the prompt word template that matches the user requirements to perform prompt word assembly. The assembled target prompt word can form a structured, comprehensive, and detailed user demand portrait. Figure 7 It is a flowchart of an example for assembling the target prompt word provided by the embodiment of the present application. As Figure 7 shown, the process of assembling the target prompt word may include steps d1 to d16.
[0091] In step d1, the task queue is monitored.
[0092] In step d2, it is determined whether there is a task to be consumed. The task to be consumed is the task to be processed. If there is a task to be consumed, step d3 is executed; if there is no task to be consumed, step d1 is executed.
[0093] In step d3, batch execute the tasks to be consumed. There are tasks to be consumed in the task queue, and the tasks can be batch processed in the task queue in the first-in, first-out order. The size of the thread pool can also be dynamically adjusted, so as to control the number of batch processing tasks by controlling the threads. When a certain task is processed, the consumption confirmation identifier of the task can be immediately fed back to indicate that the task has been started to be processed.
[0094] In step d4, inject the supplementary data in the operation and maintenance knowledge base. The supplementary data can be retrieved from the operation and maintenance knowledge base through the retrieval enhancement generation technology.
[0095] In step d5, judge whether the retrieval enhancement generation is abnormal. If it is abnormal, execute step d6; if it is not abnormal, execute step d7.
[0096] In step d6, perform exception handling. After performing the exception handling, relevant information can also be recorded in the log.
[0097] In step d7, judge whether the quality of the supplementary information meets the standard. It can be determined whether the quality of the supplementary information meets the standard by judging whether the retrieved result data meets the quality standard conditions. If it meets the standard, execute step d8; if it does not meet the standard, return to step d4 for secondary retrieval.
[0098] In step d8, query the supplementary data in the instance database.
[0099] In step d9, judge whether the query of the instance database is abnormal. If it is abnormal, execute step d6; if it is not abnormal, execute step d10.
[0100] In step d10, judge whether the query of the instance database is comprehensive. If it is comprehensive, execute step d11; if it is not comprehensive, return to step d8 for secondary query.
[0101] In step d11, query the prompt template. Based on the template adaptation rule engine, the corresponding prompt template can be selected according to the user's needs.
[0102] In step d12, judge whether the query of the prompt template is abnormal. If it is abnormal, execute step d6; if it is not abnormal, execute step d13.
[0103] In step d13, judge whether the corresponding prompt template is retrieved. If it is retrieved, execute step d14; if it is not retrieved, return to step d11, and a general prompt template can be adopted.
[0104] In step d14, assemble the target prompt according to the supplementary data and the prompt template.
[0105] In step d15, it is determined whether there is an abnormality in the prompt assembly. If an abnormality occurs, step d6 is executed; if no abnormality occurs, step d16 is executed.
[0106] In step d16, the operation and maintenance knowledge base is dynamically updated. For newly emerging database operation and maintenance problems, during the process of prompt assembly, the operation and maintenance knowledge information corresponding to the database operation and maintenance problems can be pushed to the operation and maintenance knowledge base to update the operation and maintenance knowledge base, so that the supplementary data used for assembling the prompts is the latest data.
[0107] For the specific content of the above steps d1 to d16, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0108] The Q&A feedback unit 24 can obtain the output of the large model from the large model, display the inference answer information to the user in real time, and can also perform operations such as secondary input interaction and large model update according to the user feedback. Through the multi-faceted communication between the user and the database cloud platform, the knowledge accumulation and skill improvement of the database cloud platform can also be promoted. Figure 8 It is a flowchart of an example of Q&A feedback provided by an embodiment of the present application. As Figure 8 shown, the Q&A feedback process may include steps e1 to e14.
[0109] In step e1, the corresponding large model is called. In the case of multiple large models, the large model corresponding to the initial demand portrait information can be called. According to characteristics such as database type, database query mode, database operation and maintenance target, and workload, the corresponding large model can be selected from multiple large models through a data-driven method.
[0110] In step e2, it is determined whether the corresponding large model is queried. If it is queried, step e3 is executed; if it is not queried, return to step e1.
[0111] In step e3, a request body is constructed for encapsulation and invocation. In order to decouple the database cloud platform from the large model and improve the flexibility and generality of database operation and maintenance, the database cloud platform can quickly access multiple types of large models. The database cloud platform can store the large model information of multiple types of large models. The large model information can include information such as model alias, model real name, and operation and maintenance knowledge base. The large model information can be stored through an SQL table. The model alias can be matched by the front end of the database cloud platform through data driving. The model real name is in one-to-one mapping with the model alias. The model real name can determine the encapsulation format of the request body, that is, Request, and the parsing type field can determine the parsing format of the response body, that is, Response. The call of the operation and maintenance knowledge base and / or the instance database and the acquisition of supplementary data can be controlled by combining relay identifiers such as model alias, operation and maintenance knowledge base, and Q&A information of the large model.
[0112] In step e4, the information is dynamically parsed, desensitized, and transformed. The database cloud platform can parse the JSON data in the input stream in real time, and perform correction, desensitization, and format conversion on sensitive information.
[0113] In step e5, it is determined whether the parsing and transformation are abnormal. If there is an abnormality, return to step e4, and local abnormality handling can be skipped to avoid affecting the overall process; if there is no abnormality, step e6 is executed.
[0114] In step e6, the stream information is pushed and displayed. The database cloud platform can push the inference answer information to the user in the form of stream information and display the inference answer information in real time on the front end of the database cloud platform.
[0115] In step e7, it is judged whether the push is abnormal. If there is an abnormality, return to step e6, and local abnormality handling can be skipped to avoid affecting the overall process; if there is no abnormality, step e8 is executed.
[0116] In step e8, the user feedback information is received.
[0117] In step e9, it is judged whether the user adopts the inference answer information. The database cloud platform can determine whether the user adopts the inference answer information according to the user feedback information. If adopted, step e10 is executed; if not adopted, step e14 is executed.
[0118] In step e10, the database operation and maintenance assistance process information is stored. The question-and-answer process between the user and the database cloud platform, the user feedback information, the processing steps, and the inference answer information can be formed into a complete historical record and stored in the corresponding database.
[0119] In step e11, it is determined whether the historical record exceeds the storage limit. If the historical record exceeds the storage limit of the database, return to step e10 for content truncation processing to ensure the integrity and effectiveness of data storage; if it does not exceed the storage limit of the database, step e12 is executed.
[0120] In step e12, a summary report is generated. The database cloud platform can regularly summarize the database operation and maintenance assistance process information and generate a summary report. The summary report can include question-and-answer information, common question answers, user feedback information, optimization results, etc., so as to provide support for database operation and maintenance analysis. The information in the summary report can also be used by the data source to perform further in-depth pre-training on the large model.
[0121] In step e13, user-customized suggestions are generated. Based on the historical interaction data of the user's database operation and maintenance assistance, personalized operation and maintenance suggestions for the user can be generated. Operation and maintenance learning resources can also be pushed to the user and a learning plan can be executed for the user, so as to improve the user's database operation and maintenance level and solve the operation and maintenance bottleneck.
[0122] In step e14, the user requirement acquisition unit 22 is called again. Calling the user requirement acquisition unit 22 again can trigger a new interaction cycle. In the new interaction cycle, the initial requirement portrait information, target prompt, inference answer information, etc. in the previous interaction cycle can also be filled into the prompt template to generate a new target prompt, enrich the context information of the target prompt, and optimize the response of the large model.
[0123] For the specific content of the above steps e1 to e14, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0124] This application also provides a database operation and maintenance assistance device based on a large model. Figure 9 As shown in the structure schematic diagram of the database operation and maintenance assistance device based on a large model provided by an embodiment of this application, Figure 9 as shown, the database operation and maintenance assistance device 200 based on a large model may include a user requirement determination module 201, a prompt generation module 202, and an information push module 203.
[0125] The user requirement determination module 201 can be used to determine the initial requirement portrait information of the user according to the user input, the mapping relationship between the preset operation and maintenance scenarios and the input path, and the user intention recognition rule. The initial requirement portrait information includes the target operation and maintenance scenario and the user intention information.
[0126] The prompt generation module 202 can be used to obtain the supplementary data matching the initial requirement portrait information from the information supplementary database associated with the database operation and maintenance, and generate the target prompt in combination with the prompt template corresponding to the initial requirement portrait information.
[0127] The information push module 203 can be used to send the target prompt to the large model corresponding to the initial requirement portrait information, and generate the inference answer information and push it to the user according to the output information fed back by the large model corresponding to the initial requirement portrait information.
[0128] In some embodiments, the user requirement determination module 201 can specifically be used to: obtain the operation and maintenance scenario corresponding to the input path formed by the user input in the mapping relationship as the target operation and maintenance scenario; obtain the user intention information according to the matching result between the user input and the user intention recognition rule; determine the target instance database according to the user input, and obtain the basic information of the target instance database; obtain the initial requirement portrait information according to the target operation and maintenance scenario, the user intention information, and the basic information.
[0129] In some embodiments, the user requirement determination module 201 can also be used to: generate a task set according to the initial requirement portrait information, and allocate the tasks in the task set to the corresponding task queues for processing.
[0130] The prompt generation module 202 can be specifically configured to: when the task set includes large model tasks, obtain supplementary data from the information supplement database, and generate a target prompt in combination with the prompt template corresponding to the initial demand portrait information.
[0131] In some embodiments, the information supplement database includes an operation and maintenance knowledge base and / or an instance database. The prompt generation module 202 can be specifically configured to: retrieve knowledge information matching the initial demand portrait information in the operation and maintenance knowledge base as supplementary data, and / or, call an interface to obtain instance data matching the initial demand portrait information from the instance database corresponding to the initial demand portrait information as supplementary data; fill the supplementary data into the corresponding positions in the prompt template to generate a target prompt.
[0132] In some examples, the prompt generation module 202 can be specifically configured to: perform a first retrieval in the operation and maintenance knowledge base using the first keyword extracted from the initial demand portrait information, and determine the first retrieval result data that meets the quality standard conditions as supplementary data; expand based on the first keyword to obtain a second keyword, and perform a second retrieval in the operation and maintenance database using the second keyword, and determine the second retrieval result data that meets the quality standard conditions as supplementary data.
[0133] In some examples, the instance data in the supplementary data includes table structure information, and the initial demand portrait information further includes an SQL statement selected by the user's input. The prompt generation module 202 can be specifically configured to: parse the SQL statement in the initial demand portrait information to generate a syntax tree of the SQL statement; traverse the nodes in the syntax tree, filter out the target nodes containing the database table name, and obtain the database table name in the target nodes; traverse the tables in the instance database according to the obtained database table name to obtain the table structure information as supplementary data.
[0134] In some examples, the instance data in the supplementary data includes table structure information, and the initial demand portrait information further includes an SQL statement selected by the user's input. The prompt generation module 202 can be specifically configured to: split the SQL statement into multiple subtasks according to the query logic; process the multiple subtasks in parallel to obtain the table structure information corresponding to each subtask in the instance database as supplementary data.
[0135] In some embodiments, the information push module 203 may also be used to: when the information that the large model needs to obtain from the instance database for processing the target prompt corresponding to the initial demand portrait information includes first-level sensitive information, replace the first-level sensitive information with security desensitized information to obtain desensitized data; when the information that the large model needs to obtain from the instance database for processing the target prompt corresponding to the initial demand portrait information includes second-level sensitive information, process the second-level sensitive information by using the replacement desensitization method and / or the masking desensitization method to obtain desensitized data; and transmit the desensitized data to the large model corresponding to the initial demand portrait information as the output information of the feedback.
[0136] In some embodiments, the user demand determination module 201 may also be used to: when the received user feedback information indicates that the inferred answer information does not meet the user's needs, interact with the user again for input to determine new initial demand portrait information.
[0137] The prompt generation module 202 may also be used to: obtain new supplementary data that matches the new initial demand portrait information from the information supplementary database; use at least part of the information in the inferred answer information and / or at least part of the target prompt corresponding to the inferred answer information as supplementary data; and generate a new target prompt for the large model to process according to the supplementary data in combination with the prompt template corresponding to the new initial demand portrait information.
[0138] In some embodiments, the weight parameters of the large model include incremental weight parameters and the original weight parameters of the original large model, and the incremental weight parameters are obtained by training the original large model based on the operation and maintenance knowledge information in the operation and maintenance knowledge base. The database operation and maintenance assistance device 200 based on the large model may further include a large model adjustment module. The large model adjustment module may be used to: freeze the original weight parameters, decompose the incremental weight parameters into two low-rank matrices, where the dimensions of the low-rank matrices are smaller than the dimensions of the incremental weight parameters; use the received user feedback information as a reward signal to adjust the low-rank matrices; and obtain the updated weight parameters of the large model according to the original weight parameters and the new incremental weight parameters obtained based on the adjusted low-rank matrices.
[0139] In some examples, the large model adjustment module may also be used to: set a rank range based on the resource consumption information for training the original large model, where the rank in the rank range has a negative correlation with the resource consumption characterized by the resource consumption information; select multiple ranks within the rank range as candidate ranks for the low-rank matrices and update the weight parameters of the large model based on the low-rank matrices with different candidate ranks respectively; use the validation sample set to obtain the performance parameters of the large model with the weight parameters updated by the low-rank matrices corresponding to different candidate ranks, and determine the rank corresponding to the candidate rank with the highest performance characterized by the performance parameters as the rank of the low-rank matrix.
[0140] It should be noted that the database operation and maintenance assistance device 200 based on the large model corresponds to the above-mentioned database operation and maintenance assistance method based on the large model. All implementation manners in the above method embodiments are applicable to the embodiments of this device and can achieve the same technical effects.
[0141] This application also provides a database operation and maintenance assistance device based on the large model. Figure 10 As shown in the structure schematic diagram of the database operation and maintenance assistance device based on the large model provided in an embodiment of this application, Figure 10 as shown, the database operation and maintenance assistance device 300 based on the large model includes a memory 301, a processor 302, and a computer program stored on the memory 301 and operable on the processor 302.
[0142] In some examples, the above-mentioned processor 302 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0143] The memory 301 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the database operation and maintenance assistance method based on the large model in the embodiments of this application.
[0144] The processor 302 runs the computer program corresponding to the executable program code by reading the executable program code stored in the memory 301 to implement the database operation and maintenance assistance method in the above embodiments.
[0145] In some examples, the database operation and maintenance assistance device 300 based on the large model may further include a communication interface 303 and a bus 304. Among them, as Figure 10 shown, the memory 301, the processor 302, and the communication interface 303 are connected through the bus 304 to complete mutual communication.
[0146] The communication interface 303 is mainly used to implement communication between each module, device, unit, and / or device in the embodiments of this application. The input device and / or output device may also be accessed through the communication interface 303.
[0147] The bus 304 includes hardware, software, or both, and couples the components of the large model-based database operation and maintenance assistance device 300 to each other. By way of example and not limitation, the bus 304 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 304 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0148] The present application also provides a large model-based database operation and maintenance assistance system. Figure 11 FIG. is a schematic structural diagram of a large model-based database operation and maintenance assistance system provided by an embodiment of the present application, as Figure 11 shown, the large model-based database operation and maintenance assistance system includes a database cloud platform 41 and a large model subsystem 42.
[0149] The database cloud platform 41 can host and manage multiple instance databases, and the number and types of instance databases in the database cloud platform 41 are not limited herein. The database cloud platform can be used to execute the large model-based database operation and maintenance assistance method of the above embodiments, and can achieve the same technical effects. To avoid repetition, it will not be described in detail here.
[0150] The large model subsystem 42 can provide large models, which may include the original large model and the large model trained using the operation and maintenance knowledge base. The large model subsystem 42 can provide multiple large models to handle various operation and maintenance scenarios, and the number and types of the large models provided by the large model subsystem 42 are not limited herein. The large model subsystem 42 is communicatively connected to the database cloud platform 41, and is configured to receive the target prompt sent by the database cloud platform 41 and obtain the output information according to the target prompt to feedback to the database cloud platform 41.
[0151] For the specific content of the database cloud platform 41 and the large model subsystem 42, reference may be made to the relevant descriptions in the above embodiments, and details are not repeated herein.
[0152] The present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for assisting database operation and maintenance based on a large model in the above embodiments can be implemented, and the same technical effects can be achieved. To avoid repetition, details are not described herein. Among them, the above computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc., which are not limited herein.
[0153] The present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for assisting database operation and maintenance based on a large model in the above embodiments can be implemented, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0154] It should be clear that the various embodiments in this specification are described in a progressive manner. For the parts that are the same or similar among the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. For the device embodiments, equipment embodiments, system embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can refer to the description part of the method embodiments. The present application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application. And, for the sake of brevity, the detailed descriptions of known method technologies are omitted herein.
[0155] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing apparatus enable the implementation of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions.
[0156] Those skilled in the art should be able to understand that the above embodiments are all exemplary rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Those skilled in the art should be able to understand and implement other variations of the disclosed embodiments based on the study of the drawings, the description, and the claims. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to label names rather than to indicate any particular order. Any reference signs in the claims should not be construed as limiting the scope of protection. The functions of multiple parts in the claims can be implemented by a single hardware or software module. The fact that certain technical features appear in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A database operation and maintenance assistance method based on a large model, characterized in that, Including: Determine the initial demand portrait information of the user according to the mapping relationship between the user's input, the preset operation and maintenance scenarios and input paths, and the user intention recognition rule, where the initial demand portrait information includes the target operation and maintenance scenario and the user intention information; Obtain supplementary data matching the initial demand portrait information from the information supplementary database associated with database operation and maintenance, and generate a target prompt by combining with the prompt template corresponding to the initial demand portrait information; Send the target prompt to the large model corresponding to the initial demand portrait information, and generate an inference answer information according to the output information fed back by the large model corresponding to the initial demand portrait information, and push it to the user; Among them, the determining the initial demand portrait information of the user according to the mapping relationship between the user's input, the preset operation and maintenance scenarios and input paths, and the user intention recognition rule includes: Obtain the operation and maintenance scenario corresponding to the input path formed by the user's input in the mapping relationship as the target operation and maintenance scenario; Obtain the user intention information according to the matching result between the user's input and the user intention recognition rule; Determine the target instance database according to the user's input, and obtain the basic information of the target instance database; Obtain the initial demand portrait information according to the target operation and maintenance scenario, the user intention information and the basic information.
2. The method according to claim 1, characterized in that, Also including: Generate a task set according to the initial demand portrait information, and allocate the tasks in the task set to the corresponding task queues for processing; The obtaining the supplementary data matching the initial demand portrait information from the information supplementary database associated with database operation and maintenance, and generating a target prompt by combining with the prompt template corresponding to the initial demand portrait information includes: In the case that the task set includes a large model task, obtain the supplementary data from the information supplementary database, and generate the target prompt by combining with the prompt template corresponding to the initial demand portrait information.
3. The method according to claim 1, wherein The information supplementary database includes an operation and maintenance knowledge base and / or an instance database; The obtaining the supplementary data matching the initial demand portrait information from the information supplementary database associated with database operation and maintenance, and generating a target prompt by combining with the prompt template corresponding to the initial demand portrait information includes: Retrieve knowledge information matching the initial demand portrait information in the operation and maintenance knowledge base as the supplementary data, and / or, call an interface to obtain instance data matching the initial demand portrait information from the instance database corresponding to the initial demand portrait information as the supplementary data; Fill the supplementary data into the corresponding position in the prompt template to generate the target prompt.
4. The method according to claim 3, wherein The retrieving the knowledge information matching the initial demand portrait information in the operation and maintenance knowledge base as the supplementary data includes: Perform a primary retrieval in the operation and maintenance knowledge base using the first keyword extracted from the initial demand portrait information, and determine the first retrieval result data meeting the quality standard conditions as the supplementary data; Expand based on the first keyword to obtain a second keyword, and use the second keyword to perform a secondary search in the operation and maintenance knowledge base. Determine the second search result data that meets the quality standard conditions as the supplementary data.
5. The method according to claim 3, characterized in that, The instance data in the supplementary data includes table structure information, and the initial demand portrait information further includes the structured query language (SQL) statement selected by the user's input. The calling interface obtains instance data that matches the initial demand portrait information from the instance database corresponding to the initial demand portrait information as the supplementary data, including: Parse the SQL statement in the initial demand portrait information to generate a syntax tree of the SQL statement. Traverse the nodes in the syntax tree, filter out the target nodes containing the database table name, and obtain the database table name in the target nodes. Traverse the tables in the instance database according to the obtained database table name to obtain the table structure information as the supplementary data.
6. The method according to claim 3, wherein The instance data in the supplementary data includes table structure information, and the initial demand portrait information further includes the structured query language (SQL) statement selected by the user's input. The calling interface obtains instance data that matches the initial demand portrait information from the instance database corresponding to the initial demand portrait information as the supplementary data, including: Split the SQL statement into multiple subtasks according to the query logic. Process the multiple subtasks in parallel to obtain the table structure information corresponding to each subtask in the instance database as the supplementary data.
7. The method according to claim 1, characterized in that, It further includes: In the case where the information that the large model corresponding to the initial demand portrait information needs to obtain from the instance database for processing the target prompt includes first-level sensitive information, replace the first-level sensitive information with security desensitized information to obtain desensitized data. In the case where the information that the large model corresponding to the initial demand portrait information needs to obtain from the instance database for processing the target prompt includes second-level sensitive information, process the second-level sensitive information using the replacement desensitization method and / or the masking desensitization method to obtain desensitized data. Transmit the desensitized data to the large model corresponding to the initial demand portrait information as the output information of the feedback.
8. The method according to claim 1, wherein It further includes: In the case where the received user feedback information indicates that the inference answer information does not meet the user's needs, interact with the user again for input to determine the new initial demand portrait information. Obtain new supplementary data that matches the new initial demand portrait information from the information supplementary database. Use at least part of the information in the inference answer information and / or at least part of the information in the target prompt corresponding to the inference answer information as the supplementary data. According to the supplementary data, combine with the prompt template corresponding to the new initial demand portrait information to generate a new target prompt for the large model to process.
9. The method according to claim 1, wherein The weight parameters of the large model include incremental weight parameters and the original weight parameters of the original large model. The incremental weight parameters are obtained by training the original large model based on the operation and maintenance knowledge information in the operation and maintenance knowledge base. The method further includes: Freeze the original weight parameters, decompose the incremental weight parameters into two low-rank matrices, where the dimensions of the low-rank matrices are smaller than the dimensions of the incremental weight parameters; Use the received user feedback information as a reward signal to adjust the low-rank matrices; Based on the original weight parameters and the new incremental weight parameters obtained based on the adjusted low-rank matrices, obtain the updated weight parameters of the large model.
10. The method according to claim 9, characterized in that, It further includes: Based on the resource consumption information for training the original large model, set a rank range, where the rank in the rank range has a negative correlation with the resource consumption characterized by the resource consumption information; Select multiple ranks within the rank range as candidate ranks for the low-rank matrices, and update the weight parameters of the large model based on the low-rank matrices with different candidate ranks respectively; Using the validation sample set, obtain the performance parameters of the large model with the weight parameters updated corresponding to the low-rank matrices with different candidate ranks, and determine the rank corresponding to the candidate rank of the large model with the highest performance characterized by the performance parameters as the rank of the low-rank matrix.
11. An auxiliary device for database operation and maintenance based on a large model, characterized in that, It includes: A user demand determination module, configured to determine the initial demand portrait information of the user according to the user's input, the mapping relationship between the preset operation and maintenance scenarios and the input path, and the user intention recognition rule, where the initial demand portrait information includes the target operation and maintenance scenario and the user intention information; A prompt generation module, configured to obtain supplementary data matching the initial demand portrait information from the information supplementary database associated with database operation and maintenance, and generate a target prompt in combination with the prompt template corresponding to the initial demand portrait information; An information push module, configured to send the target prompt to the large model corresponding to the initial demand portrait information, and generate an inference answer information to push to the user according to the output information fed back by the large model corresponding to the initial demand portrait information The user demand determination module is specifically configured to: obtain the operation and maintenance scenario corresponding to the input path formed by the user's input in the mapping relationship as the target operation and maintenance scenario; obtain the user intention information according to the matching result between the user's input and the user intention recognition rule; determine the target instance database according to the user's input, and obtain the basic information of the target instance database; obtain the initial demand portrait information according to the target operation and maintenance scenario, the user intention information and the basic information.
12. An auxiliary device for database operation and maintenance based on a large model, characterized in that, It includes: A processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the method for assisting database operation and maintenance based on a large model according to any one of claims 1 to 10.
13. A database operation and maintenance assistance system based on a large model, characterized in that, It includes: A database cloud platform, configured to execute the method for assisting database operation and maintenance based on a large model according to any one of claims 1 to 10; A large model subsystem, communicatively connected to the database cloud platform, configured to receive the target prompt sent by the database cloud platform, and obtain output information according to the target prompt and feed it back to the database cloud platform.
14. A computer-readable storage medium, characterized in that, Computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, the method for assisting database operation and maintenance based on a large model described in any one of claims 1 to 10 is implemented.
15. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by a processor, the method for assisting database operation and maintenance based on a large model described in any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Large model question and answer method, device and equipment for multi-source heterogeneous knowledge base
CN118503494A
Intelligent operation and maintenance method and device and storage medium
CN119760158A
Light emitting element, method of manufacturing the same and display device comprising the light emitting element
KR1020250065557A
Background knowledge augmentation-based SQL generation method and apparatus, device and medium
WO2025066259A1