CN112395311A - Method and device for predicting processing duration of request - Google Patents

Method and device for predicting processing duration of request Download PDF

Info

Publication number
CN112395311A
CN112395311A CN201910745544.3A CN201910745544A CN112395311A CN 112395311 A CN112395311 A CN 112395311A CN 201910745544 A CN201910745544 A CN 201910745544A CN 112395311 A CN112395311 A CN 112395311A
Authority
CN
China
Prior art keywords
processing
lstm
network
request
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910745544.3A
Other languages
Chinese (zh)
Inventor
曾凯
徐冬
侯震宇
关涛
郑凯
倪靖雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910745544.3A priority Critical patent/CN112395311A/en
Publication of CN112395311A publication Critical patent/CN112395311A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a method and a device for predicting request processing duration. The time length required in the process of processing the processing request is often related to the dependency relationship among the processing operations involved in the processing request, besides the type and the number of the processing operations required to be executed, and when the dependency relationship among the processing operations involved in the processing request is different, the time length required by the processing system in the process of processing the processing request is often different. Therefore, the time length required by the process of processing the processing request can be more accurately determined by combining the dependency relationship among the processing operations involved in the processing request. In addition, the method and the device can be applied to a distributed system, and can predict the time length required in the process of processing the processing request in the distributed system more accurately compared with the prior art.

Description

Method and device for predicting processing duration of request
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for predicting a processing duration of a request.
Background
Currently, the data volume of data of each enterprise is explosively increased, and gradually, each enterprise uses a database to store data and a database system to manage the database, and then, when an enterprise employee or an external client needs to query data, a query request can be submitted to the database system, so that the database system can query the database system for the data according to the query request.
However, sometimes a database system may receive a large number of query requests simultaneously in a short period of time, and typically the database system needs to process more query requests in as short a time period as possible.
The time length required by the database system to process each query request is often different, which results in different time lengths of the computing resources respectively allocated to the query requests by the database system that each query request needs to occupy.
In order to be able to process more query requests in the shortest possible time period, more computing resources may be allocated first for processing requests of shorter time period required for the processing procedure, and less computing resources may be allocated later for processing requests of longer time period required for the processing procedure. But this presupposes that the time required for the process of processing the query request needs to be predicted.
The prior art provides a method for predicting a processing duration of a request, including: for processed historical query requests in the historical process, a predictive model may be trained based on the length of time used in processing the historical query requests and the number and types of processing operations performed in processing the query requests, and then the length of time required for the process to process new query requests may be predicted based on the trained predictive model.
However, the inventors have found that the duration of the prior art prediction is not accurate.
Disclosure of Invention
In order to improve the accuracy of the predicted duration, the embodiment of the application shows a method and a device for predicting the processing duration of a request.
In a first aspect, an embodiment of the present application illustrates a method for predicting a processing duration of a request, where the method includes:
receiving a processing request;
determining a dependency relationship between a plurality of processing operations involved in the processing request, and determining a system environment involved in the processing request;
predicting a duration required for a process of processing the processing request according to at least the dependency relationship and the system environment.
In an optional implementation, the predicting, according to at least the dependency relationship and the system environment, a time period required for processing the processing request includes:
acquiring the receiving time of the processing request;
and predicting the duration according to the receiving time, the dependency relationship and the system environment.
In an optional implementation, the predicting, according to at least the dependency relationship and the system environment, a time period required for processing the processing request includes:
and inputting the dependency relationship and the system environment into a prediction model to obtain the time length output by the prediction model.
In an optional implementation, the method further includes:
obtaining a plurality of sample data sets, wherein each sample data set comprises a sample dependency relationship among a plurality of sample processing operations related to a sample processing request, a sample system environment related to the sample processing request and a marking duration required by the process for processing the sample processing request;
and training a model by using the plurality of sample data sets to obtain the prediction model.
In an optional implementation manner, the prediction model comprises a recurrent neural network, a feedforward neural network and a full connection layer;
the cyclic neural network is used for processing the dependency relationship to obtain a time influence factor;
the feedforward neural network is used for processing the system environment to obtain another time influence factor;
and the full connection layer is used for simultaneously processing the time influence factor and the other time influence factor to obtain the time length required by the process of processing the request.
In an alternative implementation, the recurrent neural network comprises a bidirectional recurrent neural network;
the recurrent neural network comprises a long-short term memory network LSTM.
In an optional implementation manner, the bidirectional recurrent neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, the backward LSTM network comprises a plurality of sequentially connected LSTM models, and the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to that of the plurality of sequentially connected LSTM models of the backward LSTM network;
and respectively inputting each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network, and then connecting the output vector of the last LSTM model in the forward LSTM network with the output vector of the last LSTM model in the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
In an optional implementation manner, for any processing operation, determining a sequential execution order of the processing operation in a plurality of processing operations involved in the processing request;
determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the forward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation;
and determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the backward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation.
In an optional implementation manner, performing unique hot coding on each processing operation respectively to obtain a vector corresponding to each processing operation respectively;
and respectively inputting the vector corresponding to each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network.
In one optional implementation, the feedforward neural network includes a residual network;
the feedforward neural network comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In an alternative implementation, the method is applied to a distributed database system.
In a second aspect, an embodiment of the present application illustrates an apparatus for predicting a processing duration of a request, where the apparatus includes:
a receiving module, configured to receive a processing request;
a determining module, configured to determine a dependency relationship between a plurality of processing operations involved in the processing request, and determine a system environment involved in the processing request;
and the prediction module is used for predicting the time required by the process of processing the processing request at least according to the dependency relationship and the system environment.
In an alternative implementation, the prediction module includes:
a first obtaining unit configured to obtain a reception time of the processing request;
and the prediction unit is used for predicting the duration according to the receiving time, the dependency relationship and the system environment.
In an alternative implementation, the prediction module includes:
and the input unit is used for inputting the dependency relationship and the system environment into a prediction model to obtain the time length output by the prediction model.
In an optional implementation manner, the prediction module further includes:
the second acquisition unit is used for acquiring a plurality of sample data sets, wherein each sample data set comprises a sample dependency relationship among a plurality of sample processing operations related to a sample processing request, a sample system environment related to the sample processing request and an annotation duration required by the process for processing the sample processing request;
and the training unit is used for training the model by using the plurality of sample data sets to obtain the prediction model.
In an optional implementation manner, the prediction model comprises a recurrent neural network, a feedforward neural network and a full connection layer;
the cyclic neural network is used for processing the dependency relationship to obtain a time influence factor;
the feedforward neural network is used for processing the system environment to obtain another time influence factor;
and the full connection layer is used for simultaneously processing the time influence factor and the other time influence factor to obtain the time length required by the process of processing the request.
In an alternative implementation, the recurrent neural network comprises a bidirectional recurrent neural network;
the recurrent neural network comprises a long-short term memory network LSTM.
In an optional implementation manner, the bidirectional recurrent neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, the backward LSTM network comprises a plurality of sequentially connected LSTM models, and the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to that of the plurality of sequentially connected LSTM models of the backward LSTM network;
the prediction module is further configured to input each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network, respectively, and then connect the output vector of the last LSTM model in the forward LSTM network with the output vector of the last LSTM model in the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
In an optional implementation, the prediction module is further configured to:
for any processing operation, determining the sequential execution order of the processing operation in a plurality of processing operations related to the processing request;
determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the forward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation;
and determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the backward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation.
In an optional implementation, the prediction module is further configured to:
respectively carrying out one-hot encoding on each processing operation to respectively obtain a vector corresponding to each processing operation;
and respectively inputting the vector corresponding to each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network.
In one optional implementation, the feedforward neural network includes a residual network;
the feedforward neural network comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In an alternative implementation, the method is applied to a distributed database system.
In a third aspect, an embodiment of the present application illustrates a database prediction system, including:
the device comprises an input module, a sequence module, a depth module and an output module;
the input module is used for acquiring the sequence characteristics of the query plan and the execution environment characteristics of the query plan;
the sequence module is used for processing sequence characteristics in the query plan to obtain a first time influence factor;
the depth module is used for processing the execution environment characteristics of the query plan to obtain a second time influence factor;
and the output module is used for acquiring the execution duration of the query plan according to the first time influence factor and the second time influence factor.
In an alternative implementation, the sequence module includes a bidirectional recurrent neural network;
the bidirectional cyclic neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, and the backward LSTM network comprises a plurality of sequentially connected LSTM models, wherein the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to the connection sequence between the plurality of sequentially connected LSTM models of the backward LSTM network.
In an alternative implementation, the depth module includes a feed-forward neural network;
the feedforward neural network comprises a plurality of network units, and the network units are connected in a residual connection mode;
each network unit comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In a fourth aspect, an embodiment of the present application illustrates an electronic device, including:
a processor; and
a memory having stored thereon executable code which, when executed, causes the processor to perform a method of predicting a processing duration of a request as described in the first aspect.
In a fifth aspect, embodiments of the present application show one or more machine-readable media having stored thereon executable code that, when executed, causes a processor to perform a method of predicting a processing duration of a request as described in the first aspect.
Compared with the prior art, the embodiment of the application has the following advantages:
in the prior art, the system environment that the processing system can provide for processing the request is often fixed and does not involve a distributed scenario, so that the variable often only includes the processing operation involved in processing the request, and in the case of this variable only, the time length required for the process of processing the request can be predicted according to the number and the type of the involved processing operations.
The inventors have found, however, that when the kind and number of processing operations involved in processing a request are plural, sometimes the different dependencies between the multiple processing operations result in different durations of time required to perform the processes of the multiple processing operations, for example, the total length of time taken to execute processing operation 1 first and then processing operation 2 is different from the total length of time taken to execute processing operation 2 first and then processing operation 1, which in turn results in a different length of time required for the process to process the processing request, for example, assuming that the processing operations involved in the processing request include processing operations 1-3, if processing operation 1 is performed first, then processing operation 2 is performed, processing operation 3 is then performed, which may take 2s in the overall process, however, if processing operation 2 is performed first, then processing operation 1, and then processing operation 3 is performed, then the time taken in the overall process may not be 2 s.
In this way, the time length required for processing the processing request is often dependent on the dependency relationship among the processing operations involved in the processing request, in addition to the type and number of the processing operations that need to be executed, and when the dependency relationship among the processing operations involved in the processing request is different, the time length required for the processing system to process the processing request is often different. Therefore, the time length required by the process of processing the processing request can be more accurately determined by combining the dependency relationship among the processing operations involved in the processing request.
In addition, in a distributed scenario, system environments involved in different processing requests are often different, and when the system environments involved in processing request processing are different, time duration required by the process of processing the processing request by the distributed system is often different. For example, the allocated system resources required to process a request are different, and the more the allocated system resources are, the less the required duration is, and the less the allocated system resources are, the more the required duration is. Therefore, the method and the device can be applied to a distributed system, and can predict the time length required in the process of processing the processing request in the distributed system more accurately compared with the prior art.
Drawings
FIG. 1 is a flow diagram illustrating a method for predicting a processing duration of a request, according to an example embodiment.
FIG. 2 is a flowchart illustrating a process operation involved in executing a process request according to an example embodiment.
Fig. 3 is a schematic diagram illustrating a bidirectional recurrent neural network in accordance with an exemplary embodiment.
Fig. 4 is a schematic structural diagram illustrating a Block module in a feedforward neural network according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating a predictive model according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating an apparatus for predicting a processing duration of a request, according to an example embodiment.
FIG. 7 is a block diagram illustrating a distributed database system in accordance with an exemplary embodiment.
FIG. 8 is a block diagram illustrating an apparatus for predicting a processing duration of a request, according to an example embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Fig. 1 is a flow chart illustrating a method for predicting a processing duration of a request, as shown in fig. 1, for use in a processing system, the processing system including a distributed system, such as a distributed database system, and the like, according to an example embodiment.
In step S101, a processing request is received;
in the present application, the processing request includes a query request for querying data, a change request for changing data, a storage request for storing data, a deletion request for deleting data, and the like.
In step S102, determining a dependency relationship between a plurality of processing operations involved in the processing request, and determining a system environment involved in the processing request;
for any processing request, when the processing system processes the processing request, it is often necessary to execute the processing request sequentially in order, which involves multiple processing operations, where the multiple processing operations have a sequential execution order, and thus, the multiple processing operations have a dependency relationship.
In the application, after receiving a processing request, the distributed system determines all processing operations involved in the processing request in real time based on an optimizer in the distributed system, then determines the dependency relationship among all processing operations, and then the distributed system performs each processing operation in turn according to the dependency relationship, thereby completing the processing of the processing request. The specific method for determining all processing operations involved and the method for determining dependencies are not limited in this application.
For example, the processing system includes a plurality of database tables, for example, database table 1 and database table 2, and it is assumed that there are a plurality of columns in the database table 1, each column having a column name and a corresponding column value, and a plurality of columns in the database table 2, each column having a column name and a corresponding column value.
Assume that a user wants to merge and sort column values corresponding to certain column names in the database table 1, column values corresponding to those column names in the database 2 that are greater than 15 and less than 20, from large to small. Thus, for a distributed system, referring to fig. 2, the processing operations that need to be performed include:
processing operation O1 (TableScan): the column names and column values in the database table 1 are traversed.
Processing operation O2 (Filter): the database table 1 is screened for column values corresponding to these column names.
Processing operation O3 (TableScan): the column names and column values in the database table 2 are traversed.
Processing operation O4 (Filter): the database table 2 is screened for column values corresponding to these column names and greater than 15 and less than 20.
Processing operation O5 (MergeJoin): the column values obtained in process operation O2 and process operation O4 are aggregated together.
Processing operation O6 (SortedAgg): the column values that are aggregated together are sorted in order from large to small.
Processing operation O7 (AdhocSink): the sorted column values are then inserted into a database table.
In this example, processing operation O2 may be performed after finishing processing operation O1, processing operation O4 may be performed after finishing processing operation O3, processing operation O5 may be performed after finishing processing operation O2 and processing operation O4, processing operation O6 may be performed after finishing processing operation O5, and processing operation O7 may be performed after finishing processing operation O6.
In the present application, after receiving a Processing request, the distributed system determines, in real time, a system environment related to the Processing request based on an optimizer in the distributed system, for example, determines computing resources, including memory and a Central Processing Unit (CPU), etc., allocated to the Processing request, a Processing mode of the Processing request, including a real-time Processing mode and a non-real-time Processing mode, a number of processors related to the Processing request in the distributed system, a number of database tables related to the Processing request, a number of Processing operations related to the Processing request, and a running cluster related to the Processing request. The method for determining the system environment related to the processing request is not limited in the present application.
In step S103, a time period required for the process of processing the processing request is predicted based on at least the dependency relationship and the system environment.
In the present application, a prediction model may be trained in advance, and then a time period required for a process of processing the processing request may be determined according to the dependency relationship and the system environment based on the prediction model.
For example, a plurality of sample data sets may be obtained, each sample data set including sample dependencies among a plurality of sample processing operations related to the sample processing request, a sample system environment related to the sample processing request, and a tagged duration required by a process of processing the sample processing request; the sample processing request may include a processing request that has been previously processed by the distributed system, and the labeled time length may include a counted time length actually consumed by the process of processing the sample processing request by the distributed system in advance, and the like. The model may then be trained using a plurality of sample data sets, resulting in a predictive model.
In this way, in this step, the dependency relationship and the system environment may be input into the prediction model, and the time length required by the process of processing the processing request output by the prediction model may be obtained.
In one embodiment, the predictive model comprises a deep dt model.
In one embodiment, the model includes a recurrent neural network, a feedforward neural network and a fully-connected layer, and the prediction module thus trained also includes the recurrent neural network, the feedforward neural network and the fully-connected layer.
The loop neural network is used for processing the dependency relationship to obtain a time influence factor, the feedforward neural network is used for processing the system environment to obtain another time influence factor, and the full connection layer is used for simultaneously processing the time influence factor and the another time influence factor to obtain the time length required by the process of processing the processing request.
Wherein the recurrent neural network comprises a bidirectional recurrent neural network; for example, the bidirectional recurrent neural network includes a forward LSTM network and a backward LSTM network.
The forward LSTM network comprises a plurality of LSTM models which are connected in sequence, the backward LSTM network comprises a plurality of LSTM models which are connected in sequence, and the connection sequence between the plurality of LSTM models which are included in the forward LSTM network is opposite to the connection sequence between the plurality of LSTM models which are included in the backward LSTM network;
and respectively inputting each processing operation into an LSTM model corresponding to a forward LSTM network and an LSTM model corresponding to a backward LSTM network, and then connecting the output vector of the last LSTM model in the forward LSTM network with the output vector of the last LSTM model in the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
Wherein, each processing operation can be respectively subjected to one-hot coding to respectively obtain a vector corresponding to each processing operation; and respectively inputting the vector corresponding to each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
For any processing operation, determining the execution sequence of the processing operation in the plurality of processing operations related to the processing request;
determining LSTM models corresponding to a sequential execution sequence in a plurality of LSTM models included in a forward LSTM network, and using the LSTM models as LSTM models corresponding to processing operation;
and determining the LSTM models corresponding to the execution sequence in the plurality of LSTM models included in the backward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation.
For example, assuming that the execution order of a certain processing operation in the plurality of processing operations involved in the processing request is nth bit, the processing operation is input into the nth LSTM model included in the forward LSTM network and the processing operation is input into the nth last LSTM model included in the backward LSTM network.
Therefore, the relevant content of the forward execution sequence can be learned in the process of training the prediction model, the relevant content of the backward execution sequence can be learned, namely, the dependency relationship among the processing operations can be better learned, and further, the model can learn more contents, so that the trained prediction is more perfect, and the time length required by the process of processing the processing request determined later can be more accurate.
In the process of training the model, parameters in the model are usually optimized according to the gradient value of the model and the output value of the loss function of the model until the parameters in the model converge, however, if the gradient value of the model disappears in the training process, the parameters of the model cannot be accurately optimized according to the value of the loss function only, and the normal training of the model is affected, so that in order to avoid the situation, the recurrent neural network may include a Long Short-Term Memory (LSTM) model, and the disappearance of the gradient may be avoided by using the LSTM model. The loss function includes mean square error, etc. Using the LSTM model as a network element in a recurrent neural network, it is possible to avoid the gradient values of the model disappearing during the training of the model.
In one example, referring to FIG. 3, the bidirectional recurrent neural network includes a forward LSTM network and a backward LSTM network.
The forward LSTM network includes LSTM model 1, LSTM model 2, LSTM model 3, and LSTM model 4, in order LSTM model 1 precedes LSTM model 2, LSTM model 2 precedes LSTM model 3, and LSTM model 3 precedes LSTM model 4.
The backward LSTM network includes LSTM model 5, LSTM model 6, LSTM model 7, and LSTM model 8, in order LSTM model 5 precedes LSTM model 6, LSTM model 6 precedes LSTM model 7, and LSTM model 7 precedes LSTM model 8.
It is assumed that the processing operation related to the processing request includes processing operation 1, processing operation 2, processing operation 3, and processing operation 4, and the execution order is that processing operation 1 precedes processing operation 2, processing operation 2 precedes processing operation 3, and processing operation 3 precedes processing operation 4. That is, processing operation 2 depends on processing operation 1, processing operation 3 depends on processing operation 2, and processing operation 4 depends on processing operation 3.
The processing operations 1-4 may be converted into vectors, respectively, and then the vector corresponding to the processing operation 1 may be input into the LSTM model 1, the vector corresponding to the output of the LSTM model 1 and the operation 2 may be input into the LSTM model 2, the vector corresponding to the output of the LSTM model 2 and the operation 3 may be input into the LSTM model 3, and the vector corresponding to the output of the LSTM model 3 and the operation 4 may be input into the LSTM model 4.
Further, the vector corresponding to operation 4 may be input into LSTM model 5, the vector corresponding to operation 3 output of LSTM model 5 may be input into LSTM model 6, the vector corresponding to operation 2 output of LSTM model 6 may be input into LSTM model 7, and the vector corresponding to operation 1 output of LSTM model 7 may be input into LSTM model 8.
Thus, LSTM model 4 and LSTM model 8 each output a vector, and then the vector output by LSTM model 4 and the vector output by LSTM model 8 may be connected (Concat) to obtain a vector.
Wherein the feed-forward neural network comprises a residual network; the feedforward neural network comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
For example, the feedforward neural network comprises a plurality of network units, and the plurality of network units are connected in a residual connection mode; each network unit comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In one example, the feedforward neural network includes at least one Block module. Each Block module is connected by means of residual connection, for example, as shown in fig. 4, one Block module includes a plurality of inputs, for example, a (l-1) and a (l) in fig. 4, and includes an output, for example, a (l) in fig. 4, each input may be a vector, the output is a vector, a plurality of input vectors enter the Block module, the plurality of vectors are connected (Concat) in the Block module to obtain a connection vector, the connection vector is then input into the full connection layer to obtain another vector output by the full connection layer, the another vector is then input into the batch regularization layer to obtain another vector output by the batch regularization layer, and then the another vector is processed based on a linear rectification function unit (ReLU) to obtain an output vector of the Block module.
For example, as shown in fig. 5, the dependency relationship is input into a bidirectional recurrent neural network, and two vectors to be output are obtained in the bidirectional recurrent neural network, and then the two vectors are connected (Concat) to obtain one connected vector.
Under the condition that the feed-forward neural network comprises a plurality of Block modules, the Block modules can be connected in a residual connection mode, so that the feed-forward neural network is deeper and more complex in hierarchy, and further the feed-forward neural network can learn more contents for a training sample, and finally determined time required by the process of processing the processing request is more accurate.
For example, in fig. 5, the feedforward neural network includes 4 Block modules, namely, a Block module 1, a Block module 2, a Block module 3, and a Block module 4, the system environment is input to the Block module 1 and the Block module 2, output of the Block module 1 is input to the Block module 2 and the Block module 3, output of the Block module 2 is input to the Block module 3 and the Block module 4, output of the Block module 3 is input to the Block module 4, and the Block module 4 outputs a vector.
And connecting (Concat) the vector output by the Block module 4 with a connecting vector obtained by the bidirectional recurrent neural network, and then inputting the connected vector into a full-connection layer in the prediction model to obtain the time required by the full-connection layer to output the process of processing the processing request.
In the application, due to the fact that the batch regularization layer is added to the Block module, overfitting of the feedforward neural network can be avoided.
In the prior art, the system environment that the processing system can provide for processing the request is often fixed and does not involve a distributed scenario, so that the variable often only includes the processing operation involved in processing the request, and in the case of this variable only, the time length required for the process of processing the request can be predicted according to the number and the type of the involved processing operations.
The inventors have found, however, that when the kind and number of processing operations involved in processing a request are plural, sometimes the different dependencies between the multiple processing operations result in different durations of time required to perform the processes of the multiple processing operations, for example, the total length of time taken to execute processing operation 1 first and then processing operation 2 is different from the total length of time taken to execute processing operation 2 first and then processing operation 1, which in turn results in a different length of time required for the process to process the processing request, for example, assuming that the processing operations involved in the processing request include processing operations 1-3, if processing operation 1 is performed first, then processing operation 2 is performed, processing operation 3 is then performed, which may take 2s in the overall process, however, if processing operation 2 is performed first, then processing operation 1, and then processing operation 3 is performed, then the time taken in the overall process may not be 2 s.
In this way, the time length required for processing the processing request is often related to the dependency relationship among the processing operations involved in the processing request, in addition to the type and number of the processing operations that need to be executed, and when the dependency relationship among the processing operations involved in the processing request is different, the time length required for the processing system to process the processing request is often different. Therefore, the time length required by the process of processing the processing request can be more accurately determined by combining the dependency relationship among the processing operations involved in the processing request.
In addition, in a distributed scenario, system environments involved in different processing requests are often different, and when the system environments involved in processing request processing are different, time duration required by the process of processing the processing request by the distributed system is often different. For example, the allocated system resources required to process a request are different, and the more the allocated system resources are, the less the required duration is, and the less the allocated system resources are, the more the required duration is. Therefore, the method and the device can be applied to a distributed system, and can predict the time length required in the process of processing the processing request in the distributed system more accurately compared with the prior art.
In the history process, the time length required for the process of processing the processing requests received in different time periods of each day is often different, for example, the number of the processing requests submitted to the processing system by different users in different time periods on the same day is often different; the processing system receives a large number of processing requests in the morning every day, and the time required for counting and discovering the process of processing the processing requests is long; while other time period processing systems receive a smaller number of processing requests, statistics show that the time required for processing these processing requests is often shorter.
In this way, when the prediction model is trained in advance, each sample data set may include, in addition to the sample dependency relationship among the multiple sample processing operations related to the sample processing request, the sample system environment related to the sample processing request, and the labeling duration required by the process of processing the sample processing request, the receiving time when the processing system receives the sample processing request, and then the prediction model may be obtained by training the model using the multiple sample processing data sets.
By the embodiment of the present application, in step S103, the receiving time of the processing request may be obtained, and then the duration may be predicted according to the receiving time, the dependency relationship, and the system environment. Compared with the embodiment shown in fig. 1, the determined duration can be more accurate and more suitable for the actual situation by using the dependency relationship and the system environment in combination with the receiving time.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and alternative embodiments, and that the acts described are not necessarily required in the present application.
Fig. 6 is a block diagram illustrating an apparatus for predicting a processing duration of a request, according to an exemplary embodiment, as shown in fig. 6, the apparatus including:
a receiving module 11, configured to receive a processing request;
a determining module 12, configured to determine a dependency relationship between a plurality of processing operations involved in the processing request, and determine a system environment involved in the processing request;
and the prediction module 13 is used for predicting the time required by the process of processing the processing request according to at least the dependency relationship and the system environment.
In an alternative implementation, the prediction module 13 includes:
a first obtaining unit configured to obtain a reception time of the processing request;
and the prediction unit is used for predicting the duration according to the receiving time, the dependency relationship and the system environment.
In an alternative implementation, the prediction module 13 includes:
and the input unit is used for inputting the dependency relationship and the system environment into a prediction model to obtain the time length output by the prediction model.
In an optional implementation manner, the prediction module 13 further includes:
the second acquisition unit is used for acquiring a plurality of sample data sets, wherein each sample data set comprises a sample dependency relationship among a plurality of sample processing operations related to a sample processing request, a sample system environment related to the sample processing request and an annotation duration required by the process for processing the sample processing request;
and the training unit is used for training the model by using the plurality of sample data sets to obtain the prediction model.
In an optional implementation manner, the prediction model comprises a recurrent neural network, a feedforward neural network and a full connection layer;
the cyclic neural network is used for processing the dependency relationship to obtain a time influence factor;
the feedforward neural network is used for processing the system environment to obtain another time influence factor;
and the full connection layer is used for simultaneously processing the time influence factor and the other time influence factor to obtain the time length required by the process of processing the request.
In an alternative implementation, the recurrent neural network comprises a bidirectional recurrent neural network;
the recurrent neural network comprises a long-short term memory network LSTM.
In an optional implementation manner, the bidirectional recurrent neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, the backward LSTM network comprises a plurality of sequentially connected LSTM models, and the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to that of the plurality of sequentially connected LSTM models of the backward LSTM network;
the prediction module 13 is further configured to input each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network, and then connect the output vector of the last LSTM model in the forward LSTM network with the output vector of the last LSTM model in the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
In an optional implementation manner, the prediction module 13 is further configured to:
for any processing operation, determining the sequential execution order of the processing operation in a plurality of processing operations related to the processing request;
determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the forward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation;
and determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the backward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation.
In an optional implementation manner, the prediction module 13 is further configured to:
respectively carrying out one-hot encoding on each processing operation to respectively obtain a vector corresponding to each processing operation;
and respectively inputting the vector corresponding to each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network.
In one optional implementation, the feedforward neural network includes a residual network;
the feedforward neural network comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In an alternative implementation, the method is applied to a distributed database system.
In the prior art, the system environment that the processing system can provide for processing the request is often fixed and does not involve a distributed scenario, so that the variable often only includes the processing operation involved in processing the request, and in the case of this variable only, the time length required for the process of processing the request can be predicted according to the number and the type of the involved processing operations.
The inventors have found, however, that when the kind and number of processing operations involved in processing a request are plural, sometimes the different dependencies between the multiple processing operations result in different durations of time required to perform the processes of the multiple processing operations, for example, the total length of time taken to execute processing operation 1 first and then processing operation 2 is different from the total length of time taken to execute processing operation 2 first and then processing operation 1, which in turn results in a different length of time required for the process to process the processing request, for example, assuming that the processing operations involved in the processing request include processing operations 1-3, if processing operation 1 is performed first, then processing operation 2 is performed, processing operation 3 is then performed, which may take 2s in the overall process, however, if processing operation 2 is performed first, then processing operation 1, and then processing operation 3 is performed, then the time taken in the overall process may not be 2 s.
In this way, the time length required for processing the processing request is often related to the dependency relationship among the processing operations involved in the processing request, in addition to the type and number of the processing operations that need to be executed, and when the dependency relationship among the processing operations involved in the processing request is different, the time length required for the processing system to process the processing request is often different. Therefore, the time length required by the process of processing the processing request can be more accurately determined by combining the dependency relationship among the processing operations involved in the processing request.
In addition, in a distributed scenario, system environments involved in different processing requests are often different, and when the system environments involved in processing request processing are different, time duration required by the process of processing the processing request by the distributed system is often different. For example, the allocated system resources required to process a request are different, and the more the allocated system resources are, the less the required duration is, and the less the allocated system resources are, the more the required duration is. Therefore, the method and the device can be applied to a distributed system, and can predict the time length required in the process of processing the processing request in the distributed system more accurately compared with the prior art.
FIG. 7 is a block diagram illustrating a database prediction system, as shown in FIG. 7, according to an exemplary embodiment, including:
an input module 21, a sequence module 22, a depth module 23 and an output module 24;
the input module 21 is configured to obtain a sequence feature of a query plan and an execution environment feature of the query plan;
the sequence module 22 is configured to process sequence features in the query plan to obtain a first time influence factor;
the depth module 23 is configured to process an execution environment characteristic of the query plan to obtain a second time influence factor;
the output module 24 is configured to obtain an execution duration of the query plan according to the first time influencing factor and the second time influencing factor.
In an alternative implementation, the sequence module includes a bidirectional recurrent neural network;
the bidirectional cyclic neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, and the backward LSTM network comprises a plurality of sequentially connected LSTM models, wherein the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to the connection sequence between the plurality of sequentially connected LSTM models of the backward LSTM network.
In an alternative implementation, the depth module includes a feed-forward neural network;
the feedforward neural network comprises a plurality of network units, and the network units are connected in a residual connection mode;
each network unit comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
In the prior art, the system environment that the processing system can provide for the query request is often fixed and does not involve a distributed scenario, so that the variable often only includes the processing operation involved in the query request, and in the case of this variable only, the time length required for the process of processing the query request can be predicted according to the number and the type of the involved processing operations.
The inventors have found, however, that when the kind and number of processing operations involved in the query request are plural, sometimes the different dependencies between the multiple processing operations result in different durations of time required to perform the processes of the multiple processing operations, for example, the total length of time it takes to perform processing operation 1 first and then processing operation 2 second, is different from the total length of time it takes to perform processing operation 2 first and then processing operation 1, which in turn results in a different length of time required for the process to process the query request, for example, assuming that the processing operations involved in the query request include processing operations 1-3, if processing operation 1 is performed first, then processing operation 2 is performed, processing operation 3 is then performed, which may take 2s in the overall process, however, if processing operation 2 is performed first, then processing operation 1, and then processing operation 3 is performed, then the time taken in the overall process may not be 2 s.
In this way, the time length required in the process of processing the query request is related to the type and the number of processing operations that need to be executed, and also the dependency relationship between the processing operations related to the query request, and when the dependency relationship between the processing operations related to the query request is different, the time length required in the process of processing the query request by the processing system is often different. Therefore, the time length required by the process of processing the query request can be more accurately determined by combining the dependency relationship among the processing operations related to the query request.
In addition, in a distributed scenario, system environments related to different query requests are often different, and when the system environments related to the query requests are different, time duration required by a database prediction system for processing the query request is often different. For example, the allocated query requests may require different system resources, and the more abundant the allocated system resources are, the less time is required, and the less abundant the allocated system resources are, the more time is required. Therefore, the method and the device can be applied to a distributed system, and can predict the time length required in the process of processing the query request in the distributed system more accurately compared with the prior art.
The present application further provides a non-transitory, readable storage medium, where one or more modules (programs) are stored, and when the one or more modules are applied to a device, the device may execute instructions (instructions) of method steps in this application.
Embodiments of the present application provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform a method of predicting a processing duration of a request as described in one or more of the above embodiments. In the embodiment of the application, the electronic device comprises a server, a gateway, a sub-device and the like, wherein the sub-device is a device such as an internet of things device.
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like, using any suitable hardware, firmware, software, or any combination thereof, for a desired configuration.
Fig. 8 schematically illustrates an example apparatus 1300 that can be used to implement various embodiments described herein.
For one embodiment, fig. 8 illustrates an example apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, memory 1306 coupled to the control module 1304, non-volatile memory (NVM)/storage 1308 coupled to the control module 1304, one or more input/output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1306.
Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can be a server device such as a gateway or a controller as described in the embodiments of the present application.
In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and one or more processors 1302, which in combination with the one or more computer-readable media, are configured to execute instructions 1314 to implement modules to perform actions described in this disclosure.
For one embodiment, control module 1304 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 1302 and/or any suitable device or component in communication with control module 1304.
The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and/or a firmware module.
Memory 1306 may be used, for example, to load and store data and/or instructions 1314 for device 1300. For one embodiment, memory 1306 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 1306 may comprise a double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, control module 1304 may include one or more input/output controllers to provide an interface to NVM/storage 1308 and input/output device(s) 1310.
For example, NVM/storage 1308 may be used to store data and/or instructions 1314. NVM/storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible by the device and need not be part of the device. For example, NVM/storage 1308 may be accessible over a network via input/output device(s) 1310.
Input/output device(s) 1310 may provide an interface for apparatus 1300 to communicate with any other suitable device, input/output device(s) 1310 may include communication components, audio components, sensor components, and so forth. The network interface 1312 may provide an interface for the device 1300 to communicate over one or more networks, and the device 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a communication standard-based wireless network, e.g., WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers (e.g., memory controller modules) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers of the control module 1304 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic for one or more controller(s) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic of one or more controllers of the control module 1304 to form a system on chip (SoC).
In various embodiments, apparatus 1300 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, apparatus 1300 may have more or fewer components and/or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and speakers.
An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the processors to perform a method of predicting a processing duration of a request as described in one or more of the embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method and the device for predicting the processing duration of the request provided by the application are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the application, and the description of the above embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (16)

1. A method for predicting a processing duration of a request, comprising:
receiving a processing request;
determining a dependency relationship between a plurality of processing operations involved in the processing request, and determining a system environment involved in the processing request;
predicting a duration required for a process of processing the processing request according to at least the dependency relationship and the system environment.
2. The method of claim 1, wherein predicting a duration required for processing the processing request based on at least the dependency and the system environment comprises:
acquiring the receiving time of the processing request;
and predicting the duration according to the receiving time, the dependency relationship and the system environment.
3. The method of claim 1, wherein predicting a duration required for processing the processing request based on at least the dependency and the system environment comprises:
and inputting the dependency relationship and the system environment into a prediction model to obtain the time length output by the prediction model.
4. The method of claim 3, further comprising:
obtaining a plurality of sample data sets, wherein each sample data set comprises a sample dependency relationship among a plurality of sample processing operations related to a sample processing request, a sample system environment related to the sample processing request and a marking duration required by the process for processing the sample processing request;
and training a model by using the plurality of sample data sets to obtain the prediction model.
5. The method of claim 3 or 4, wherein the prediction model comprises a recurrent neural network, a feedforward neural network and a fully-connected layer;
the cyclic neural network is used for processing the dependency relationship to obtain a time influence factor;
the feedforward neural network is used for processing the system environment to obtain another time influence factor;
and the full connection layer is used for simultaneously processing the time influence factor and the other time influence factor to obtain the time length required by the process of processing the request.
6. The method of claim 5, wherein the recurrent neural network comprises a bidirectional recurrent neural network;
the recurrent neural network comprises a long-short term memory network LSTM.
7. The method of claim 6, wherein the bidirectional recurrent neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, the backward LSTM network comprises a plurality of sequentially connected LSTM models, and the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to that of the plurality of sequentially connected LSTM models of the backward LSTM network;
and respectively inputting each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network, and then connecting the output vector of the last LSTM model in the forward LSTM network with the output vector of the last LSTM model in the backward LSTM network to obtain the output vector of the bidirectional recurrent neural network.
8. The method of claim 7,
for any processing operation, determining the sequential execution order of the processing operation in a plurality of processing operations related to the processing request;
determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the forward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation;
and determining the LSTM models corresponding to the sequential execution sequence in a plurality of LSTM models included in the backward LSTM network, and using the LSTM models as the LSTM models corresponding to the processing operation.
9. The method of claim 7,
respectively carrying out one-hot encoding on each processing operation to respectively obtain a vector corresponding to each processing operation;
and respectively inputting the vector corresponding to each processing operation into the LSTM model corresponding to the forward LSTM network and the LSTM model corresponding to the backward LSTM network.
10. The method of claim 5, wherein the feed-forward neural network comprises a residual network;
the feedforward neural network comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
11. The method of claim 1, wherein the method is applied to a distributed database system.
12. A database prediction system, comprising:
the device comprises an input module, a sequence module, a depth module and an output module;
the input module is used for acquiring the sequence characteristics of the query plan and the execution environment characteristics of the query plan;
the sequence module is used for processing sequence characteristics in the query plan to obtain a first time influence factor;
the depth module is used for processing the execution environment characteristics of the query plan to obtain a second time influence factor;
and the output module is used for acquiring the execution duration of the query plan according to the first time influence factor and the second time influence factor.
13. The system of claim 12,
the sequence module comprises a bidirectional cyclic neural network;
the bidirectional cyclic neural network comprises a forward LSTM network and a backward LSTM network;
the forward LSTM network comprises a plurality of sequentially connected LSTM models, and the backward LSTM network comprises a plurality of sequentially connected LSTM models, wherein the connection sequence between the plurality of sequentially connected LSTM models of the forward LSTM network is opposite to the connection sequence between the plurality of sequentially connected LSTM models of the backward LSTM network.
14. The system of claim 12, wherein the depth module comprises a feed-forward neural network;
the feedforward neural network comprises a plurality of network units, and the network units are connected in a residual connection mode;
each network unit comprises an aggregation layer, a full connection layer, a batch regularization layer and a linear rectification function unit.
15. An apparatus for predicting a processing duration of a request, comprising:
a receiving module, configured to receive a processing request;
a determining module, configured to determine a dependency relationship between a plurality of processing operations involved in the processing request, and determine a system environment involved in the processing request;
and the prediction module is used for predicting the time required by the process of processing the processing request at least according to the dependency relationship and the system environment.
16. The apparatus of claim 15, wherein the apparatus is applied to a distributed database system.
CN201910745544.3A 2019-08-13 2019-08-13 Method and device for predicting processing duration of request Pending CN112395311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910745544.3A CN112395311A (en) 2019-08-13 2019-08-13 Method and device for predicting processing duration of request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910745544.3A CN112395311A (en) 2019-08-13 2019-08-13 Method and device for predicting processing duration of request

Publications (1)

Publication Number Publication Date
CN112395311A true CN112395311A (en) 2021-02-23

Family

ID=74601203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910745544.3A Pending CN112395311A (en) 2019-08-13 2019-08-13 Method and device for predicting processing duration of request

Country Status (1)

Country Link
CN (1) CN112395311A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151504A1 (en) * 2011-12-09 2013-06-13 Microsoft Corporation Query progress estimation
CN103927228A (en) * 2013-01-15 2014-07-16 株式会社日立制作所 Job execution prediction method and job execution prediction device
CN105243068A (en) * 2014-07-09 2016-01-13 华为技术有限公司 Database system query method, server and energy consumption test system
US20160246919A1 (en) * 2013-10-08 2016-08-25 The Regents Of The University Of California Predictive optimization of network system response
CN107491508A (en) * 2017-08-01 2017-12-19 浙江大学 A kind of data base querying time forecasting methods based on Recognition with Recurrent Neural Network
US20180013692A1 (en) * 2016-07-05 2018-01-11 Sap Se Parallelized replay of captured database workload
CN108009023A (en) * 2017-11-29 2018-05-08 武汉理工大学 Method for scheduling task based on BP neural network time prediction in mixed cloud
US20180137412A1 (en) * 2016-11-16 2018-05-17 Cisco Technology, Inc. Network traffic prediction using long short term memory neural networks
CN108268313A (en) * 2016-12-30 2018-07-10 杭州华为数字技术有限公司 The method and apparatus of data processing
CN109118020A (en) * 2018-09-06 2019-01-01 南京工业职业技术学院 A kind of subway station energy consumption short term prediction method and its forecasting system
CN109324890A (en) * 2017-07-31 2019-02-12 华为技术有限公司 Method for managing resource, device and computer readable storage medium
CN109981749A (en) * 2019-01-30 2019-07-05 北京理工大学 A kind of cloud workflow task running time prediction method promoted based on limit gradient

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151504A1 (en) * 2011-12-09 2013-06-13 Microsoft Corporation Query progress estimation
CN103927228A (en) * 2013-01-15 2014-07-16 株式会社日立制作所 Job execution prediction method and job execution prediction device
US20160246919A1 (en) * 2013-10-08 2016-08-25 The Regents Of The University Of California Predictive optimization of network system response
CN105243068A (en) * 2014-07-09 2016-01-13 华为技术有限公司 Database system query method, server and energy consumption test system
US20180013692A1 (en) * 2016-07-05 2018-01-11 Sap Se Parallelized replay of captured database workload
US20180137412A1 (en) * 2016-11-16 2018-05-17 Cisco Technology, Inc. Network traffic prediction using long short term memory neural networks
CN108268313A (en) * 2016-12-30 2018-07-10 杭州华为数字技术有限公司 The method and apparatus of data processing
CN109324890A (en) * 2017-07-31 2019-02-12 华为技术有限公司 Method for managing resource, device and computer readable storage medium
CN107491508A (en) * 2017-08-01 2017-12-19 浙江大学 A kind of data base querying time forecasting methods based on Recognition with Recurrent Neural Network
CN108009023A (en) * 2017-11-29 2018-05-08 武汉理工大学 Method for scheduling task based on BP neural network time prediction in mixed cloud
CN109118020A (en) * 2018-09-06 2019-01-01 南京工业职业技术学院 A kind of subway station energy consumption short term prediction method and its forecasting system
CN109981749A (en) * 2019-01-30 2019-07-05 北京理工大学 A kind of cloud workflow task running time prediction method promoted based on limit gradient

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨甲甲;刘国龙;赵俊华;文福拴;董朝阳;: "采用长短期记忆深度学习模型的工业负荷短期预测方法", 电力建设, no. 10, pages 29 - 36 *
栾翠菊;宋广华;郑耀;张继发;: "一种网格并行任务执行时间预测算法", 计算机集成制造系统, no. 09, pages 143 - 148 *

Similar Documents

Publication Publication Date Title
US11144330B2 (en) Algorithm program loading method and related apparatus
CN108512715B (en) Load pressure test method of service link and related device
CN113836885A (en) Text matching model training method, text matching device and electronic equipment
CN114896454A (en) Short video data recommendation method and system based on label analysis
CN115576502B (en) Data storage method and device, electronic equipment and storage medium
WO2023051228A1 (en) Method and apparatus for sample data processing, and device and storage medium
CN111198754A (en) Task scheduling method and device
CN113010502A (en) Data quality auditing method, device, equipment and storage medium
US20240078220A1 (en) Hyperparameter tuning in a database environment
CN112395311A (en) Method and device for predicting processing duration of request
CN113297267A (en) Data caching and task processing method, device, equipment and storage medium
CN112308644A (en) Method and device for processing description information
CN113849524B (en) Data processing method and device
CN113448739B (en) Data processing method and device
WO2022179424A1 (en) Data processing method and apparatus
CN107562533B (en) Data loading processing method and device
CN112699140B (en) Data processing method, device, equipment and storage medium
CN114996307A (en) Federal processing method and device for data
CN110019068B (en) Log text processing method and device
CN114764372A (en) Data processing method and device, electronic equipment and storage medium
CN114866845B (en) Information detection method and system based on short video release
CN112463798B (en) Cross-database data extraction method and device, electronic equipment and storage medium
CN115294108B (en) Target detection method, target detection model quantification device, and medium
CN113312167B (en) Service control method and device, electronic equipment and computer readable medium
CN110610393A (en) Information recommendation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination