Query processing method, electronic equipment, storage medium and computer program product
By performing root cause analysis on the multimodal data in the cloud database, identifying the target root cause and adjusting the data, the slow query problem was solved and query efficiency and accuracy were improved.
Patent Information
- Application Number
- CN202410301833.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-09-16
AI Technical Summary
In the existing technology, when cloud database users face slow query problems, it is difficult to accurately identify the cause and perform effective optimization, resulting in difficulty in query optimization and poor query result accuracy.
By acquiring multimodal data, including query data and execution data, root cause analysis is performed to determine the target root cause, and target solutions are found based on the target root cause, and multimodal data is adjusted to optimize the query.
It improves query efficiency and accuracy, and solves the problems of difficult query optimization and poor result accuracy caused by lack of root cause analysis.
Smart Images

Figure CN120653470A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology and artificial intelligence technology, and in particular to a query processing method, electronic device, storage medium, and computer program product. Background Art
[0002] In application scenarios, when queries involve large amounts of data, slow query execution (also known as slow queries) is very common. In many cases, users don't understand the specific reasons for slow query execution. Consequently, cloud database users often neglect to configure their databases and optimize slow queries. (This makes query optimization difficult, especially given the difficulty in understanding the root causes of slow queries.) Therefore, troubleshooting the causes of slow query execution and developing optimization solutions has become a key technical challenge in this area.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] Embodiments of the present application provide a query processing method, electronic device, storage medium, and computer program product to at least address the technical issues of difficulty in query optimization and poor query result accuracy due to a lack of root cause analysis of slow queries in related technologies.
[0005] According to one aspect of an embodiment of the present application, a query processing method is provided, comprising: obtaining multimodal data to be processed, wherein the multimodal data comprises query data and execution data associated with the query data, the execution data being used to characterize the query execution status corresponding to the query data; performing a root cause analysis on the execution attributes of the query data based on the multimodal data to obtain a target root cause corresponding to the execution attribute; and searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0006] According to another aspect of an embodiment of the present application, a query processing method is also provided, including: obtaining a query processing request through a first application programming interface; returning a query processing response through a second application programming interface; wherein the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: a target solution, the target solution is determined based on a target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0007] According to another aspect of an embodiment of the present application, a query processing method is also provided, including: obtaining a currently input query processing dialogue request; returning a query processing dialogue reply in response to the query processing dialogue request; wherein the request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, the information carried in the query processing dialogue reply includes: a target solution, the target solution is determined based on a target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the data in the multimodal data; and the target solution is displayed in a graphical user interface.
[0008] According to another aspect of an embodiment of the present application, an electronic device is further provided, including: a memory storing an executable program; and a processor for running the program, wherein any one of the above-mentioned query processing methods is executed when the program is running.
[0009] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned query processing methods.
[0010] According to another aspect of an embodiment of the present application, a computer program product is further provided, including a computer program, which implements any one of the above-mentioned query processing methods when executed by a processor.
[0011] In an embodiment of the present application, multimodal data to be processed is obtained, wherein the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data; root cause analysis is performed on the execution attributes of the query data based on the multimodal data to obtain the target root cause corresponding to the execution attribute; and a target solution is searched based on the target root cause and the multimodal data, wherein the target solution is used to determine the adjustment method for at least part of the data in the multimodal data. It is easy to notice that the present application takes into account the multimodal data including the query data and the related execution data in the process of performing root cause analysis on the query data, and obtains a more accurate target root cause. As a result, the present application achieves the purpose of determining the target solution based on the target root cause and the multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, thereby solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0012] It is easy to notice that the above general description and the following detailed description are merely for the purpose of exemplifying and explaining the present application, and do not constitute a limitation to the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0014] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the query processing method is shown;
[0015] Figure 2 is a flowchart of a query processing method according to Example 1 of the present application;
[0016] Figure 3 is a schematic diagram of an optional query processing process according to Example 1 of the present application;
[0017] Figure 4 is a flowchart of a query processing method according to Example 2 of the present application;
[0018] Figure 5 This is a schematic diagram of an application scenario of a query processing method according to Example 3 of the present application;
[0019] Figure 6 is a structural diagram of a query processing device according to embodiment 4 of the present application;
[0020] Figure 7 is a structural diagram of another query processing device according to Example 4 of the present application;
[0021] Figure 8 is a structural diagram of another query processing device according to embodiment 4 of the present application;
[0022] Figure 9 This is a structural block diagram of a computer terminal according to Example 5 of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] The technical solution provided in this application is mainly implemented using large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. The large model can also be called a cornerstone model / foundation model. It is pre-trained by using large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as large-scale language models (LLMs) and multi-modal pre-training models.
[0026] It should be noted that when large models are actually applied, the pre-trained model can be fine-tuned with a small number of samples, so that the large model can be applied to different tasks. For example, large models can be widely used in fields such as natural language processing (NLP) and computer vision. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image captioning (IC), and image generation. They can also be widely used in natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. Therefore, the main application scenarios of large models include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:
[0028] Multimodality: refers to the way of communicating and processing information using multiple modes (such as text, images, voice, etc.).
[0029] Pre-training: refers to model training performed in advance on large-scale datasets, aiming to enable the model to learn more knowledge and patterns, thereby improving the model's generalization ability.
[0030] Mask processing: In this application, it refers to replacing or masking the values of certain positions in the input sequence of the model to control the attention and behavior of the model.
[0031] Alignment: refers to the data matching and integration of information from different modalities in order to better understand and process multimodal information.
[0032] Sequential constraints: When processing sequence data, the model is required to comply with a certain data processing order and data processing logic to ensure the accuracy and consistency of the information.
[0033] Threshold constraints: When processing data, the model's behavior and output are required to comply with specific thresholds or restrictions.
[0034] Root cause impact score: This score is used to characterize the differences between model outputs and actual results, as well as the causes and impacts of these differences, when evaluating model performance.
[0035] Query statement: refers to a program statement written in a query language for retrieving and obtaining information. Query statements are an important tool for data processing and data analysis.
[0036] Execution plan: refers to the query plan and query steps used when executing a query statement. A reasonable execution plan can ensure the correctness and efficiency of the query statement.
[0037] Execution log: refers to a record file used to save the query statement execution process and execution results. The execution log is an important tool for diagnosing and optimizing query statements.
[0038] Instance performance metrics: These metrics are used to evaluate the performance and efficiency of query statements in actual operations. Common instance performance metrics in application scenarios include response time and throughput.
[0039] 2D-Convolutional Neural Network (2DCNN): In this application, it refers to a deep learning model used to process and analyze images.
[0040] Cross attention mechanism: refers to the mechanism of interacting and fusing information between different modalities during the model's multimodal processing.
[0041] Gating: refers to the use of gating mechanisms (such as forget gate, input gate, and output gate) to control and limit the output of the model when the model processes sequence data to ensure the accuracy and consistency of the information.
[0042] Focusing on information: When processing information, the model only focuses on task-related or important information, while ignoring other irrelevant or minor information.
[0043] Sequential loss: refers to the loss function that measures the difference between the model output order and the actual order when the model processes sequence data.
[0044] Threshold loss: refers to the loss function that measures the difference between the model output and the set threshold when the model processes data.
[0045] Structured Query Language (SQL): A standardized language for working with relational databases and an important tool for data processing and analysis. A query written in SQL is called an SQL statement.
[0046] Large Language Model (LLM): refers to an artificial intelligence model with a certain degree of general capabilities.
[0047] Training process: The process in which the model generates a new model through the input of the data set and backpropagation to update the parameters.
[0048] Example 1
[0049] In application scenarios, cloud database users often overlook optimizing database-related configurations and query statements. However, when queries involve large amounts of data, slow query execution (also known as the slow query problem in this scenario) is very likely to occur.
[0050] In the related art, the solutions for root cause analysis of slow query problems mainly include: first, a slow query diagnosis solution based on statistical information, execution plans and timing performance indicators, but this solution requires collection of user databases and ignores the impact of execution logs and execution statements on the diagnosis results, resulting in poor diagnostic accuracy; second, a slow query diagnosis solution based on the results of manual labeling of significant samples in the clustering results of instance performance indicators. This solution can perform instance-level root cause analysis of intermittent slow query problems, but due to the high demand for manual participation, this solution is inefficient and costly; third, a solution that uses large model technology and calls anomaly detection tools and database tools to perform root cause analysis of slow query problems, but this solution requires interaction with the database to obtain information and perform diagnosis based on this. However, if the user database is involved, it is difficult to perform the above information interaction.
[0051] It is easy to find that the above-mentioned existing root cause analysis solutions for slow query problems cannot accurately obtain the root cause analysis solution corresponding to the slow query problem. Based on this, how to troubleshoot the reasons for slow query statement execution and provide query statement optimization solutions remains one of the important technical issues in the relevant technical field.
[0052] According to an embodiment of the present application, an embodiment of a query processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0053] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a query processing method. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (illustrated as 102a, 102b, ..., 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microcontroller unit (MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer terminal 10 may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a computer bus), a network interface, a cursor control device (such as a mouse, a touchpad, etc.), a keyboard, a power supply, and / or a camera.
[0054] It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0055] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0056] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the query processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned query processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0057] The transmission device 106 is configured to connect to a network via a network interface to receive or transmit data. Specific examples of the aforementioned network may include a wired and / or wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module configured to communicate with the Internet wirelessly.
[0058] like Figure 1 The display shown may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0059] It should be noted that, in some optional embodiments, the above Figure 1The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the aforementioned computer device (or mobile device).
[0060] Under the above operating environment, this application provides Figure 2 The query processing method shown. Figure 2 is a flowchart of a query processing method according to Example 1 of the present application, such as Figure 2 As shown, the query processing method includes:
[0061] Step S21: obtaining multimodal data to be processed, wherein the multimodal data includes query data and execution data associated with the query data, the execution data being used to represent the query execution status corresponding to the query data;
[0062] Step S22: performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes;
[0063] Step S23 , searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least a portion of the multimodal data.
[0064] The above-mentioned method steps provided in the embodiment of the present application can be applied to the data query application scenario of the database (especially the cloud database) to evaluate the query execution, analyze the root causes of slow queries, and generate query adjustment solutions for the query. For example, the above-mentioned application scenarios may include but are not limited to: product search, product recommendation, user behavior analysis and other scenarios in the field of e-commerce; remote control, sensor data analysis, predictive maintenance and other scenarios in the field of Internet of Things; financial big data analysis, financial risk control, financial fraud detection and other scenarios in the field of financial technology; player data storage, game rankings, game log analysis and other scenarios in the field of game development; medical record management, medical data analysis, patient health management and other scenarios in the field of medical health; user relationship management, content recommendation, social network analysis and other scenarios in the field of social media.
[0065] The execution data is used to describe the execution mode of the query data and to evaluate the actual execution status of the query data according to the execution mode.
[0066] The above-mentioned multimodal data to be processed can be query data (such as query statements) corresponding to one or more queries in the above-mentioned application scenario and execution data associated with the query data. The execution data is used to characterize the query execution status corresponding to the query data. Specifically, the execution data includes expected execution information and actual execution information. The expected execution information is used to determine the expected execution method (such as an execution plan tree) corresponding to the query data, and the actual execution information is used to record the execution records (such as execution logs) and execution evaluations (such as performance indicators) during the actual query execution process corresponding to the query data.
[0067] The one or more queries may be query instances to be processed. For example, the one or more queries may be query instances that are detected to be executing slowly (i.e., experiencing a slow query issue). The execution data may include a portion describing the execution method of the query statement corresponding to the query data, and another portion describing execution performance indicators (e.g., execution speed, execution result accuracy, etc.) corresponding to the actual execution of the query statement according to the execution method.
[0068] The execution data of the above-mentioned query data can characterize the execution attributes corresponding to the above-mentioned query data, such as execution speed attributes, accuracy attributes, recall rate attributes, execution cost attributes, etc. The target root causes corresponding to the above-mentioned execution attributes are used to characterize: the factors that cause the current query instance to have the execution attributes of the above-mentioned query data. For example, the above-mentioned execution attribute is an execution speed attribute. When the execution attribute corresponding to a certain query instance determines that the query statement of the current query instance is executed slowly (that is, a slow query problem occurs), a root cause analysis of the execution attribute is performed based on the multimodal data corresponding to the query instance. The obtained target root cause is used to characterize one or more factors that cause the slow query problem in the current query instance.
[0069] According to the above-mentioned target root cause and multimodal data, a target solution is searched and selected from the candidate solutions. According to the target solution, at least part of the multimodal data can be adjusted, that is, the target solution is used to determine the adjustment strategy for at least part of the multimodal data. For example, when a slow query problem occurs in the current query instance, according to the target root cause corresponding to the above-mentioned slow query problem and the multimodal data corresponding to the current query instance, the target solution is queried to obtain the query optimization strategy corresponding to the current query instance. According to the query optimization strategy, the current query instance is adjusted to solve the slow query problem that occurs in the current query instance and improve the execution efficiency of the query statement in the current query instance.
[0070] In an embodiment of the present application, multimodal data to be processed is obtained, wherein the multimodal data includes: query data and execution data associated with the query data, the execution data being used to characterize the query execution status corresponding to the query data; a root cause analysis is performed on the execution attributes of the query data based on the multimodal data to obtain a target root cause corresponding to the execution attribute; and a target solution is searched for based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0071] It is easy to notice that this application takes into account multimodal data including query data and related execution data in the process of performing root cause analysis on query data, and obtains a more accurate target root cause. As a result, this application achieves the purpose of determining the target solution based on the target root cause and multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, and further solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0072] According to the query processing method of the embodiment of the present application, Figure 3 The query processing process is shown in Figure 2. Figure 3 As shown in the figure, the query processing process includes pre-training, fusion, prediction and solution recommendation. Figure 3 The query processing process shown in the figure further illustrates some optional embodiments of the present application.
[0073] In an optional embodiment, in step S22, root cause analysis is performed on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes, including the following method steps:
[0074] Step S221, performing feature extraction on the multimodal data to obtain multiple feature vectors corresponding to the multimodal data;
[0075] Step S222, performing feature fusion on multiple feature vectors to obtain a target fusion result;
[0076] Step S223: Root cause prediction is performed based on the target fusion result to obtain the target root cause corresponding to the execution attribute.
[0077] The data of multiple modalities in the query instance are used as input data of the feature extraction network for feature extraction to obtain multiple feature vectors, wherein each modal input data corresponds to a feature vector. The above multiple feature vectors can be used to pre-train the model for embedding mapping. Furthermore, multi-modal feature fusion is performed on the above multiple feature vectors to obtain the above target fusion result. In this process, the model can learn the hidden relationship between the data of multiple modalities, and the above target fusion result can more accurately characterize the specific query situation of the query instance. Furthermore, root cause prediction is performed based on the above target fusion result to obtain the target root cause corresponding to the above execution attribute. The above target root cause is used to characterize the specific factors that cause the above query instance to have the above execution attribute.
[0078] According to the method steps of the above-mentioned optional embodiment in the present application, the features corresponding to the multimodal data are fused to obtain a target fusion result, and then the root cause prediction is performed based on the target fusion result. This can fully take into account the multimodal data corresponding to the query instance itself and the relationship between the multimodal data, thereby making the target root cause corresponding to the predicted execution attribute more accurate.
[0079] In an optional embodiment, the query data includes: a query statement to be executed, and the execution data includes: an execution plan, an execution log, and performance indicators associated with the query statement. In step S221, feature extraction is performed on the multimodal data to obtain multiple feature vectors corresponding to the multimodal data, including the following method steps:
[0080] Step S2211: Using a multimodal information alignment method with a preset granularity, feature extraction is performed on the query statement to obtain a query statement feature vector, feature extraction is performed on the execution plan to obtain an execution plan feature vector, and feature extraction is performed on the execution log to obtain an execution log feature vector.
[0081] Step S2212: Use a preset neural network model to extract features of the performance indicators to obtain a time series performance indicator feature vector.
[0082] The above-mentioned preset neural network model can be a pre-trained convolutional neural network model, a recurrent neural network model, various common feature encoding models, etc. The embodiment of the present application does not limit the specific type of the preset neural network.
[0083] In the application scenario, query data and execution data of the query instance are obtained. The query data includes at least one query statement in the query instance. The execution data includes: the execution plan corresponding to the query statement in the query instance, the execution log corresponding to the query statement during the actual execution process, and the query performance indicators reflected by the actual execution status of the query statement.
[0084] The preset granularity may be character level, word level, sentence level, paragraph level, etc. The multimodal information alignment method at the preset granularity may be to align the multimodal information data based on the preset granularity, for example, align the multimodal information data at the character level.
[0085] Furthermore, after data alignment of the multimodal information, corresponding feature vectors are extracted from the query statements, execution plans, and execution logs in the multimodal information. Furthermore, a convolutional neural network (e.g., 2DCNN) is used to extract feature vectors corresponding to time series performance indicators from the performance indicators in the multimodal information.
[0086] Still like Figure 3 As shown, in the pre-training part, model pre-training based on multimodal data includes: query statement embedding mapping training based on query statements, plan tree embedding mapping training based on execution plans, execution log embedding mapping training based on execution logs, and performance metric embedding mapping training based on performance metrics. The above training process can be divided into two categories: the first category includes model training based on query statements, execution plans, and execution logs, and the second category includes model training based on performance metrics.
[0087] In the first category of pre-training, in order to achieve character-level multimodal alignment of query statements, execution plans, and execution logs, a mask is used in this example to mask part of the data in the query statements. The masked part of the data in the query statements is aligned with the corresponding data in the execution plan and execution log. Correspondingly, a mask is applied to part of the data in the execution plan so that the masked part of the data in the execution plan is aligned with the corresponding data in the query statements and execution logs.
[0088] For example, in one application scenario, the query statement is "SELECT user.id, user.name from user.where user.type = 'type1'", a node in the corresponding execution plan is "node type: SeqScan, relation name: user", and the log data in the corresponding execution log is "read_rows = 1000". Based on this, the "user" in the query statement and the "user" in the execution plan should be aligned. At this time, after masking the "user" in the query statement (for example, replacing user with mask), the model can also know that the words replaced with mask in the multimodal data are all user.
[0089] In the second category of pre-training described above, this example uses 2DCNN to pre-train the performance indicators corresponding to the query statements, so as to extract features corresponding to the timing performance indicators from the execution data related to the query statements.
[0090] Through the method steps of the above optional embodiments of the present application, feature extraction is performed on information of different modalities in different ways to ensure that the extracted feature vectors can more fully characterize the features of the corresponding modality of the query instance.
[0091] In an optional embodiment, in step S222, feature fusion is performed on multiple feature vectors to obtain a target fusion result, including the following method steps:
[0092] Step S2221: performing root cause common feature fusion on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a common feature fusion result;
[0093] Step S2222: performing root cause-specific feature fusion on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a specific feature fusion result;
[0094] Step S2223: Fuse the common feature fusion result and the unique feature fusion result to obtain the target fusion result.
[0095] The feature fusion of multiple feature vectors includes two parts: root cause common feature fusion and root cause specific feature fusion. Specifically, an encoder-decoder network architecture (such as Common crossTransformer) with a common feature cross-attention mechanism is used to perform root cause common feature fusion on the query statement feature vector, execution plan feature vector, execution log feature vector and timing performance index feature vector corresponding to the multimodal information to obtain the above-mentioned common feature fusion result. Part of the features are selected from the query statement feature vector, execution plan feature vector, execution log feature vector and timing performance index feature vector respectively through a gating mechanism, and the part of the features are used to perform root cause specific feature fusion. That is, an encoder-decoder network architecture (such as Root cause crossTransformer) with a specific feature cross-attention mechanism is used to perform root cause specific feature fusion on part of the features selected from the above-mentioned multiple feature vectors to obtain the above-mentioned specific feature fusion result. Further, the above-mentioned common feature fusion result and the specific feature fusion result are fused to obtain the target fusion result.
[0096] Still like Figure 3As shown, in the fusion part of the query processing process, the fusion of common features of the root causes and the fusion of unique features of the root causes are performed. The fusion of the common features of the root causes includes: performing cross attention fusion processing based on all the information of the four input data to obtain a common feature fusion result. The fusion of the unique features of the root cause includes: selecting part of the data from the four input data for each type of root cause through a gating mechanism, inputting each part of the data into an encoder-decoder network architecture with a unique feature cross attention mechanism (such as Root cause crossTransformer) for root cause unique feature fusion, and then using the unique feature fusion result for further fusion with the common feature fusion result, and using the unique feature fusion result for inputting the root cause influence score prediction architecture to predict the root cause influence score.
[0097] It's easy to note that the encoder-decoder network architecture with the aforementioned feature-specific cross-attention mechanism includes multiple network layers. Each network layer can be a Transformer layer with a feature-specific cross-attention mechanism, and each network layer is used to perform feature-specific cross-attention calculations on the feature vectors of a modality. Furthermore, the unique feature fusion results output by each network layer are further fused with the shared feature fusion results, and the resulting target fusion results are input into the root cause impact score prediction architecture.
[0098] It should be noted that the specific feature fusion scheme adopted in the above optional embodiments can be weighted fusion, splicing fusion, learning fusion, linear transformation fusion, attention mechanism fusion, or a hybrid fusion scheme consisting of at least two of the above fusion schemes.
[0099] Through the method steps provided in the above optional embodiments of the present application, when performing feature fusion on multiple feature vectors extracted from the multimodal information of the query instance, not only the common features of the root causes corresponding to the multiple feature vectors are taken into account, but also the root cause-specific features possessed by each feature vector are taken into account. The target fusion result obtained in this way is more accurate, and the model can learn the inherent structure and laws of multimodal information, so that the model has better accuracy, multimodal adaptability and expression ability in the subsequent root cause prediction process.
[0100] In an optional embodiment, in step S2221, root cause common features are fused on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a common feature fusion result, including the following method steps:
[0101] Step S2224: setting the query statement feature vector as a query input item for cross-attention calculation, and setting key input items and value input items for the cross-attention calculation based on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector;
[0102] Step S2225 , performing root cause common feature fusion on the query input item, the key input item, and the value input item to obtain a common feature fusion result.
[0103] In the above optional embodiment, the calculation parameters in the above cross-attention calculation include query input, key input, and value input. For example, in the cross-attention mechanism, the query input is usually represented by a query vector Q, the key input is represented by a key vector K, and the value input is represented by a value vector V.
[0104] Still like Figure 3 As shown in , in the fusion part of the query processing process, when the encoder-decoder architecture with a common feature cross attention mechanism (such as Common Cross Transformer) is used for cross attention calculation, the query sentence is used as the query vector Q in the fusion attention calculation of each modality, and the key vector K and value vector V corresponding to the modality are determined based on the corresponding modality data. Specifically, as Figure 3 As shown in the figure, K1 and V1 represent the key vector and value vector corresponding to the query statement, K2 and V2 represent the key vector and value vector corresponding to the execution plan, K3 and V3 represent the key vector and value vector corresponding to the execution log, and K4 and V4 represent the key vector and value vector corresponding to the performance indicator. Based on this, after cross-attention calculation (used to achieve root cause shared feature fusion), the corresponding multimodal calculation results are spliced, reduced in dimension, and fused to obtain the multimodal fusion result (also known as the shared feature fusion result).
[0105] According to the method steps provided in the above optional implementation mode of the present application, the common features of multimodal information are fused based on the cross-attention mechanism, that is, the model performance is improved by integrating the common features of multimodal information, so that the model has higher robustness and generalization ability. By fusing the common features corresponding to multimodal information, the dimension of the feature space in the model can be reduced, the feature redundancy can be reduced, and the efficiency and accuracy of the model can be further improved. In addition, by integrating the common features corresponding to multimodal information, the adaptability of the model to multimodal information can be improved.
[0106] In an optional embodiment, the query processing method further includes the following method steps:
[0107] Step S241: normalize the query statement feature vector according to a preset normalization processing method to obtain a first processing result, and select partial features corresponding to the query statement feature vector based on the first processing result and the query statement feature vector;
[0108] Step S242: normalize the execution plan feature vector according to a preset normalization processing method to obtain a second processing result, and select partial features corresponding to the execution plan feature vector based on the second processing result and the execution plan feature vector;
[0109] Step S243: normalize the execution log feature vector according to a preset normalization processing method to obtain a third processing result, and select partial features corresponding to the execution log feature vector based on the third processing result and the execution log feature vector;
[0110] Step S244 , normalizing the time series performance indicator feature vector according to a preset normalization processing method to obtain a fourth processing result, and selecting partial features corresponding to the time series performance indicator feature vector based on the fourth processing result and the time series performance indicator feature vector.
[0111] In the above optional embodiment, in the preparation stage of unique feature fusion, the feature vector corresponding to the multimodal information is normalized by a preset normalization processing method, and based on the normalization processing result, some features are selected from the feature vector corresponding to the multimodal information through a gating mechanism so that the some features can be used for unique feature fusion.
[0112] Still like Figure 3 As shown in the figure, during the fusion part of the query processing, when the unique feature fusion performs partial feature selection, a gating mechanism is used to select the feature vectors corresponding to the multimodal information (in this case, the four input data: query language, execution plan, execution log, and performance indicators). Specifically, for each root cause, some features that are valuable for predicting the root cause impact score are selected from the feature vectors corresponding to the four input data.
[0113] In particular, the value of the features in the feature vector for predicting the root cause impact score can be determined through value assessment and the preset normalization processing method. For example, the preset normalization processing method is used to assess the value of the features for predicting the root cause impact score and map the value to a numerical range of 0 to 1 to obtain a normalized result.
[0114] Specifically, for example, the preset normalization processing method is implemented by a preset Sigmoid function. In the application scenario, corresponding (can be different) Sigmoid functions are pre-set for four types of input data (i.e., multimodal information), and then the four preset Sigmoid functions are used to select part of the data that is valuable for predicting the root cause impact score from the four types of input data. The output result of each of the above Sigmoid functions is a value between 0 and 1. The closer the output result is to 0, the lower the value of the corresponding feature for predicting the root cause impact score. The closer the output result is to 1, the higher the value of the corresponding feature for predicting the root cause impact score.
[0115] A first Sigmoid function, pre-set for the query, is used to perform value assessment and numerical mapping on the query feature vector, yielding a first processing result. This first processing result characterizes the value of each feature unit (e.g., character) in the query feature vector for predicting the root cause impact score. Furthermore, based on this first processing result, a subset of features is selected from the query feature vector. This subset of features may include at least one feature unit whose value exceeds a pre-set threshold.
[0116] A second Sigmoid function, pre-set for the execution plan, is used to perform value assessment and numerical mapping on the execution plan feature vector, yielding a second processing result. This second processing result characterizes the value of each feature unit (e.g., a node in the plan tree) in the execution plan feature vector for predicting the root cause impact score. Furthermore, based on this second processing result, a subset of features is selected from the execution plan feature vector. This subset of features may include at least one feature unit whose value exceeds a pre-set threshold.
[0117] A third Sigmoid function, pre-defined for the execution log, is used to perform value assessment and numerical mapping on the execution log feature vector, yielding a third processing result. This third processing result is used to characterize the value of each feature unit (e.g., log field) in the execution log feature vector for predicting the root cause impact score. Furthermore, based on this third processing result, a subset of features is selected from the execution log feature vector. This subset of features may include at least one feature unit whose value exceeds a pre-set threshold.
[0118] A fourth Sigmoid function, pre-set for the performance indicator, is used to perform value assessment and numerical mapping on the time series performance indicator feature vector, yielding a fourth processing result. This fourth processing result is used to characterize the value of each feature unit (e.g., the indicator value) in the time series performance indicator feature vector for predicting the root cause impact score. Furthermore, based on this fourth processing result, a portion of features is selected from the time series performance indicator feature vector. This portion of features may include at least one feature unit whose value exceeds a preset threshold.
[0119] For example, in the unique feature fusion part of the query processing process, taking the index root cause (a type of root cause) as an example, some features selected from the query statement feature vector for the index root cause include "user.type='type1'", some features selected from the execution plan feature vector for the index root cause include "Filter:user.type='type1'", some features selected from the execution log feature vector for the index root cause include "read_rows", and some features selected from the timing performance indicator feature vector for the index root cause include "Memory used".
[0120] According to the method steps provided in the above-mentioned optional implementation mode of the present application, through a preset normalization processing method and a gating mechanism, part of the data is selected from the feature vector corresponding to the multimodal information as the data that needs to be paid attention to during the cross-attention calculation of the unique feature fusion. Compared with the cross-attention calculation of the unique feature fusion directly based on all the feature data in the feature vector, the above-mentioned method can obtain more accurate calculation results, or can make the unique feature fusion results more suitable for predicting the root cause impact score.
[0121] In an optional embodiment, in step S2222, root cause-specific feature fusion is performed on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a specific feature fusion result, including the following method steps:
[0122] Step S2226: setting some features corresponding to the query statement feature vector as query input items for cross-attention calculation, and setting key input items and value input items for the cross-attention calculation based on some features corresponding to the query statement feature vector, some features corresponding to the execution plan feature vector, some features corresponding to the execution log feature vector, and some features corresponding to the timing performance indicator feature vector;
[0123] Step S2227: performing root cause specific feature fusion on the query input item, the key input item, and the value input item to obtain a specific feature fusion result.
[0124] Still like Figure 3 As shown in the figure, in the fusion part of the query processing process, when using an encoder-decoder architecture with a unique feature cross-attention mechanism (such as Root cause cross Transformer) for cross-attention calculation, the query statement is used as the query vector Q in the cross-attention calculation. For each modality, the key vector K and value vector V corresponding to the modality are determined based on some features selected from the feature vector based on the gating mechanism.
[0125] Specifically, when performing unique feature cross-attention calculation on a query statement, the query statement is used as the query vector Q. The key vector K1 and the value vector V1 are determined based on some features selected from the query statement feature vector. Based on the query vector Q, key vector K1 and value vector V1 corresponding to the query statement, the unique features corresponding to the query statement modality are fused to obtain the corresponding unique feature fusion result.
[0126] Specifically, when performing unique feature cross-attention calculation for the execution plan, the query statement is used as the query vector Q, and the key vector K2 and value vector V2 are determined based on some features selected from the execution plan feature vector. Based on the query vector Q, key vector K2 and value vector V2 corresponding to the execution plan, the unique features corresponding to the execution plan modality are fused to obtain the corresponding unique feature fusion results.
[0127] Specifically, when performing unique feature cross-attention calculation on the execution log, the query statement is used as the query vector Q, and the key vector K3 and value vector V3 are determined based on some features selected from the execution log feature vector. The unique features corresponding to the execution log modality are fused based on the query vector Q, key vector K3 and value vector V3 corresponding to the execution log to obtain the corresponding unique feature fusion result.
[0128] Specifically, when performing cross-attention calculation of unique features for performance indicators, the query statement is used as the query vector Q, and the key vector K4 and value vector V4 are determined based on some features selected from the feature vector of the temporal performance indicator. Based on the query vector Q, key vector K4 and value vector V4 corresponding to the performance indicator, the unique features corresponding to the performance indicator modality are fused to obtain the corresponding unique feature fusion results.
[0129] According to the method steps provided in the above optional implementation of this application, the unique features of multimodal information are fused based on a cross-attention mechanism. In other words, the unique features of each modality in the multimodal information are used to enhance model performance, so that the model has stronger performance for a specific modality. In addition, by considering the unique features corresponding to the multimodal information, the model can be personalized according to the characteristics of different modalities, thereby improving the personalized performance of the model in a specific modality.
[0130] In an optional embodiment, in step S223, root cause prediction is performed based on the target fusion result to obtain the target root cause corresponding to the execution attribute, including the following method steps:
[0131] Step S2231: Use the target root cause prediction model to perform root cause prediction on the target fusion result to obtain multiple candidate prediction impact scores corresponding to the execution attributes;
[0132] Step S2232: Determine the target root cause corresponding to the execution attribute based on the multiple candidate predicted impact scores.
[0133] Still like Figure 3 As shown, the target fusion result is input into the root cause influence score prediction architecture for root cause prediction, and multiple candidate prediction influence scores are obtained, where each candidate prediction influence score corresponds to one of the multiple types of root causes, that is, corresponding to the number of network layers in the encoder-decoder architecture with a unique feature cross-attention mechanism.
[0134] Furthermore, the target root cause corresponding to the aforementioned execution attribute is determined based on the scores of the multiple candidate predicted impact scores. Specifically, the multiple types of root causes are sorted based on the multiple candidate predicted impact scores to obtain a sorting result, and based on the sorting result, the aforementioned target root cause is determined from the multiple types of root causes. For example, when the target root cause to be determined in the application scenario is a root cause of one type, the root cause of the target type corresponding to the candidate predicted impact score with the highest score among the multiple candidate predicted impact scores can be determined as the target root cause.
[0135] In an optional embodiment, in step S2232, determining a target root cause corresponding to the execution attribute based on multiple candidate predicted impact scores includes the following method steps:
[0136] Step S2233, screening out some predicted influence scores greater than a preset threshold from the plurality of candidate predicted influence scores;
[0137] Step S2234: sort the partial predicted impact scores from largest to smallest to determine the target root cause corresponding to the execution attribute.
[0138] According to the above optional embodiment, an exemplary implementation is provided, in which a portion of the predicted impact scores greater than a preset threshold are screened from multiple candidate predicted impact scores, and the root causes of the certain types corresponding to the partial predicted impact scores are considered to be root causes that have an impact on the query instance. Furthermore, the partial predicted impact scores are sorted in descending order to obtain a sorting result. Based on the sorting result, the root cause whose predicted impact score ranks in the top n positions (i.e., in the application scenario, it is necessary to determine n types of root causes as target root causes) is selected from the partial types of root causes as the target root cause.
[0139] In an optional embodiment, the query processing method further includes the following method steps:
[0140] Step S251: training the initial root cause prediction model using sample data to obtain a training impact score, wherein the sample data includes: a sample fusion result, which is generated based on the query sample and the sample plan, sample log, and sample performance indicator associated with the query sample;
[0141] Step S252: Obtain the regression loss, sequence loss, and threshold loss corresponding to the training influence score, wherein the regression loss is used to constrain the difference between the training influence score and the true influence score, the sequence loss is used to constrain the difference between the predicted ranking of the training influence score and the actual ranking of the true influence score, and the threshold loss is used to constrain the difference between the training influence score and a preset threshold;
[0142] Step S253 : Adjust the model parameters of the initial root cause prediction model based on the regression loss, the sequence loss, and the threshold loss to obtain a target root cause prediction model.
[0143] In an optional embodiment, the query processing method further includes the following method steps:
[0144] Step S254: Obtain a target loss corresponding to the training impact score, wherein the target loss includes at least a regression loss and further includes one of the following: a sequence loss and a threshold loss;
[0145] Step S255 : adjusting the model parameters of the initial root cause prediction model based on the target loss to obtain a target root cause prediction model.
[0146] According to the above optional embodiment, an exemplary implementation is provided. Figure 3 In the query processing process shown, the root cause impact score prediction architecture (also known as the target root cause prediction model) is trained using sample data to obtain the initial root cause prediction model. During the training of the target root cause preset model, the training losses considered include regression loss, sequence loss, and threshold loss.
[0147] For example, the regression loss in the above training loss can be obtained by calculating the mean squared error between the training influence score and the true influence score.
[0148] For example, the specific calculation method for the order loss in the above training loss is as follows: based on the predicted ranking of the training influence scores, calculate the first distance between two adjacent root causes; based on the actual ranking of the true influence scores, calculate the second distance between the two adjacent root causes; calculate the distance difference between the first and second distances; and determine the order loss based on the distance difference and the margin lower threshold (margin1). The margin lower threshold refers to the lower limit of the distance threshold between any two root causes. Including the margin lower threshold in the order loss can force the model to learn in the direction where the distance difference is greater than the margin lower threshold, ensuring the order of root causes when the target root cause prediction model performs root cause prediction.
[0149] For example, the threshold loss in the aforementioned training loss is calculated as follows: Calculate the difference between the training impact score and the true impact score; Determine the threshold loss based on the difference and the lower threshold (margin2) of the difference. For example, if the true impact score is 0.01, the preset threshold is 0.1, and the training impact score is 0.14, then the threshold loss is 0.14–0.1+margin2; Increase margin2 when the training impact score and the true impact score are not on the same side of the preset threshold. It should be noted that if there is an error between the training impact score and the true impact score, causing them to be on different sides of the preset threshold, increasing margin2 will adjust the model so that the training impact score and the true impact score are offset from the side closer to the preset threshold to the side farther away from the preset threshold. During this process, margin2 remains within a smaller range to ensure model accuracy. The aforementioned threshold loss can ensure the accuracy of the target root cause prediction model when performing root cause predictions, avoiding over-prediction or under-prediction.
[0150] In the application scenario, when the query optimization effects (such as saved query time) corresponding to two types of root causes are similar, it is difficult to ensure the order and effectiveness of the root cause prediction by only considering the regression loss in the model training. Moreover, when the root cause impact scores corresponding to the two types of root causes are near the preset threshold, it is difficult to distinguish whether the root cause impact scores corresponding to the above two types of root causes exceed the preset threshold by only considering the regression loss in the model training. In short, only considering the regression loss in the model training cannot distinguish the ranking differences between the two types of root causes, which leads to poor accuracy of the prediction results of the target root cause prediction model obtained by training. On this basis, according to the method steps provided in the above optional implementation mode of the present application, in the training process of the target root cause prediction model, not only the regression loss is taken into account, but also the sequence loss and threshold loss are taken into account to optimize the training loss function, thereby improving the order and effectiveness of the prediction results of the target root cause prediction model.
[0151] In an optional embodiment, in step S23, searching for a target solution based on the target root cause and the multimodal data includes the following method steps:
[0152] Step S231: Using a document retrieval model to perform document retrieval on the target root cause and multimodal data to obtain candidate root cause documents;
[0153] Step S232: searching for a target solution based on the candidate root cause documents.
[0154] The document retrieval model may be a pre-trained neural network model (which may be a large language model) for determining a target solution, or a preset algorithm, retrieval tool, etc. that can determine a target solution based on a target root cause.
[0155] Still like Figure 3 As shown, during query processing, the function of determining the target root cause based on candidate predicted influence scores can be integrated into the root cause document retrieval model. Multiple candidate predicted influence scores are input into the root cause document retrieval model. After the target root cause is determined, a document search is performed in a preset root cause document library based on the target root cause and multimodal data (in this example, represented by the target fusion result) to obtain candidate root cause documents. Furthermore, based on the candidate root cause documents, a target solution corresponding to the target root cause is searched. This target solution is used to optimize the query instance corresponding to the multimodal data.
[0156] In another application scenario, based on the predicted target root cause, document retrieval technology is used to retrieve candidate root cause documents corresponding to the target root cause from relevant databases. Furthermore, using big model technology, the target solution is determined from the candidate root cause documents based on the target root cause, query statements, query plans, execution logs, and time series performance metrics. For example, if the target root cause is query rewriting, rewriting rule documents related to query rewriting are retrieved from the relevant database and input into the big model. Based on the rewriting rule documents, the big model then generates a target solution to the slow query problem caused by query rewriting.
[0157] In summary, this application proposes a method for root cause analysis and solution recommendation for slow query execution (also known as slow query problems). In particular, by integrating multimodal data such as query statements, execution plans, execution logs, and key performance indicators, root cause analysis of slow query problems in query instances can effectively improve the accuracy of root cause analysis results.
[0158] The method provided in this application can be applied to provide anomaly detection and root cause analysis services based on multi-source heterogeneous data for a variety of application scenarios. Specifically, this application can provide root cause analysis and query optimization services for anomalies caused by slow data queries based on multi-source heterogeneous data. The method provided in this application is suitable for application in slow query optimization scenarios in real-time data warehouses on the cloud.
[0159] Existing slow query root cause analysis solutions are unable to rank the impact of each root cause on the query. Consequently, root cause analysis results make it difficult for users to clearly identify which root cause will yield the greatest benefit from query optimization. Furthermore, these existing slow query root cause analysis solutions only utilize time series metric information and execution plans, ignoring some query information contained in query statements and execution logs. They also ignore the hidden correlations between this multimodal information (such as time series metric information, execution plans, query statements, and execution logs). This results in low diagnostic accuracy for slow query root cause analysis.
[0160] According to the query processing method provided in this application, in the process of performing root cause analysis on slow query problems, full use is made of multimodal information such as query statements, execution plans, execution logs, performance indicators, etc., and a large model with multimodal information processing capabilities is used to align multiple data in the above multimodal information. The large model can dig out the hidden correlation relationships between the data in the above multimodal information.
[0161] According to the query processing method provided in this application, a root cause impact score prediction model is obtained through machine learning training. In this prediction model, different focus information is provided for multiple types of root causes, so that the prediction model can make more accurate root cause impact score prediction results. In addition, in order to improve the accuracy of the prediction order of the root cause impact score and the effectiveness of the prediction results, in the process of training the above-mentioned prediction model, regression loss, sequence loss and threshold loss are considered to constrain the impact scores between multiple categories of root causes, thereby achieving accurate prediction and ranking of the root cause impact scores of slow query problems.
[0162] It is easy to find that one of the technical innovations of the above-mentioned query processing method provided in the embodiment of the present application is: data fusion and key information extraction of multimodal information in the query, so that the model's prediction results of the root cause impact score of the slow query problem are more accurate.
[0163] Specifically, based on query-related information during query execution, multimodal information, including query statements, execution plans, execution logs, performance metrics, and other query-related information, is fused to predict the root cause impact score of slow queries. During this multimodal fusion process, a cross-attention mechanism is employed, with the query statement serving as the primary modality in a pair of modalities to be attended to. The fused information, representing the influence of one modality on the other, is then calculated. This fused information is then used to fuse the aforementioned four types of information (including query statements, execution plans, execution logs, and performance metrics), thereby extracting query execution-related features for predicting the root cause impact score. Based on each category of root cause, a gating method is proposed based on the prediction model to focus on key information from the four types of information. This gating mechanism selects the corresponding attention information for each category of root cause from each type of information. Feature fusion is then performed on the selected results for root causes across multiple categories, resulting in a more accurate prediction of the root cause impact score.
[0164] In addition, the query processing method provided in the embodiment of the present application also utilizes a pre-training mechanism (pre-training the network architecture used for feature extraction and feature fusion) to reduce model training costs. On the basis of root cause prediction, the query processing method provided in the embodiment of the present application also combines document retrieval technology and large model technology, making the query processing solution applicable to query optimization scenarios for query instances with slow query problems.
[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0166] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0168] Example 2
[0169] In the operating environment as in Example 1, the present application provides Figure 4 Another query processing method shown. Figure 4 is a flowchart of a query processing method according to Example 2 of the present application, such as Figure 4 As shown, the query processing method includes:
[0170] Step S41, obtaining a query processing request through a first application programming interface;
[0171] Step S42, returning a query processing response via the second application programming interface;
[0172] Among them, the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: target solution, the target solution is determined based on the target root cause and multimodal data, the target root cause is obtained by root cause analysis of the execution attributes of the query data based on the multimodal data, and the target solution is used to determine the adjustment method of at least part of the data in the multimodal data.
[0173] According to the above method steps, a method for implementing a query processing cloud service is provided, which runs on a cloud server. The cloud server receives a query processing request from a service caller via a first application programming interface (API), executes a query processing flow based on the multimodal data to be processed carried in the query processing request, and thereby obtains a target solution. Furthermore, the cloud server returns a query processing response to the service caller via a second application programming interface, thereby providing the target solution to the service caller.
[0174] In addition, when the operating resources of the client device can meet the training, deployment and operation conditions of the large model, the above-mentioned query processing method of the embodiment of the present application can also be performed in the client device to provide local query processing services for customers.
[0175] The above-mentioned method steps provided in the embodiment of the present application can be applied to the data query cloud service application scenario of the database (especially the cloud database) to perform query execution evaluation, slow query root cause analysis and query adjustment solution generation for the query. For example, the above-mentioned cloud service application scenarios may include but are not limited to: commodity search, commodity recommendation, user behavior analysis and other scenarios in the e-commerce field; remote control, sensor data analysis, predictive maintenance and other scenarios in the field of Internet of Things; financial big data analysis, financial risk control, financial fraud detection and other scenarios in the field of financial technology; player data storage, game rankings, game log analysis and other scenarios in the field of game development; medical record management, medical data analysis, patient health management and other scenarios in the field of medical health; user relationship management, content recommendation, social network analysis and other scenarios in the field of social media.
[0176] The execution data is used to describe the execution mode of the query data and to evaluate the actual execution status of the query data according to the execution mode.
[0177] The above-mentioned multimodal data to be processed can be query data (such as query statements) corresponding to one or more queries in the above-mentioned application scenario and execution data associated with the query data. The execution data is used to characterize the query execution status corresponding to the query data. Specifically, the execution data includes expected execution information and actual execution information. The expected execution information is used to determine the expected execution method (such as an execution plan tree) corresponding to the query data, and the actual execution information is used to record the execution records (such as execution logs) and execution evaluations (such as performance indicators) during the actual query execution process corresponding to the query data.
[0178] The one or more queries may be query instances to be processed. For example, the one or more queries may be query instances that are detected to be executing slowly (i.e., experiencing a slow query issue). The execution data may include a portion describing the execution method of the query statement corresponding to the query data, and another portion describing execution performance indicators (e.g., execution speed, execution result accuracy, etc.) corresponding to the actual execution of the query statement according to the execution method.
[0179] The execution data of the above-mentioned query data can characterize the execution attributes corresponding to the above-mentioned query data, such as execution speed attributes, accuracy attributes, recall rate attributes, execution cost attributes, etc. The target root causes corresponding to the above-mentioned execution attributes are used to characterize: the factors that cause the current query instance to have the execution attributes of the above-mentioned query data. For example, the above-mentioned execution attribute is an execution speed attribute. When the execution attribute corresponding to a certain query instance determines that the query statement of the current query instance is executed slowly (that is, a slow query problem occurs), a root cause analysis of the execution attribute is performed based on the multimodal data corresponding to the query instance. The obtained target root cause is used to characterize one or more factors that cause the slow query problem in the current query instance.
[0180] According to the above-mentioned target root cause and multimodal data, a target solution is searched and selected from the candidate solutions. According to the target solution, at least part of the multimodal data can be adjusted, that is, the target solution is used to determine the adjustment strategy for at least part of the multimodal data. For example, when a slow query problem occurs in the current query instance, according to the target root cause corresponding to the above-mentioned slow query problem and the multimodal data corresponding to the current query instance, the target solution is queried to obtain the query optimization strategy corresponding to the current query instance. According to the query optimization strategy, the current query instance is adjusted to solve the slow query problem that occurs in the current query instance and improve the execution efficiency of the query statement in the current query instance.
[0181] In an embodiment of the present application, a query processing request is obtained through a first application programming interface; a query processing response is returned through a second application programming interface; wherein the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: a target solution, the target solution is determined based on the target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0182] It is easy to notice that this application takes into account multimodal data including query data and related execution data in the process of performing root cause analysis on query data, and obtains a more accurate target root cause. As a result, this application achieves the purpose of determining the target solution based on the target root cause and multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, and further solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0183] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Example 1 and will not be repeated here.
[0184] Example 3
[0185] According to an embodiment of the present application, a query processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0186] Considering the huge number of model parameters of large models and the limited computing resources of mobile terminals, the query processing method provided in the embodiment of the present application can be applied to Figure 5 The application scenarios shown are not limited to this. Figure 5 In the illustrated application scenario, the large model is deployed on a server 510. Server 510 can be connected to one or more client devices 520 via a local area network, a wide area network, the Internet, or other types of data networks. Client devices 520 herein may include, but are not limited to, smartphones, tablet computers, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 520 can interact with users via a graphical user interface to access the large model and thereby implement the methods provided in the embodiments of this application.
[0187] In such Figure 5 In the application scenario shown, this application provides Figure 5 Another query processing method shown in Figure 5 As shown, the query processing method includes:
[0188] Step S501, obtaining the currently input query processing dialogue request;
[0189] Step S502: Returning a query processing dialogue reply in response to the query processing dialogue request; wherein the request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data including: query data and execution data associated with the query data, the execution data used to characterize the query execution status corresponding to the query data; and information carried in the query processing dialogue reply includes: a target solution, the target solution being determined based on a target root cause and the multimodal data, the target root cause being obtained by performing a root cause analysis of the execution attributes of the query data based on the multimodal data, and the target solution being used to determine an adjustment method for at least a portion of the multimodal data.
[0190] Step S503: Display the target solution in the graphical user interface.
[0191] According to the above method steps, a visual human-computer interaction solution for query processing functions is provided. The terminal device provides a graphical user interface, which displays at least one query processing scenario. The display content of the graphical user interface also includes an input component (such as a text input box, a voice input control, etc.) and a display component (such as a text display window). The user inputs a query processing dialogue request through the input component to specify the multimodal data to be processed in the query processing task. After detecting the user's input behavior, the query processing process is executed based on the multimodal data to be processed to obtain a target solution. Further, the target solution is displayed through the display component in the graphical user interface.
[0192] The above-mentioned method steps provided in the embodiment of the present application can be applied to human-computer interaction application scenarios for data query of databases (especially cloud databases) to evaluate query execution, analyze the root causes of slow queries, and generate query adjustment solutions for queries. For example, the above-mentioned human-computer interaction application scenarios may include but are not limited to: product search, product recommendation, user behavior analysis and other scenarios in the field of e-commerce; remote control, sensor data analysis, predictive maintenance and other scenarios in the field of Internet of Things; financial big data analysis, financial risk control, financial fraud detection and other scenarios in the field of financial technology; player data storage, game rankings, game log analysis and other scenarios in the field of game development; medical record management, medical data analysis, patient health management and other scenarios in the field of medical health; user relationship management, content recommendation, social network analysis and other scenarios in the field of social media.
[0193] The execution data is used to describe the execution mode of the query data and to evaluate the actual execution status of the query data according to the execution mode.
[0194] The above-mentioned multimodal data to be processed can be query data (such as query statements) corresponding to one or more queries in the above-mentioned application scenario and execution data associated with the query data. The execution data is used to characterize the query execution status corresponding to the query data. Specifically, the execution data includes expected execution information and actual execution information. The expected execution information is used to determine the expected execution method (such as an execution plan tree) corresponding to the query data, and the actual execution information is used to record the execution records (such as execution logs) and execution evaluations (such as performance indicators) during the actual query execution process corresponding to the query data.
[0195] The one or more queries may be query instances to be processed. For example, the one or more queries may be query instances that are detected to be executing slowly (i.e., experiencing a slow query issue). The execution data may include a portion describing the execution method of the query statement corresponding to the query data, and another portion describing execution performance indicators (e.g., execution speed, execution result accuracy, etc.) corresponding to the actual execution of the query statement according to the execution method.
[0196] The execution data of the above-mentioned query data can characterize the execution attributes corresponding to the above-mentioned query data, such as execution speed attributes, accuracy attributes, recall rate attributes, execution cost attributes, etc. The target root causes corresponding to the above-mentioned execution attributes are used to characterize: the factors that cause the current query instance to have the execution attributes of the above-mentioned query data. For example, the above-mentioned execution attribute is an execution speed attribute. When the execution attribute corresponding to a certain query instance determines that the query statement of the current query instance is executed slowly (that is, a slow query problem occurs), a root cause analysis of the execution attribute is performed based on the multimodal data corresponding to the query instance. The obtained target root cause is used to characterize one or more factors that cause the slow query problem in the current query instance.
[0197] According to the above-mentioned target root cause and multimodal data, a target solution is searched and selected from the candidate solutions. According to the target solution, at least part of the multimodal data can be adjusted, that is, the target solution is used to determine the adjustment strategy for at least part of the multimodal data. For example, when a slow query problem occurs in the current query instance, according to the target root cause corresponding to the above-mentioned slow query problem and the multimodal data corresponding to the current query instance, the target solution is queried to obtain the query optimization strategy corresponding to the current query instance. According to the query optimization strategy, the current query instance is adjusted to solve the slow query problem that occurs in the current query instance and improve the execution efficiency of the query statement in the current query instance.
[0198] In an embodiment of the present application, a currently input query processing dialogue request is obtained; in response to the query processing dialogue request, a query processing dialogue reply is returned; wherein, the request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the information carried in the query processing dialogue reply includes: a target solution, the target solution is determined based on a target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the multimodal data; and the target solution is displayed in a graphical user interface.
[0199] It is easy to notice that this application takes into account multimodal data including query data and related execution data in the process of performing root cause analysis on query data, and obtains a more accurate target root cause. As a result, this application achieves the purpose of determining the target solution based on the target root cause and multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, and further solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0200] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Example 1 and will not be repeated here.
[0201] Example 4
[0202] According to an embodiment of the present application, a device embodiment for implementing the above-mentioned query processing method is also provided. Figure 6 is a structural diagram of a query processing device according to embodiment 4 of the present application, such as Figure 6 As shown, the device includes:
[0203] An acquisition module 601 is configured to acquire multimodal data to be processed, wherein the multimodal data includes query data and execution data associated with the query data, wherein the execution data is used to represent the execution status of the query corresponding to the query data;
[0204] An analysis module 602 is configured to perform root cause analysis on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes;
[0205] The search module 603 is configured to search for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least a portion of the multimodal data.
[0206] Optionally, the above-mentioned analysis module 602 is also used to: perform feature extraction on multimodal data to obtain multiple feature vectors corresponding to the multimodal data; perform feature fusion on multiple feature vectors to obtain a target fusion result; perform root cause prediction based on the target fusion result to obtain a target root cause corresponding to the execution attribute.
[0207] Optionally, the query data includes: query statements to be executed, and the execution data includes: execution plans, execution logs and performance indicators associated with the query statements. The above-mentioned analysis module 602 is also used to: perform feature extraction on the query statements through a multimodal information alignment method with a preset granularity to obtain query statement feature vectors, perform feature extraction on the execution plan to obtain execution plan feature vectors, and perform feature extraction on the execution log to obtain execution log feature vectors; use a preset neural network model to perform feature extraction on the performance indicators to obtain time series performance indicator feature vectors.
[0208] Optionally, the above-mentioned analysis module 602 is also used to: perform root cause common feature fusion on the query statement feature vector, execution plan feature vector, execution log feature vector and timing performance indicator feature vector to obtain a common feature fusion result; perform root cause specific feature fusion on some features selected from the query statement feature vector, execution plan feature vector, execution log feature vector and timing performance indicator feature vector to obtain a specific feature fusion result; and fuse the common feature fusion result with the specific feature fusion result to obtain a target fusion result.
[0209] Optionally, the above-mentioned analysis module 602 is also used to: set the query statement feature vector as the query input item of the cross-attention calculation, and set the key input item and value input item of the cross-attention calculation based on the query statement feature vector, the execution plan feature vector, the execution log feature vector and the timing performance indicator feature vector; perform root cause common feature fusion on the query input item, the key input item and the value input item to obtain the common feature fusion result.
[0210] Optionally, in addition to all the above-mentioned modules, the query processing device further includes: a processing module 604 (not shown in the figure), which is used to: normalize the query statement feature vector according to a preset normalization processing method to obtain a first processing result, and select partial features corresponding to the query statement feature vector based on the first processing result and the query statement feature vector; normalize the execution plan feature vector according to a preset normalization processing method to obtain a second processing result, and select partial features corresponding to the execution plan feature vector based on the second processing result and the execution plan feature vector; normalize the execution log feature vector according to a preset normalization processing method to obtain a third processing result, and select partial features corresponding to the execution log feature vector based on the third processing result and the execution log feature vector; normalize the timing performance indicator feature vector according to a preset normalization processing method to obtain a fourth processing result, and select partial features corresponding to the timing performance indicator feature vector based on the fourth processing result and the timing performance indicator feature vector.
[0211] Optionally, the above-mentioned analysis module 602 is also used to: set part of the features corresponding to the query statement feature vector as query input items for cross-attention calculation, and set key input items and value input items for cross-attention calculation based on part of the features corresponding to the query statement feature vector, part of the features corresponding to the execution plan feature vector, part of the features corresponding to the execution log feature vector, and part of the features corresponding to the timing performance indicator feature vector; perform root cause-specific feature fusion on the query input items, key input items, and value input items to obtain a specific feature fusion result.
[0212] Optionally, the above-mentioned analysis module 602 is also used to: use the target root cause prediction model to perform root cause prediction on the target fusion result to obtain multiple candidate prediction impact scores corresponding to the execution attribute; and determine the target root cause corresponding to the execution attribute based on the multiple candidate prediction impact scores.
[0213] Optionally, the analysis module 602 is further configured to: select some predicted impact scores greater than a preset threshold from a plurality of candidate predicted impact scores; sort the some predicted impact scores from large to small to determine the target root cause corresponding to the execution attribute.
[0214] Optionally, in addition to all the above modules, the query processing device further includes: a training module 605 (not shown in the figure), which is used to: use sample data to train the initial root cause prediction model to obtain a training influence score, wherein the sample data includes: sample fusion results, and the sample fusion results are generated based on the query sample and the sample plan, sample log and sample performance indicators associated with the query sample; obtain the regression loss, sequence loss and threshold loss corresponding to the training influence score, wherein the regression loss is used to constrain the difference between the training influence score and the true influence score, the sequence loss is used to constrain the difference between the predicted ranking of the training influence score and the actual ranking of the true influence score, and the threshold loss is used to constrain the difference between the training influence score and the preset threshold; adjust the model parameters of the initial root cause prediction model based on the regression loss, sequence loss and threshold loss to obtain the target root cause prediction model.
[0215] Optionally, the search module 603 is further configured to: perform document retrieval on the target root cause and the multimodal data using a document retrieval model to obtain candidate root cause documents; and search for a target solution based on the candidate root cause documents.
[0216] In an embodiment of the present application, an acquisition module is used to acquire multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; an analysis module is used to perform root cause analysis on the execution attributes of the query data based on the multimodal data to obtain a target root cause corresponding to the execution attribute; and a search module is used to search for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0217] It is easy to notice that this application takes into account multimodal data including query data and related execution data in the process of performing root cause analysis on query data, and obtains a more accurate target root cause. As a result, this application achieves the purpose of determining the target solution based on the target root cause and multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, and further solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0218] It should be noted that the acquisition module 601, analysis module 602, and search module 603 correspond to steps S21 to S23 in Example 1. The examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.
[0219] According to an embodiment of the present application, a device embodiment for implementing the query processing method in the above embodiment 2 is also provided. Figure 7 is a structural diagram of another query processing device according to embodiment 4 of the present application, such as Figure 7 As shown, the device includes:
[0220] An acquisition module 701 is configured to acquire a query processing request through a first application programming interface;
[0221] A returning module 702 is configured to return a query processing response via a second application programming interface;
[0222] Among them, the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: target solution, the target solution is determined based on the target root cause and multimodal data, the target root cause is obtained by root cause analysis of the execution attributes of the query data based on the multimodal data, and the target solution is used to determine the adjustment method of at least part of the data in the multimodal data.
[0223] It should be noted that the acquisition module 701 and the return module 702 correspond to steps S41 to S42 in Example 2. The examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 2. It should be noted that the modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.
[0224] According to an embodiment of the present application, a device embodiment for implementing the query processing method in the above-mentioned embodiment 3 is also provided. Figure 8is a structural diagram of another query processing device according to embodiment 4 of the present application, such as Figure 8 As shown, the device includes:
[0225] The acquisition module 801 is used to acquire the query processing dialogue request currently input;
[0226] A reply module 802 is configured to return a query processing dialogue reply in response to the query processing dialogue request;
[0227] The request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to represent the query execution status corresponding to the query data; the information carried in the query processing dialogue reply includes: a target solution, the target solution is determined based on the target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine how to adjust at least part of the multimodal data;
[0228] The display module 803 is used to display the target solution in the graphical user interface.
[0229] It should be noted that the acquisition module 801, reply module 802, and display module 803 correspond to steps S501 to S503 in Example 3. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 3. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules can also be run as part of the device in the computer terminal 10 provided in Example 1.
[0230] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in Example 1, Example 2 or Example 3, and will not be repeated here.
[0231] Example 5
[0232] According to an embodiment of the present application, a computer terminal is further provided, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0233] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.
[0234] In this embodiment, the computer terminal can execute the program code of the following steps in the query processing method: obtaining multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain a target root cause corresponding to the execution attribute; and searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0235] Optionally, Figure 9 is a structural block diagram of a computer terminal according to embodiment 5 of the present application, such as Figure 9 As shown, the computer terminal 90 may include: one or more (only one is shown in the figure) processors 902, a memory 904, a storage controller 906, and a peripheral interface 908, wherein the peripheral interface 908 is connected to the radio frequency module, the audio module and the display.
[0236] Among them, the memory 904 can be used to store software programs and modules, such as the program instructions / modules corresponding to the query processing method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned query processing method. The memory 904 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 904 may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 90 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0237] The processor 902 can call the information and application stored in the memory through the transmission device to perform the following steps: obtaining multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain the target root cause corresponding to the execution attribute; and searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0238] Optionally, the processor 902 may also execute the program code of the following steps: performing feature extraction on multimodal data to obtain multiple feature vectors corresponding to the multimodal data; performing feature fusion on multiple feature vectors to obtain a target fusion result; performing root cause prediction based on the target fusion result to obtain a target root cause corresponding to the execution attribute.
[0239] Optionally, the processor 902 may also execute the program code of the following steps: the query data includes: the query statement to be executed, and the execution data includes: the execution plan, execution log, and performance indicators associated with the query statement; through a multimodal information alignment method with a preset granularity, feature extraction is performed on the query statement to obtain a query statement feature vector, feature extraction is performed on the execution plan to obtain an execution plan feature vector, and feature extraction is performed on the execution log to obtain an execution log feature vector; and feature extraction is performed on the performance indicator using a preset neural network model to obtain a time series performance indicator feature vector.
[0240] Optionally, the processor 902 may also execute the program code of the following steps: performing root cause common feature fusion on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector to obtain a common feature fusion result; performing root cause specific feature fusion on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector to obtain a specific feature fusion result; and fusing the common feature fusion result with the specific feature fusion result to obtain a target fusion result.
[0241] Optionally, the processor 902 may also execute the program code of the following steps: setting the query statement feature vector as the query input item for the cross-attention calculation, and setting the key input item and value input item for the cross-attention calculation based on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector; performing root cause common feature fusion on the query input item, the key input item, and the value input item to obtain a common feature fusion result.
[0242] Optionally, the processor 902 may also execute the program code for the following steps: normalizing the query statement feature vector according to a preset normalization processing method to obtain a first processing result, and selecting partial features corresponding to the query statement feature vector based on the first processing result and the query statement feature vector; normalizing the execution plan feature vector according to a preset normalization processing method to obtain a second processing result, and selecting partial features corresponding to the execution plan feature vector based on the second processing result and the execution plan feature vector; normalizing the execution log feature vector according to a preset normalization processing method to obtain a third processing result, and selecting partial features corresponding to the execution log feature vector based on the third processing result and the execution log feature vector; normalizing the timing performance indicator feature vector according to a preset normalization processing method to obtain a fourth processing result, and selecting partial features corresponding to the timing performance indicator feature vector based on the fourth processing result and the timing performance indicator feature vector.
[0243] Optionally, the processor 902 may also execute the program code of the following steps: setting partial features corresponding to the query statement feature vector as query input items for cross-attention calculation, and setting key input items and value input items for cross-attention calculation based on partial features corresponding to the query statement feature vector, partial features corresponding to the execution plan feature vector, partial features corresponding to the execution log feature vector, and partial features corresponding to the timing performance indicator feature vector; performing root cause-specific feature fusion on the query input items, key input items, and value input items to obtain a specific feature fusion result.
[0244] Optionally, the processor 902 may also execute the program code of the following steps: using the target root cause prediction model to perform root cause prediction on the target fusion result to obtain multiple candidate prediction impact scores corresponding to the execution attributes; and determining the target root cause corresponding to the execution attribute based on the multiple candidate prediction impact scores.
[0245] Optionally, the processor 902 may also execute the following program code: filter out some predicted impact scores greater than a preset threshold from multiple candidate predicted impact scores; sort the some predicted impact scores from large to small to determine the target root cause corresponding to the execution attribute.
[0246] Optionally, the processor 902 may also execute the program code for the following steps: training the initial root cause prediction model using sample data to obtain a training influence score, wherein the sample data includes: sample fusion results, which are generated based on the query sample and the sample plan, sample log, and sample performance indicators associated with the query sample; obtaining the regression loss, sequence loss, and threshold loss corresponding to the training influence score, wherein the regression loss is used to constrain the difference between the training influence score and the true influence score, the sequence loss is used to constrain the difference between the predicted ranking of the training influence score and the actual ranking of the true influence score, and the threshold loss is used to constrain the difference between the training influence score and a preset threshold; adjusting the model parameters of the initial root cause prediction model based on the regression loss, sequence loss, and threshold loss to obtain a target root cause prediction model.
[0247] Optionally, the processor 902 may further execute program code for the following steps: performing document retrieval on the target root cause and multimodal data using a document retrieval model to obtain candidate root cause documents; and searching for a target solution based on the candidate root cause documents.
[0248] The processor 902 can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a query processing request through a first application programming interface; return a query processing response through a second application programming interface; wherein the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: a target solution, the target solution is determined based on the target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine the adjustment method of at least part of the data in the multimodal data.
[0249] The processor 902 can call information and applications stored in the memory through a transmission device to perform the following steps: obtaining a currently input query processing dialogue request; returning a query processing dialogue reply in response to the query processing dialogue request; wherein the request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data; the information carried in the query processing dialogue reply includes: a target solution, the target solution is determined based on a target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the multimodal data; and the target solution is displayed in a graphical user interface.
[0250] According to an embodiment of the present application, a computer terminal for implementing the above-mentioned query processing method is provided. Multimodal data to be processed is obtained, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; root cause analysis is performed on the execution attributes of the query data based on the multimodal data to obtain the target root cause corresponding to the execution attribute; and target solutions are searched based on the target root cause and the multimodal data, wherein the target solution is used to determine the adjustment method for at least part of the data in the multimodal data. It is easy to notice that the present application takes into account the multimodal data including the query data and the related execution data in the process of performing root cause analysis on the query data, and obtains a more accurate target root cause. Thus, the present application achieves the purpose of determining the target solution according to the target root cause and the multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, thereby solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0251] It can be understood by those skilled in the art that Figure 9 The structure shown is for illustration only, and the computer terminal may also be a terminal device such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, or a mobile Internet device (MID). Figure 9 It does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal 90 may also include Figure 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 9 Different configurations shown.
[0252] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0253] Example 6
[0254] According to an embodiment of the present application, a computer-readable storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the query processing method provided in the above embodiment 1, embodiment 2 or embodiment 3.
[0255] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0256] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes; and searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0257] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing feature extraction on multimodal data to obtain multiple feature vectors corresponding to the multimodal data; performing feature fusion on multiple feature vectors to obtain a target fusion result; performing root cause prediction based on the target fusion result to obtain a target root cause corresponding to the execution attribute.
[0258] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: the query data includes: the query statement to be executed, and the execution data includes: the execution plan, execution log and performance indicators associated with the query statement; through a multimodal information alignment method with a preset granularity, feature extraction is performed on the query statement to obtain a query statement feature vector, feature extraction is performed on the execution plan to obtain an execution plan feature vector, and feature extraction is performed on the execution log to obtain an execution log feature vector; and feature extraction is performed on the performance indicator using a preset neural network model to obtain a time series performance indicator feature vector.
[0259] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing root cause common feature fusion on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector to obtain a common feature fusion result; performing root cause specific feature fusion on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector to obtain a specific feature fusion result; and fusing the common feature fusion result with the specific feature fusion result to obtain a target fusion result.
[0260] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: setting the query statement feature vector as the query input item of the cross-attention calculation, and setting the key input item and value input item of the cross-attention calculation based on the query statement feature vector, the execution plan feature vector, the execution log feature vector and the timing performance indicator feature vector; performing root cause common feature fusion on the query input item, the key input item and the value input item to obtain the common feature fusion result.
[0261] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: normalizing the query statement feature vector according to a preset normalization processing method to obtain a first processing result, and selecting partial features corresponding to the query statement feature vector based on the first processing result and the query statement feature vector; normalizing the execution plan feature vector according to a preset normalization processing method to obtain a second processing result, and selecting partial features corresponding to the execution plan feature vector based on the second processing result and the execution plan feature vector; normalizing the execution log feature vector according to a preset normalization processing method to obtain a third processing result, and selecting partial features corresponding to the execution log feature vector based on the third processing result and the execution log feature vector; normalizing the timing performance indicator feature vector according to a preset normalization processing method to obtain a fourth processing result, and selecting partial features corresponding to the timing performance indicator feature vector based on the fourth processing result and the timing performance indicator feature vector.
[0262] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: setting partial features corresponding to the query statement feature vector as query input items for cross-attention calculation, and setting key input items and value input items for cross-attention calculation based on partial features corresponding to the query statement feature vector, partial features corresponding to the execution plan feature vector, partial features corresponding to the execution log feature vector, and partial features corresponding to the timing performance indicator feature vector; performing root cause-specific feature fusion on the query input items, key input items, and value input items to obtain a specific feature fusion result.
[0263] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing root cause prediction on the target fusion result using the target root cause prediction model to obtain multiple candidate prediction impact scores corresponding to the execution attribute; and determining the target root cause corresponding to the execution attribute based on the multiple candidate prediction impact scores.
[0264] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: filtering out some prediction impact scores that are greater than a preset threshold from multiple candidate prediction impact scores; sorting the some prediction impact scores from large to small, and determining the target root cause corresponding to the execution attribute.
[0265] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: training the initial root cause prediction model using sample data to obtain a training influence score, wherein the sample data includes: sample fusion results, and the sample fusion results are generated based on the query sample and the sample plan, sample log and sample performance indicators associated with the query sample; obtaining the regression loss, sequence loss and threshold loss corresponding to the training influence score, wherein the regression loss is used to constrain the difference between the training influence score and the true influence score, the sequence loss is used to constrain the difference between the predicted ranking of the training influence score and the actual ranking of the true influence score, and the threshold loss is used to constrain the difference between the training influence score and a preset threshold; adjusting the model parameters of the initial root cause prediction model based on the regression loss, sequence loss and threshold loss to obtain the target root cause prediction model.
[0266] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: using a document retrieval model to perform document retrieval on the target root cause and multimodal data to obtain candidate root cause documents; and searching for a target solution based on the candidate root cause documents.
[0267] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining a query processing request through a first application programming interface; returning a query processing response through a second application programming interface; wherein the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: a target solution, the target solution is determined based on the target root cause and the multimodal data, the target root cause is obtained after root cause analysis of the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0268] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining a currently input query processing dialogue request; returning a query processing dialogue reply in response to the query processing dialogue request; wherein the request data carried in the query processing dialogue request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, the information carried in the query processing dialogue reply includes: a target solution, the target solution is determined based on a target root cause and the multimodal data, the target root cause is obtained by performing a root cause analysis on the execution attributes of the query data based on the multimodal data, and the target solution is used to determine an adjustment method for at least part of the data in the multimodal data; and the target solution is displayed in a graphical user interface.
[0269] According to an embodiment of the present application, a computer-readable storage medium for implementing the above-mentioned query processing method is provided. Multimodal data to be processed is obtained, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; root cause analysis is performed on the execution attributes of the query data based on the multimodal data to obtain the target root cause corresponding to the execution attribute; and target solutions are searched based on the target root cause and the multimodal data, wherein the target solution is used to determine the adjustment method for at least part of the data in the multimodal data. It is easy to notice that the present application takes into account the multimodal data including the query data and the related execution data in the process of performing root cause analysis on the query data, and obtains a more accurate target root cause. Thus, the present application achieves the purpose of determining the target solution according to the target root cause and the multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, thereby solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0270] According to an embodiment of the present application, a computer program product is further provided. Optionally, in this embodiment, the computer program product can provide query processing services based on the query processing method provided in the above embodiment 1, embodiment 2, or embodiment 3.
[0271] Optionally, in this embodiment, the computer program product may be a set of instructions and codes pre-written according to the query processing method. The computer program product may run on various computer platforms, including personal computers, servers, mobile devices, etc.
[0272] Optionally, in this embodiment, the instructions and codes corresponding to the computer program product are used to implement the following method steps: obtaining multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, and the execution data is used to characterize the query execution status corresponding to the query data; performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes; and searching for a target solution based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least part of the data in the multimodal data.
[0273] Through the above-mentioned computer program product, it is possible to provide query processing services in application scenarios involving root cause analysis and query adjustment for slow query problems. In the above-mentioned query processing service, in the process of performing root cause analysis on query data, multimodal data including query data and related execution data is taken into account to obtain a more accurate target root cause. As a result, the present application achieves the purpose of determining the target solution based on the target root cause and multimodal data to achieve query adjustment, thereby achieving the technical effect of improving query efficiency and enhancing query accuracy, thereby solving the technical problem that query optimization is difficult and the query result accuracy is poor due to the lack of root cause analysis for slow query problems in related technologies.
[0274] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0275] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0276] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0277] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0278] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0279] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, ROM, RAM, mobile hard drives, magnetic disks or optical disks.
[0280] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A query processing method, characterized in that: include: Acquire multimodal data to be processed, wherein the multimodal data includes: query data and execution data associated with the query data, the execution data being used to characterize query execution status corresponding to the query data; Performing root cause analysis on the execution attributes of the query data based on the multimodal data to obtain target root causes corresponding to the execution attributes; A target solution is searched for based on the target root cause and the multimodal data, wherein the target solution is used to determine an adjustment method for at least a portion of the multimodal data.
2. The query processing method according to claim 1, characterized in that: Performing root cause analysis on the execution attribute of the query data based on the multimodal data to obtain the target root cause corresponding to the execution attribute includes: Performing feature extraction on the multimodal data to obtain a plurality of feature vectors corresponding to the multimodal data; Performing feature fusion on the multiple feature vectors to obtain a target fusion result; Root cause prediction is performed based on the target fusion result to obtain the target root cause corresponding to the execution attribute.
3. The query processing method according to claim 2, wherein: The query data includes: a query statement to be executed, and the execution data includes: an execution plan, an execution log, and performance indicators associated with the query statement. Feature extraction is performed on the multimodal data to obtain the multiple feature vectors corresponding to the multimodal data, including: By using a multimodal information alignment method with a preset granularity, feature extraction is performed on the query statement to obtain a query statement feature vector, feature extraction is performed on the execution plan to obtain an execution plan feature vector, and feature extraction is performed on the execution log to obtain an execution log feature vector. The performance indicators are characterized by using a preset neural network model to obtain a time series performance indicator feature vector.
4. The query processing method according to claim 3, wherein: Performing feature fusion on the multiple feature vectors to obtain the target fusion result includes: Performing root cause common feature fusion on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a common feature fusion result; Performing root cause-specific feature fusion on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain a specific feature fusion result; The common feature fusion result and the unique feature fusion result are fused to obtain the target fusion result.
5. The query processing method according to claim 4, characterized in that: Performing root cause common feature fusion on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector to obtain the common feature fusion result includes: Setting the query statement feature vector as a query input item of a cross-attention calculation, and setting a key input item and a value input item of the cross-attention calculation based on the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the timing performance indicator feature vector; The query input item, the key input item, and the value input item are subjected to root cause common feature fusion to obtain the common feature fusion result.
6. The query processing method according to claim 4, characterized in that: The query processing method further includes: Normalizing the query statement feature vector according to a preset normalization processing method to obtain a first processing result, and selecting partial features corresponding to the query statement feature vector based on the first processing result and the query statement feature vector; Normalizing the execution plan feature vector according to the preset normalization processing method to obtain a second processing result, and selecting partial features corresponding to the execution plan feature vector based on the second processing result and the execution plan feature vector; Normalizing the execution log feature vector according to the preset normalization processing method to obtain a third processing result, and selecting partial features corresponding to the execution log feature vector based on the third processing result and the execution log feature vector; The timing performance indicator feature vector is normalized according to the preset normalization processing method to obtain a fourth processing result, and partial features corresponding to the timing performance indicator feature vector are selected based on the fourth processing result and the timing performance indicator feature vector.
7. The query processing method according to claim 4, characterized in that: Performing root cause-specific feature fusion on some features selected from the query statement feature vector, the execution plan feature vector, the execution log feature vector, and the time series performance indicator feature vector, to obtain the specific feature fusion result includes: Setting some features corresponding to the query statement feature vector as query input items of a cross-attention calculation, and setting key input items and value input items of the cross-attention calculation based on some features corresponding to the query statement feature vector, some features corresponding to the execution plan feature vector, some features corresponding to the execution log feature vector, and some features corresponding to the timing performance indicator feature vector; The query input item, the key input item, and the value input item are subjected to root cause-specific feature fusion to obtain the specific feature fusion result.
8. The query processing method according to claim 2, wherein: Root cause prediction is performed based on the target fusion result to obtain the target root cause corresponding to the execution attribute, including: Performing root cause prediction on the target fusion result using a target root cause prediction model to obtain a plurality of candidate prediction impact scores corresponding to the execution attributes; The target root cause corresponding to the execution attribute is determined based on the multiple candidate predicted impact scores.
9. The query processing method according to claim 8, characterized in that: Determining the target root cause corresponding to the execution attribute based on the multiple candidate predicted impact scores includes: Filtering out some predicted impact scores greater than a preset threshold from the multiple candidate predicted impact scores; The partial predicted impact scores are sorted from largest to smallest to determine the target root cause corresponding to the execution attribute.
10. The query processing method according to claim 9, characterized in that: The query processing method further includes: Training an initial root cause prediction model using sample data to obtain a training impact score, wherein the sample data includes: a sample fusion result generated based on a query sample and a sample plan, a sample log, and a sample performance indicator associated with the query sample; Obtaining a regression loss, a sequence loss, and a threshold loss corresponding to the training influence score, wherein the regression loss is used to constrain the difference between the training influence score and the true influence score, the sequence loss is used to constrain the difference between the predicted ranking of the training influence score and the actual ranking of the true influence score, and the threshold loss is used to constrain the difference between the training influence score and the preset threshold; The model parameters of the initial root cause prediction model are adjusted based on the regression loss, the sequence loss, and the threshold loss to obtain the target root cause prediction model.
11. The query processing method according to claim 1, wherein: Searching for the target solution based on the target root cause and the multimodal data includes: Using a document retrieval model to perform document retrieval on the target root cause and the multimodal data to obtain candidate root cause documents; The target solution is found based on the candidate root cause document.
12. A query processing method, characterized in that: include: obtaining a query processing request through a first application programming interface; returning a query processing response via a second application programming interface; Among them, the request data carried in the query processing request includes: multimodal data to be processed, the multimodal data includes: query data and execution data associated with the query data, the execution data is used to characterize the query execution status corresponding to the query data, and the response data carried in the query processing response includes: target solution, the target solution is determined based on the target root cause and the multimodal data, the target root cause is obtained after root cause analysis of the execution attributes of the query data based on the multimodal data, and the target solution is used to determine the adjustment method of at least part of the data in the multimodal data.
13. An electronic device, characterized in that: include: a memory storing an executable program; A processor is configured to run the program, wherein the program executes the query processing method according to any one of claims 1 to 12 when running.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the query processing method according to any one of claims 1 to 12.
15. A computer program product, characterized in that The computer program comprises a computer program which, when executed by a processor, implements the query processing method according to any one of claims 1 to 12.