Database query parameter optimization method and device, medium, equipment and product

By applying the nerve process model in the database query parameter optimization, the parameter update is used to use the certainty and potential feature information of the inquiries of the execution results, solving the problem of low efficiency of database query parameters in existing technology, and achieve more efficient database query performance optimization.

CN119336794APending Publication Date: 2025-01-21BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411598102.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, the optimization efficiency of database query parameters is low, especially when the number of database query engine instances arranged in the cloud is huge and the hardware resources and workloads are different, different databases need to be set up for different query engine instances. Parameters lead to a large number of adjusted and optimized database parameters and low efficiency.

Method used

The database query parameters are updated with a neural process model. The parameter optimization is performed by obtaining the certainty feature information and potential feature information of the inquiry execution result. The neural process model combines the advantages of the Gaussian process and the neural network, has efficient calculation efficiency and probability modeling ability, and supports integrated depth encoders.

Benefits of technology

Optimizing database query parameters through the neural process model reduces the complexity of data processing, improves the efficiency of parameter update, and can optimize database query performance more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336794A_ABST
    Figure CN119336794A_ABST
Patent Text Reader

Abstract

The invention relates to a database query parameter optimization method and device, a medium, equipment and a product. The method comprises the steps of obtaining a first database query parameter; the first database query parameter is updated based on a neural process model, and the neural process model is used for updating the first database query parameter through the following steps that first deterministic feature information and first potential feature information are obtained, and the deterministic feature information is used for representing deterministic features corresponding to first query execution result information; the potential feature information is used for representing potential features corresponding to the first query execution result information, and the first query execution result information comprises pre-labeled result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; and updating the first database query parameter according to the first deterministic feature information and the first potential feature information. Through the scheme, the calculation complexity is reduced, and the parameter updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of database technology, and in particular, to a database query parameter optimization method, device, medium, equipment and product. Background Art

[0002] With the continuous development of the Internet, the amount of data that needs to be processed on the Internet is increasing day by day. As a system for storing, managing, maintaining and retrieving data, the database plays an increasingly important role. Among them, the database query engine needs to perform SQL queries based on a large amount of data. At present, on the one hand, the functions of the database query engine are increasing, and its configurable database parameters are also increasing. On the other hand, the number of database query engine instances deployed in the cloud is huge, and different query engine instances may have different hardware resource limitations and workloads. Different database parameters need to be set for different query engine instances. During the use of the database query engine, if it needs to be optimized or the usage scenario and usage requirements need to be adjusted, the database parameters also need to be adjusted and optimized accordingly. Therefore, the number of database parameters that need to be adjusted and optimized is large, and the method of adjusting database parameters in related technologies is less efficient. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for optimizing database query parameters, the method comprising: Obtaining a first database query parameter; The first database query parameter is updated based on the neural process model, wherein the neural process model is used to update the first database query parameter in the following manner: Acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The first database query parameter is updated according to the first deterministic feature information and the first potential feature information.

[0005] In a second aspect, the present disclosure provides a database query parameter optimization device, the device comprising: A first acquisition module, used to acquire a first database query parameter; A first updating module is used to update the first database query parameter based on a neural process model, wherein the neural process model is used to update the first database query parameter through the following modules: A second acquisition module is used to acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The second updating module is used to update the first database query parameter according to the first deterministic feature information and the first potential feature information.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the database query parameter optimization method provided in the first aspect of the present disclosure.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the database query parameter optimization method provided in the first aspect of the present disclosure.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the database query parameter optimization method provided in the first aspect of the present disclosure.

[0009] Through the above technical solution, the first database query parameter is updated based on the neural process model, wherein the first database query parameter is updated according to the first deterministic feature information and the first potential feature information, the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes the pre-marked result information obtained by executing the database query operation according to the second database query parameter and the query plan information. In this way, the complexity of processing data based on the neural process model is low, and the neural process model supports the integration of deep encoders. Therefore, the first database query parameter is updated based on the neural process model, and the first database query parameter can be updated by deep learning, and the complexity of data processing can be reduced, and the efficiency of updating the first database query parameter can be improved.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The figure is a flow chart of a method for optimizing database query parameters according to an exemplary embodiment.

[0012] Figure 2 It is a schematic diagram showing a method of determining second query execution result information based on a neural process model according to an exemplary embodiment.

[0013] Figure 3 The figure is a block diagram of a database query parameter optimization device according to an exemplary embodiment.

[0014] Figure 4 An electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0026] In the related art, the database parameter adjustment method based on Bayesian optimization occupies a very important position among many database parameter adjustment methods. For example, the database parameters can be adjusted through the traditional Bayesian optimization model, or on the basis of the Bayesian optimization model, constraints on resource utilization can be set to ensure that the database parameters are adjusted under the premise of meeting the query throughput requirements and query latency requirements. However, the database parameter adjustment method based on Bayesian optimization in the related art has low efficiency in optimizing database parameters. The reason is that in the process of modeling the unknown objective function, Bayesian optimization uses random processes to act as agents. In the related art, the random process generally uses Gaussian Processes (GP). When processing data based on Gaussian processes, corresponding assumptions are made based on the important characteristic of the smoothness of black box functions, and prior information is obtained through the key path of parameterized kernel functions. However, in actual application scenarios, kernel functions need to be defined in advance and are limited in form, so it is very difficult to design a suitable kernel function. In addition, there is a more prominent problem with Gaussian processes, that is, the computational cost is high and the computational complexity reaches O (( n + m ) 3 ), which requires a lot of computing resources, including n represents the number of observations, m Indicates the number of predicted targets. In addition, the Gaussian process is not built based on deep learning, and it is impossible to integrate the deep encoder into the Bayesian optimization model based on the Gaussian process, so it is impossible to update the database parameters in combination with deep learning.

[0027] Therefore, in the present disclosure, the database query parameters are updated based on neural processes (NP). The neural process combines the advantages of both Gaussian process and neural network. Among them, the neural process has high computational efficiency that the Gaussian process does not have. The computational complexity based on the neural process is O ( n + m ), which is lower than the computational complexity of the Gaussian process. When faced with large-scale data and complex computing tasks, the advantage of high computational efficiency is particularly important, which can improve the operating speed and responsiveness of the system. In addition, the neural process has probabilistic modeling capabilities and can better handle the uncertainty in the data, providing a more reliable and accurate basis for updating database query parameters.

[0028] Figure 1 FIG. 1 is a flowchart of a method for optimizing database query parameters according to an exemplary embodiment. The method can be applied to electronic devices with processing capabilities, such as servers, personal computers, and other devices. Figure 1 As shown, the method may include step 11 and step 12.

[0029] In step 11, a first database query parameter is obtained.

[0030] The database query parameters include parameters related to the database query operation, such as parameters related to the amount of resources used for the query, etc. During the use of the database, in order to adapt the database to different usage scenarios and meet different usage requirements, or to optimize the performance of the database, the database query parameters need to be adjusted.

[0031] In the present disclosure, the first database query parameter may be a database query parameter that needs to be adjusted. For example, the first database query parameter may be a query parameter that needs to be adjusted and is actually used in the database, or may be a parameter randomly generated within the value range corresponding to the query parameter actually used in the database. In addition, in the present disclosure, the first database query parameter may be updated through multiple iterations, and in this iteration, the first database query parameter may be the first database query parameter after the update in the previous iteration. In one embodiment, the first database query parameter may be a single query parameter to be adjusted. In another embodiment, since there are usually multiple database query parameters, and multiple database query parameters act together on the query operation of the database, preferably, the first database query parameter may be a group of parameters, i.e., including multiple database query parameters. In the present disclosure, these multiple database query parameters may be updated.

[0032] In step 12, the first database query parameters are updated based on the neural process model.

[0033] The neural process model is used to update the first database query parameter in the following manner: Acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to the second database query parameter and the preset query plan information; The first database query parameter is updated according to the first deterministic feature information and the first potential feature information.

[0034] Among them, the second database query parameter can be a query parameter actually used in the database system, or a sample parameter generated by a method in the relevant technology, and the second database query parameter can be the same as or different from the first database query parameter. The preset query plan information may include query execution steps set to complete the query operation. The first query execution result information may include the first query duration, first query throughput, first query status information, etc. obtained by executing the database query operation according to the second database query parameters and the query plan information, and the query status information is used to characterize whether the query operation is successful. Among them, the pre-marked first query execution result information can be the actual result information obtained by the database system running based on the second database query parameters, or it can be manually marked result information, or it can also be any method in the relevant technology, such as result information obtained by a neural network model used to determine the query execution result. The present disclosure does not limit the method for obtaining the first query execution result information.

[0035] Among them, when processing data, the neural process model can divide feature information into deterministic feature information and potential feature information. The deterministic feature information represents the deterministic stable features in the data, and the potential feature information can also be called uncertain feature information, which is used to reflect the uncertainty in the data, such as data noise. In one embodiment, the first deterministic feature information and the first potential feature information can be predetermined. For example, according to the second database query parameter, the query plan information and the first query execution result information, the deep encoder in the neural process model is used to extract features to obtain the first deterministic feature information and the first potential feature information. The first deterministic feature information is used to represent the overall deterministic features corresponding to the first query execution result information, and the first potential feature information is used to represent the overall potential features corresponding to the first query execution result information.

[0036] According to the first deterministic feature information and the first potential feature information, the first database query parameter is updated, for example, with the purpose of shortening the database query time or increasing the database query throughput, so as to optimize the first database query parameter. In the present disclosure, the first database query parameter can be updated once based on the neural process model, and the updated first database query parameter can optimize the database query performance, which can achieve the purpose of optimizing the first database query parameter. Preferably, the first database query parameter can also be iteratively updated multiple times, so that the iteratively updated first database query parameter can further optimize the database query performance.

[0037] Through the above technical solution, the first database query parameter is updated based on the neural process model, wherein the first database query parameter is updated according to the first deterministic feature information and the first potential feature information, the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes the pre-marked result information obtained by executing the database query operation according to the second database query parameter and the query plan information. In this way, the complexity of processing data based on the neural process model is low, and the neural process model supports the integration of deep encoders. Therefore, the first database query parameter is updated based on the neural process model, and the first database query parameter can be updated by deep learning, and the complexity of data processing can be reduced, and the efficiency of updating the first database query parameter can be improved.

[0038] For example, the second database query parameters may be M groups, where M≥1 and M is an integer, and each group of second database query parameters may include multiple query parameters. If the second database query parameters are a group, the first query execution result information is the result information obtained based on the group of second database query parameters. Preferably, in order to make the feature information richer, there may be multiple groups of second database query parameters, and the second database query parameters included in different groups may be different. For example, the second database query parameters may be 3 groups. For example, the first group of second database query parameters corresponds to the first query execution result information y1, the second group of second database query parameters corresponds to the first query execution result information y2, and the third group of second database query parameters corresponds to the first query execution result information y3. Among them, the second database query parameters, the query plan information, and the first query execution result information may constitute sample data, and the sample data may include the input and output pairs (x C ,y C ), x C is a first vector representation generated according to the query plan information and a set of second database query parameters, y C The result information of the corresponding first query execution. The sample data can be regarded as the context set in the neural process. When processing data, the neural process is divided into a deterministic path and a potential path, and the potential path can also be called an uncertain path. The deterministic path can abstractly express the context set as deterministic feature information, and the deterministic feature information represents the deterministic and stable features in the context set. The potential path can model a global latent variable from the context set, and the global latent variable can reflect the global uncertainty in the context set.

[0039] In the present disclosure, the first deterministic feature information and the first latent feature information may be obtained by the neural process model in the following manner: Determine the second deterministic feature information and the second potential feature information corresponding to each group of second database query parameters; Determine the first deterministic feature information according to the second deterministic feature information corresponding to each group of second database query parameters; The first potential feature information is determined according to the second potential feature information corresponding to each group of second database query parameters.

[0040] For example, the second deterministic feature information corresponding to the first group of second database query parameters can represent the deterministic features corresponding to the first query execution result information y1, and the second potential feature information corresponding to the first group of second database query parameters can represent the potential features corresponding to the first query execution result information y1. The second deterministic feature information and second potential feature information corresponding to other groups of second database query parameters are similar.

[0041] Wherein, determining the second deterministic feature information and the second potential feature information corresponding to each group of second database query parameters may include: For each group of second database query parameters, feature extraction is performed based on the first vector representation corresponding to the group of second database query parameters and the first query execution result information corresponding to the group of second database query parameters to obtain second deterministic feature information and second potential feature information corresponding to the group of second database query parameters, wherein the first vector representation corresponding to the group of second database query parameters is a vector representation generated based on the query plan information and the group of second database query parameters.

[0042] Figure 2 It is a schematic diagram of determining second query execution result information based on a neural process model according to an exemplary embodiment, wherein the second query execution result information is result information predicted based on the neural process model, including result information obtained by executing a database query operation according to first database query parameters and query plan information, such as second query duration, second query throughput, and second query status information. Figure 2 The three groups of second database query parameters are taken as an example only for illustration, and the present disclosure does not limit the value of M.

[0043] For example, the first set of second database query parameters includes the parameters a 1 and a 2. According to a 1. a2 and the query plan information generate a first vector representation x1 corresponding to the first group of second database query parameters, for example, the vector representation can be generated by a vector encoder. Similarly, the second group of second database query parameters corresponds to the first vector representation x2, and the third group of second database query parameters corresponds to the first vector representation x3. For example, the first vector representation and the first query execution result information can be input into a deep encoder in the neural process model, and the deep encoder can generate second deterministic feature information based on the deterministic path and second potential feature information based on the potential path according to the first vector representation and the first query execution result information, wherein the deep encoder can be in the form of a multilayer perceptron MLP (Multilayer Perceptron), for example.

[0044] like Figure 2 As shown, for the first group of second database query parameters, feature extraction is performed based on the first vector representation x1 and the first query execution result information y1, and the second deterministic feature information r1 and the second potential feature information u1 can be obtained. For the second group of second database query parameters, feature extraction is performed based on the first vector representation x2 and the first query execution result information y2, and the second deterministic feature information r2 and the second potential feature information u2 can be obtained. Feature extraction is performed based on the first vector representation x3 and the first query execution result information y3, and the second deterministic feature information r3 and the second potential feature information u3 can be obtained.

[0045] In the present disclosure, determining the first deterministic feature information according to the second deterministic feature information corresponding to each group of second database query parameters may include: Aggregating the second vector representation, the first vector representation corresponding to each group of second database query parameters, and the second deterministic feature information corresponding to each group of second database query parameters through an attention mechanism to obtain the first deterministic feature information, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters, and the first vector representation corresponding to each group of second database query parameters is a vector representation generated according to the query plan information and each group of second database query parameters; or, The second deterministic feature information corresponding to each group of second database query parameters is averaged and aggregated to obtain the first deterministic feature information.

[0046] In one embodiment, the second deterministic feature information corresponding to each group of second database query parameters can be aggregated through an attention mechanism. In this embodiment, taking the cross attention mechanism as an example, the first deterministic feature information r can be obtained through the following formula (1): C : r C =Cross - Attention (W q ·x D , W k x, W v ·r)(1) in, Cross - Attention () represents the cross attention mechanism function, matrix W q represents the query vector in the cross-attention mechanism, W k represents the key vector in the cross-attention mechanism, W v represents the value vector in the cross-attention mechanism, x D is the second vector representation, x represents the first vector representation corresponding to each set of second database query parameters, and r represents the second deterministic feature information corresponding to each set of second database query parameters. It should be noted that the aggregation operation can also be performed through other attention mechanisms, and the above-mentioned aggregation operation through the cross attention mechanism is only an example.

[0047] like Figure 2 As shown, the second deterministic feature information r1, the second deterministic feature information r2, the second deterministic feature information r3, the first vector representation x1, the first vector representation x2, the first vector representation x3 and the second vector representation x D , through the attention mechanism, the aggregation operation is performed to obtain the first deterministic feature information r C .

[0048] By aggregating the first deterministic feature information through the attention mechanism, the second vector representation generated according to the first database query parameter can pay more close attention to the deterministic features related to the predicted query execution result, thereby improving the accuracy of the predicted second query execution result information.

[0049] In another embodiment, the first deterministic feature information can be obtained by means of mean aggregation. Figure 2 As shown, the second deterministic feature information r1, the second deterministic feature information r2, and the second deterministic feature information r3 can be averaged to obtain the first deterministic feature information r C The mean aggregation method can make the obtained first deterministic feature information retain the overall characteristics of multiple second deterministic feature information, so as to characterize the overall deterministic characteristics corresponding to multiple first query execution result information.

[0050] In the present disclosure, determining the first potential feature information based on the second potential feature information corresponding to each group of second database query parameters may include: performing mean aggregation on the second potential feature information corresponding to each group of second database query parameters, and then performing a sampling operation on the result after the mean aggregation to obtain the first potential feature information.

[0051] like Figure 2 As shown, the second potential feature information u1, the second potential feature information u2 and the second potential feature information u3 can be averaged and then the averaged results can be sampled to obtain the first potential feature information z. The first potential feature information z is the global latent variable. The reason for averaged aggregation of the second potential feature information is that the overall features of the plurality of second potential feature information can be retained, so that the obtained first potential feature information reflects the overall global uncertainty corresponding to the plurality of first query execution result information.

[0052] The sampling operation may be, for example, an ancestor sampling operation, which is a method of sampling in structural order. The principle of the ancestor sampling operation is to start from the root node (i.e., a node without a parent node) and perform sampling according to the prior probability distribution of the root node. Assuming that the root node is A1, the probability distribution of A1 is P (A1), for the child node A2 of the root node, the probability distribution of A2 depends on the probability distribution of A1, A2 and that is P (A2|A1=a1), according to the conditional probability distribution, A2 is sampled from A1 when A1 is known, and so on. Through this process of sampling in structural order, a complete set of sampling results is finally obtained. The sampling results satisfy the probability dependency defined in the neural process model and reflect the joint probability distribution of the second potential feature information. The first potential feature information generated by the ancestral sampling operation can better reflect the overall potential features of the world.

[0053] In the present disclosure, updating the first database query parameter according to the first deterministic feature information and the first potential feature information may include: Determine second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, the second query execution result information including result information obtained when a database query operation is executed according to the first database query parameter and the query plan information; The first database query parameters are updated according to the second query execution result information.

[0054] In one embodiment, the first database query parameter, query plan information, first deterministic feature information and first potential feature information may be input into a neural network model, and the neural network model may be used to predict the query execution result to obtain second query execution result information output by the neural network model.

[0055] In another embodiment, the implementation method for determining the second query execution result information may be: inputting the first deterministic feature information, the first potential feature information and the second vector representation into the query execution result prediction module of the neural process model to obtain the second query execution result information output by the query execution result prediction module.

[0056] like Figure 2 As shown, the second vector x can be represented by D , the first deterministic feature information r C and the first potential feature information z, are input into the query execution result prediction module to obtain the second query execution result information y D , wherein the query execution result prediction module can be a decoder in the neural process model for predicting the query execution result. In this way, the query execution result prediction module in the neural process model can combine the first deterministic feature information and the first potential feature information, thereby referring to the deterministic and potential features related to the predicted query execution result, and the obtained second query execution result is more accurate.

[0057] If the first database query parameter is updated in an iterative manner, accordingly, after determining the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information, the database query parameter optimization method may further include: Determine whether the iteration stop condition is met; in response to not meeting the iteration stop condition, update the first database query parameter according to the second query execution result information, and update the first potential feature information according to the second query execution result information, and then re-execute the step of determining the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information to the step of determining whether the iteration stop condition is met.

[0058] For example, the iteration stop condition may be that the number of iterations reaches a preset number. If the iteration stop condition is met, the first database query parameter after the current iteration is completed may be used as the final first database query parameter, and the iteration is exited. If the iteration stop condition is not met, the first database query parameter may be updated and the first potential feature information may be updated. Among them, the first potential feature information determined according to the second potential feature information corresponding to each group of second database query parameters described above may be the initial value of the first potential feature information. During the iteration process, the first potential feature information may be updated according to the second query execution result information. In addition, if the second deterministic feature information corresponding to each group of second database query parameters is aggregated through the attention mechanism, then after the first database query parameters are updated, the second vector representation x D The first deterministic feature information r obtained by aggregation is also updated accordingly. C If the second deterministic feature information corresponding to each group of second database query parameters is aggregated by using the mean aggregation method, the first deterministic feature information r C Can remain unchanged during the iteration process.

[0059] For example, updating the first database query parameter according to the second query execution result information, and updating the first potential feature information according to the second query execution result information may include: The loss value is determined according to the second query execution result and the preset variational lower bound function; the first database query parameter and the first potential feature information are updated according to the loss value. The variational lower bound function represents the difference between the expected information and the difference information, the expected information is the expectation of the logarithm of the target probability distribution under the first variational posterior distribution, the first variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the first database query parameter and the second query execution result information, the target probability distribution is the probability distribution of the second query execution result information obtained based on the first database query parameter, the first deterministic feature information and the first potential feature information, the difference information is the difference information between the first variational posterior distribution and the second variational posterior distribution, and the second variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the second database query parameter and the first query execution result information.

[0060] Among them, the predicted second query execution result information y D The probability distribution of can be expressed as the following formula (2): (2) Due to the prediction of the second query execution result information y DThe true posterior probability distribution of is difficult to handle, and the neural network in the neural process model uses the variational lower bound (ELBO, Evidence Lower Bound) function to update the parameters. In one embodiment, the iteration stop condition can be to maximize the variational lower bound function. For example, the variational lower bound function log p (y D |x D ,C) can be expressed as the following formula (3): (3) in, Indicates expected information. q (z|D) represents the first variational posterior distribution, D is the input-output pair consisting of the second vector representation and the second query execution result information, which can be expressed as (x D ,y D ), the second vector represents x D is generated based on the query plan information and the first database query parameters, D represents the second query execution result information, p(yD|xD,rC,z) represents the target probability distribution, r C represents the first deterministic feature information, z represents the first potential feature information, represents the difference information, q(z|C) represents the second variational posterior distribution, and C represents the first vector x C and the second query execution result information y C The input-output pair (x C ,y C ). KL( ) represents the Kullback-Leibler divergence function, which can be used to measure the degree of difference between two probability distributions.

[0061] Through the above technical solution, the second query execution result information is determined according to the first database query parameter, the first deterministic feature information and the first potential feature information, and the first database query parameter is updated according to the second query execution result information. By performing multiple iterations of updating the first database query parameter, the first database query parameter after the iteration update can further optimize the database query performance. In addition, the complexity of processing data based on the neural process model is low, and the neural process model supports the integration of a deep encoder. The first database query parameter is updated based on the neural process model, and the first database query parameter can be updated by deep learning, which can also reduce the complexity of data processing and improve the efficiency of updating the first database query parameter.

[0062] Based on the same inventive concept, the present disclosure also provides a database query parameter optimization device, Figure 3is a block diagram of a database query parameter optimization device according to an exemplary embodiment. Figure 3 As shown, the device 30 may include: A first acquisition module 31, used to acquire a first database query parameter; The first updating module 32 is used to update the first database query parameter based on the neural process model, wherein the neural process model is used to update the first database query parameter through the following modules: A second acquisition module is used to acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The second updating module is used to update the first database query parameter according to the first deterministic feature information and the first potential feature information.

[0063] Optionally, the second database query parameter is M groups, M≥1 and M is an integer; the first deterministic feature information and the first potential feature information are obtained by the neural process model through the following modules: A first determination module, used to determine the second deterministic feature information and the second potential feature information corresponding to each group of the second database query parameters; A second determining module, configured to determine the first deterministic feature information according to the second deterministic feature information corresponding to each group of the second database query parameters; The third determination module is used to determine the first potential feature information according to the second potential feature information corresponding to each group of the second database query parameters.

[0064] Optionally, the first determining module is used to: For each group of the second database query parameters, feature extraction is performed based on the first vector representation corresponding to the group of the second database query parameters and the first query execution result information corresponding to the group of the second database query parameters to obtain the second deterministic feature information and the second potential feature information corresponding to the group of the second database query parameters, wherein the first vector representation corresponding to the group of the second database query parameters is a vector representation generated based on the query plan information and the group of the second database query parameters.

[0065] Optionally, the second determining module is used to: aggregating the second vector representation, the first vector representation corresponding to each group of the second database query parameters, and the second deterministic feature information corresponding to each group of the second database query parameters through an attention mechanism to obtain the first deterministic feature information, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters, and the first vector representation corresponding to each group of the second database query parameters is a vector representation generated according to the query plan information and each group of the second database query parameters; or, The second deterministic feature information corresponding to each group of the second database query parameters is averaged and aggregated to obtain the first deterministic feature information.

[0066] Optionally, the third determining module is used to: The second potential feature information corresponding to each group of the second database query parameters is averaged and then a sampling operation is performed on the result after the average aggregation to obtain the first potential feature information.

[0067] Optionally, the second updating module includes: A first determination submodule, configured to determine second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, wherein the second query execution result information includes result information obtained by executing a database query operation according to the first database query parameter and the query plan information; An updating submodule is used to update the first database query parameters according to the second query execution result information.

[0068] Optionally, the first determining submodule is used to: The first deterministic feature information, the first potential feature information and the second vector representation are input into the query execution result prediction module of the neural process model to obtain the second query execution result information output by the query execution result prediction module, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters.

[0069] Optionally, the device further comprises: A condition determination module, configured to determine whether an iteration stop condition is satisfied after the first determination submodule determines the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information; The update submodule is used to update the first database query parameter according to the second query execution result information in response to the iteration stop condition not being met, and to update the first potential feature information according to the second query execution result information, and then trigger the first determination submodule to re-determine the second query execution result information and the condition determination module to determine whether the iteration stop condition is met based on the first database query parameter, the first deterministic feature information and the first potential feature information.

[0070] Optionally, the updating submodule is used for: Determine a loss value according to the second query execution result and a preset variational lower bound function, wherein the variational lower bound function represents the difference between expected information and difference information, the expected information is the expectation of the logarithm of the target probability distribution under the first variational posterior distribution, the first variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the first database query parameter and the second query execution result information, the target probability distribution is the probability distribution of the second query execution result information obtained based on the first database query parameter, the first deterministic feature information and the first potential feature information, the difference information is the difference information between the first variational posterior distribution and the second variational posterior distribution, and the second variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the second database query parameter and the first query execution result information; The first database query parameter and the first potential feature information are updated according to the loss value.

[0071] Reference below Figure 4 , which shows an electronic device suitable for implementing the embodiments of the present disclosure. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0072] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0073] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0074] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0075] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0076] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0077] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0078] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first database query parameter; The first database query parameter is updated based on the neural process model, wherein the neural process model is used to update the first database query parameter in the following manner: Acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The first database query parameter is updated according to the first deterministic feature information and the first potential feature information.

[0079] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0081] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first acquisition module may also be described as a "module for acquiring a first database query parameter".

[0082] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0083] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0084] According to one or more embodiments of the present disclosure, Example 1 provides a method for optimizing database query parameters, the method comprising: Obtaining a first database query parameter; The first database query parameter is updated based on the neural process model, wherein the neural process model is used to update the first database query parameter in the following manner: Acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The first database query parameter is updated according to the first deterministic feature information and the first potential feature information.

[0085] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the second database query parameter is M groups, M≥1 and M is an integer; the first deterministic feature information and the first potential feature information are obtained by the neural process model in the following manner: Determine the second deterministic feature information and the second potential feature information corresponding to each group of the second database query parameters; Determine the first deterministic feature information according to each group of the second database query parameters corresponding to the second deterministic feature information; The first potential feature information is determined according to the second potential feature information corresponding to each group of the second database query parameters.

[0086] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein determining the second deterministic feature information and the second potential feature information corresponding to each group of the second database query parameters includes: For each group of the second database query parameters, feature extraction is performed based on the first vector representation corresponding to the group of the second database query parameters and the first query execution result information corresponding to the group of the second database query parameters to obtain the second deterministic feature information and the second potential feature information corresponding to the group of the second database query parameters, wherein the first vector representation corresponding to the group of the second database query parameters is a vector representation generated based on the query plan information and the group of the second database query parameters.

[0087] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein determining the first deterministic feature information according to each group of the second deterministic feature information corresponding to the second database query parameter includes: aggregating the second vector representation, the first vector representation corresponding to each group of the second database query parameters, and the second deterministic feature information corresponding to each group of the second database query parameters through an attention mechanism to obtain the first deterministic feature information, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters, and the first vector representation corresponding to each group of the second database query parameters is a vector representation generated according to the query plan information and each group of the second database query parameters; or, The second deterministic feature information corresponding to each group of the second database query parameters is averaged and aggregated to obtain the first deterministic feature information.

[0088] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 2, wherein determining the first potential feature information according to each group of the second potential feature information corresponding to the second database query parameter includes: The second potential feature information corresponding to each group of the second database query parameters is averaged and then a sampling operation is performed on the result after the average aggregation to obtain the first potential feature information.

[0089] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein updating the first database query parameter according to the first deterministic feature information and the first potential feature information includes: Determining second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, wherein the second query execution result information includes result information obtained when a database query operation is performed according to the first database query parameter and the query plan information; The first database query parameter is updated according to the second query execution result information.

[0090] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein determining the second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information includes: The first deterministic feature information, the first potential feature information and the second vector representation are input into the query execution result prediction module of the neural process model to obtain the second query execution result information output by the query execution result prediction module, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters.

[0091] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 6, and after determining the second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, the method further includes: Determine whether the iteration stop condition is met; In response to the iteration stop condition not being met, the first database query parameter is updated according to the second query execution result information, and the first potential feature information is updated according to the second query execution result information, and then the step of determining the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information to the step of determining whether the iteration stop condition is met is re-executed.

[0092] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8, wherein updating the first database query parameter according to the second query execution result information, and updating the first potential feature information according to the second query execution result information, includes: Determine a loss value according to the second query execution result and a preset variational lower bound function, wherein the variational lower bound function represents the difference between expected information and difference information, the expected information is the expectation of the logarithm of the target probability distribution under the first variational posterior distribution, the first variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the first database query parameter and the second query execution result information, the target probability distribution is the probability distribution of the second query execution result information obtained based on the first database query parameter, the first deterministic feature information and the first potential feature information, the difference information is the difference information between the first variational posterior distribution and the second variational posterior distribution, and the second variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the second database query parameter and the first query execution result information; The first database query parameter and the first potential feature information are updated according to the loss value.

[0093] According to one or more embodiments of the present disclosure, Example 10 provides a database query parameter optimization device, the device comprising: A first acquisition module, used to acquire a first database query parameter; A first updating module is used to update the first database query parameter based on a neural process model, wherein the neural process model is used to update the first database query parameter through the following modules: A second acquisition module is used to acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The second updating module is used to update the first database query parameter according to the first deterministic feature information and the first potential feature information.

[0094] According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of the method described in any one of Examples 1 to 9 are implemented.

[0095] According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1 to 9.

[0096] According to one or more embodiments of the present disclosure, Example 13 provides a computer program product, including a computer program, which implements the steps of any one of the methods described in Examples 1 to 9 when executed by a processor.

[0097] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0098] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0099] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for optimizing database query parameters, characterized in that: The method comprises: Obtaining a first database query parameter; The first database query parameter is updated based on the neural process model, wherein the neural process model is used to update the first database query parameter in the following manner: Acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The first database query parameter is updated according to the first deterministic feature information and the first potential feature information.

2. The method according to claim 1, characterized in that The second database query parameter is M groups, M≥1 and M is an integer; the first deterministic feature information and the first potential feature information are obtained by the neural process model in the following manner: Determine the second deterministic feature information and the second potential feature information corresponding to each group of the second database query parameters; Determine the first deterministic feature information according to each set of the second deterministic feature information corresponding to the second database query parameter; The first potential feature information is determined according to the second potential feature information corresponding to each group of the second database query parameters.

3. The method according to claim 2, characterized in that The step of determining the second deterministic feature information and the second potential feature information corresponding to each group of the second database query parameters includes: For each group of the second database query parameters, feature extraction is performed based on the first vector representation corresponding to the group of the second database query parameters and the first query execution result information corresponding to the group of the second database query parameters to obtain the second deterministic feature information and the second potential feature information corresponding to the group of the second database query parameters, wherein the first vector representation corresponding to the group of the second database query parameters is a vector representation generated based on the query plan information and the group of the second database query parameters.

4. The method according to claim 2, characterized in that: The determining the first deterministic feature information according to the second deterministic feature information corresponding to each group of the second database query parameters includes: aggregating the second vector representation, the first vector representation corresponding to each group of the second database query parameters, and the second deterministic feature information corresponding to each group of the second database query parameters through an attention mechanism to obtain the first deterministic feature information, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters, and the first vector representation corresponding to each group of the second database query parameters is a vector representation generated according to the query plan information and each group of the second database query parameters; or, The second deterministic feature information corresponding to each group of the second database query parameters is averaged and aggregated to obtain the first deterministic feature information.

5. The method according to claim 2, characterized in that: The determining the first potential feature information according to each group of the second potential feature information corresponding to the second database query parameter includes: The second potential feature information corresponding to each group of the second database query parameters is averaged and then a sampling operation is performed on the result after the average aggregation to obtain the first potential feature information.

6. The method according to claim 1, characterized in that The updating of the first database query parameter according to the first deterministic feature information and the first potential feature information includes: Determining second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, wherein the second query execution result information includes result information obtained when a database query operation is performed according to the first database query parameter and the query plan information; The first database query parameter is updated according to the second query execution result information.

7. The method according to claim 6, characterized in that The determining the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information includes: The first deterministic feature information, the first potential feature information and the second vector representation are input into the query execution result prediction module of the neural process model to obtain the second query execution result information output by the query execution result prediction module, wherein the second vector representation is a vector representation generated according to the query plan information and the first database query parameters.

8. The method according to claim 6, characterized in that After determining second query execution result information according to the first database query parameter, the first deterministic feature information, and the first potential feature information, the method further includes: Determine whether the iteration stop condition is met; In response to the iteration stop condition not being met, the first database query parameter is updated according to the second query execution result information, and the first potential feature information is updated according to the second query execution result information, and then the step of determining the second query execution result information according to the first database query parameter, the first deterministic feature information and the first potential feature information to the step of determining whether the iteration stop condition is met is re-executed.

9. The method according to claim 8, characterized in that The updating of the first database query parameter according to the second query execution result information, and the updating of the first potential feature information according to the second query execution result information, includes: Determine a loss value according to the second query execution result and a preset variational lower bound function, wherein the variational lower bound function represents the difference between expected information and difference information, the expected information is the expectation of the logarithm of the target probability distribution under the first variational posterior distribution, the first variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the first database query parameter and the second query execution result information, the target probability distribution is the probability distribution of the second query execution result information obtained based on the first database query parameter, the first deterministic feature information and the first potential feature information, the difference information is the difference information between the first variational posterior distribution and the second variational posterior distribution, and the second variational posterior distribution is the variational posterior distribution of the first potential feature information obtained based on the second database query parameter and the first query execution result information; The first database query parameter and the first potential feature information are updated according to the loss value.

10. A database query parameter optimization device, characterized in that: The device comprises: A first acquisition module, used to acquire a first database query parameter; A first updating module is used to update the first database query parameter based on a neural process model, wherein the neural process model is used to update the first database query parameter through the following modules: A second acquisition module is used to acquire first deterministic feature information and first potential feature information, wherein the deterministic feature information is used to characterize the deterministic feature corresponding to the first query execution result information, and the potential feature information is used to characterize the potential feature corresponding to the first query execution result information, and the first query execution result information includes pre-annotated result information obtained by executing a database query operation according to a second database query parameter and preset query plan information; The second updating module is used to update the first database query parameter according to the first deterministic feature information and the first potential feature information.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method described in any one of claims 1 to 9 are implemented.

12. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.