Data processing method, electronic device and storage medium based on data middle platform

By building an execution time prediction model based on the data middle platform, using historical query information and influence parameters, the problem that SQL query task execution time cannot be known in advance is solved, and the user experience is improved.

CN117931842BActive Publication Date: 2024-12-13SINGULARITY DIGITAL (BEIJING) TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410120143.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2024-12-13
Estimated Expiration
2044-01-29

AI Technical Summary

Technical Problem

The prior art cannot know the execution time of SQL query tasks in advance, resulting in untimely task processing and poor user experience.

Method used

Based on the method of the data middle platform, the target execution time prediction model is constructed by obtaining the historical query information set, and the execution time of SQL tasks is predicted by factors such as the metadata of the table and the statement structure.

Benefits of technology

It realizes prediction of SQL task execution time, improves user experience, and ensures timely task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931842B_ABST
    Figure CN117931842B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method, electronic device and storage medium based on a data middle station, including: obtaining a target execution time prediction model based on a historical query information set corresponding to the current data middle station, and obtaining a target impact parameter; based on receiving a target SQL task, obtaining an image value corresponding to the target impact parameter corresponding to the target SQL task as input data; inputting the input data into the target execution time prediction model to obtain the corresponding predicted execution time. The present invention can predict the execution time of SQL tasks and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data processing method based on a data middle station, an electronic device and a storage medium. Background Art

[0002] In some application scenarios, SQL tasks need to be used to execute query tasks. Currently, for a given SQL query task, it is not possible to know in advance how long it will take to complete the execution, that is, the corresponding query time cannot be known in advance. This may lead to untimely task processing and poor user experience. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is:

[0004] An embodiment of the present invention provides a data processing method based on a data center, the method comprising the following steps:

[0005] S100, based on the historical query information set I corresponding to the current data center, obtain the target execution time prediction model and obtain the target impact parameter; I = {I1, I2, ..., I i , ..., I n}, I i is the i-th historical query information in I, i ranges from 1 to n, and n is the number of historical query information in I; I i = {U i , Q i , T i}, B i For I i The ID of the corresponding SQL task, Q i For I i The corresponding influence value of the influencing parameter, T i For I i The execution time of the corresponding SQL task; Q i =(Q i1 , Q i1 ), Q i1 Q i The impact value set corresponding to the first type of impact parameter in Q i1 = {Q 1 i1 , Q 2 i1 , ..., Q j1 i1 , ..., Q m1 i1}, Q j1 i1 Q i1 The influence value of the j1th influencing parameter in, j1 ranges from 1 to m1, m1 is Qi1 The number of influencing parameters in Q i2 Q i The impact value set corresponding to the second type of impact parameter in Q i2 = {Q 1 i2 , Q 2 i2 , ..., Q j2 i2 , ..., Q m2 i2}, Q j2 i2 Q i2 The influence value of the j2th influencing parameter in, j2 ranges from 1 to m2, m2 is Q i2 The number of influencing parameters in the SQL statement; the first type of influencing parameters are parameters related to the metadata of the table associated with the SQL statement, and the second type of influencing parameters are parameters related to the statement structure of the SQL statement.

[0006] S200 , based on receiving a target SQL task, obtaining an image value corresponding to a target impact parameter corresponding to the target SQL task as input data.

[0007] S300, inputting the input data into the target execution time prediction model to obtain the corresponding predicted execution time.

[0008] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned method.

[0009] An embodiment of the present invention further provides an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0010] The present invention has at least the following beneficial effects:

[0011] The technical solution provided by the embodiment of the present invention can predict the execution time of SQL tasks and improve user experience.

[0012] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0014] Figure 1 A flowchart of a data processing method based on a data middle station provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0016] An embodiment of the present invention provides a data processing method based on a data center, which is used to predict the execution time of an SQL task.

[0017] In an embodiment of the present invention, the data middle platform can be used to accumulate existing / new information system services and data. It is an intermediate and supporting platform for realizing data empowerment of new services and new applications. It can be an existing structure. To avoid redundancy, the present invention omits its specific introduction.

[0018] In an embodiment of the present invention, the SQL task is implemented based on an SQL statement used to query the data warehouse of the data center.

[0019] Further, in an embodiment of the present invention, the method may include: Figure 1 Steps shown:

[0020] S100, based on the historical query information set I corresponding to the current data center, obtain the target execution time prediction model and obtain the target impact parameter; I = {I1, I2, ..., I i , ..., I n}, I i is the i-th historical query information in I, i ranges from 1 to n, and n is the number of historical query information in I; I i = {U i , Q i , T i}, B i For I i The ID of the corresponding SQL task, Q i For I i The corresponding influence value of the influencing parameter, T iFor I i The execution time of the corresponding SQL task; Q i =(Q i1 , Q i1 ), Q i1 Q i The impact value set corresponding to the first type of impact parameter in Q i1 = {Q 1 i1 , Q 2 i1 , ..., Q j1 i1 , ..., Q m1 i1}, Q j1 i1 Q i1 The influence value of the j1th influencing parameter in, j1 ranges from 1 to m1, m1 is Q i1 The number of influencing parameters in Q i2 Q i The impact value set corresponding to the second type of impact parameter in Q i2 = {Q 1 i2 , Q 2 i2 , ..., Q j2 i2 , ..., Q m2 i2}, Q j2 i2 Q i2 The influence value of the j2th influencing parameter in, j2 ranges from 1 to m2, m2 is Q i2 The number of influencing parameters in the SQL statement; the first type of influencing parameters are parameters related to the metadata of the table associated with the SQL statement, and the second type of influencing parameters are parameters related to the statement structure of the SQL statement.

[0021] In an embodiment of the present invention, the influencing parameter may be a parameter that affects the query complexity of SQL. The inventor of the present invention has found that if the SQL task query involves multiple tables, a join operation may need to be performed, which will increase the complexity of the query. If the query contains a table join (JOIN), especially a join involving multiple tables, the complexity of the query will increase. Different types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN) will also have different effects on query performance. If the query contains complex subqueries, the complexity of the query will increase and may cause performance degradation. If the query includes aggregate operations such as SUM, COUNT, AVG, etc., the complexity of the query will increase. In particular, performing aggregate operations on large data sets may require a lot of computing time. If the query contains ORDER BY, GROUP BY or HAVING clauses, the complexity will also increase. If the query includes heavy calculations, window functions, complex filtering conditions and a large number of data conversions, the complexity of the query will also increase. Therefore, in an illustrative embodiment, the first type of influencing parameters may include at least the fields, data magnitude and storage capacity of the tables associated with SQL. The second type of influencing parameters may at least include: SQL statement join operations, SQL statement subqueries, SQL statement aggregation operations, SQL statement recalculations, SQL statement aggregation functions, SQL statement filter conditions, and SQL statement data conversions.

[0022] In the embodiment of the present invention, the fields of the table may be, for example, id, name, age, address, tel, etc. The data magnitude of the table may be the number of data rows in the table.

[0023] In the embodiment of the present invention, the influence value Q of the j1th influencing parameter in the first category of influencing parameters is j1 1=∑ w b= 1A j1 1b , A j1 1b The attribute value corresponding to the j1th influencing factor corresponding to the bth table associated with the SQL statement, where b ranges from 1 to w, and w is the number of tables associated with the SQL statement; the attribute value is a value that characterizes the size of the influencing parameter, for example, the attribute value of the field of the table is the number of fields in the table, the attribute value of the data level of the table is the number of data rows included in the table, and the attribute value of the storage capacity of the table is the actual storage size of the table.

[0024] Further, in an exemplary embodiment of the present invention, the influence value Q of the j2th influence parameter in the second influence parameter is j2 2=G j2 2d , where G2 2d is the number of keywords corresponding to the j2th influencing parameter appearing in the SQL statement.

[0025] In an embodiment of the present invention, the keyword corresponding to the join operation is JOIN. For example, the statement "select * from A left join B on A.id = B.id" is a join operation. The keyword corresponding to the subquery may be IN. For example, the statement "select * from B where id in (select A)" is a subquery. The keywords corresponding to the aggregation operation may be SUM, COUNT, AVG, etc. The keywords corresponding to the recalculation may include ORDER BY, GROUP BY or HAVING. The keyword corresponding to the window function may be row number. The keywords corresponding to the filter condition may be and and or. The keyword corresponding to the data conversion may be CAST.

[0026] Those skilled in the art know that obtaining the number of keywords corresponding to each influencing parameter in an SQL statement may be an existing technology.

[0027] Furthermore, in another exemplary embodiment of the present invention, the influence value Q of the j2th influence parameter in the second influence parameter is j2 2=∑ x d=1 K j2 2d Among them, K j2 2d is the weight of the keyword corresponding to the dth j2th influencing parameter appearing in the SQL statement, the value of d ranges from 1 to x, x is the number of keywords corresponding to the j2th influencing parameter appearing in the SQL statement, among which, the appearance position of the keyword corresponding to the d-1th j2th influencing parameter is located before the appearance position of the keyword corresponding to the dth j2th influencing parameter.

[0028] Furthermore, K j2 2(d-1) >K j2 2d In this way, the same keyword has different weights when it appears in different positions in the SQL statement. The later the position, the smaller the corresponding weight, because the more keywords are located in the front, the more nested statements may be, and the more computing resources are required. j2 2d The specific value can be set based on actual needs.

[0029] Compared with the above-mentioned embodiments, this embodiment can make the image value of the second type of influencing parameter more accurate because different weights are assigned based on the order of appearance of the keywords corresponding to the influencing parameters.

[0030] Those skilled in the art know that obtaining the occurrence position of a keyword corresponding to each influencing parameter in an SQL statement may be an existing technology.

[0031] S200 , based on receiving a target SQL task, obtaining an image value corresponding to a target impact parameter corresponding to the target SQL task as input data.

[0032] S300, inputting the input data into the target execution time prediction model to obtain the corresponding predicted execution time.

[0033] Furthermore, in an embodiment of the present invention, S100 may specifically include the following steps:

[0034] S10, based on I, obtaining a training set, wherein each training data in the training set consists of an image value and an execution time corresponding to the corresponding historical query information;

[0035] S11, inputting the training data of the current batch into the current execution time prediction model for training to obtain the corresponding prediction result;

[0036] S12, based on the prediction results of the current batch and the corresponding real results, the current loss function value of the current execution time prediction model is obtained, and it is determined whether the current loss function value meets the preset model training end condition. If so, step S14 is executed, otherwise, step S13 is executed;

[0037] S13, updating the parameters of the current execution time prediction model based on the current loss function value, and using the next batch of training data as the training data of the current batch, and executing S11;

[0038] S14, using the current execution time prediction as the target execution time prediction I model.

[0039] In an embodiment of the present invention, the execution time prediction model may be an existing neural network model. The loss function value may be calculated based on the existing loss function. The preset model training end condition may be set based on actual needs. For example, the loss is less than or equal to a set loss threshold and remains unchanged within a set time period.

[0040] Furthermore, in another embodiment of the present invention, S100 may specifically include:

[0041] S101, taking the influencing parameters in the current intermediate influencing parameter set as the current influencing parameters, and based on I, obtaining the current training set and the current test set; wherein the current training set is composed of the influencing values ​​and execution times corresponding to the current influencing parameters in k1 historical query information, and the current test set is composed of the influencing values ​​and execution times corresponding to the current influencing parameters in k2 historical query information, k1+k2=n; the initial value of the current intermediate influencing parameter set is the first category influencing parameter.

[0042] S102, use the current training set to train the preset execution time prediction model to obtain the corresponding trained current execution time prediction model; and set the times counter C=C+1, if C<m2+1, it means that there are no influencing parameters currently involved in the model training, execute S103, if C=m2+1, it means that all the influencing parameters currently participate in the model training, execute S106; the initial value of C is 0.

[0043] In the embodiment of the present invention, the specific method of using the current training set to train the preset execution time prediction model to obtain the corresponding trained current execution time prediction model can refer to the aforementioned steps S11 to S14.

[0044] S103, input the current test set into the current execution time prediction model to obtain corresponding k2 current predicted execution times.

[0045] S104, if the current error set ES={ES1, ES2, . . . , ES r , ..., ES k2} is less than the set error threshold. j ≥P0, indicating that the accuracy of the current execution time prediction model meets the condition, and S105 is executed; otherwise, indicating that the accuracy of the current execution time prediction model does not meet the condition, and S106 is executed; wherein, ES r is the absolute error between the actual execution time and the predicted execution time corresponding to the rth test data in the current test set, and the value of r ranges from 1 to k2; P0 is the set quantity threshold.

[0046] In the embodiment of the present invention, the error threshold and P0 may be set as empirical values.

[0047] S105, obtain max(△d1,△d2, ...,△d s , ..., △ d q ) is used as the current intermediate influencing parameter and added to the current intermediate influencing parameter set, and S101 is executed; wherein, △d s is the sth impact value difference, △d s =|d1 s -d2 s ∣, d1s The influence value of the sth candidate influencing parameter corresponding to the first test data set formed by all errors in ES that are greater than or equal to the set error threshold, d2 s is the influence value of the sth candidate influencing parameter corresponding to the second test data set formed by all errors in ES that are less than the set error threshold, where s ranges from 1 to q, and q is the number of influencing parameters among the (m1+m2) influencing parameters excluding the current intermediate influencing parameter; d1 s =d1 s1 +d1 s2 +……+d1 su1 +……+d1 sp1 , d1 su1 is the influence value of the sth candidate influencing parameter corresponding to the u1th test data in the first test data set, where u1 ranges from 1 to p1, and p1 is the number of test data in the first test data set; d2 s =d2 s1 +d2 s2 +……+d2 su2 +……+d2 sp2 , d2 su2 is the influence value of the sth candidate influencing parameter corresponding to the u2th test data in the second test data set, the value of u2 ranges from 1 to p2, p2 is the number of test data in the second test data set; max() is the maximum value.

[0048] S106: Use the current execution time prediction model as the target execution time prediction model, and use the influencing parameters in the current intermediate influencing parameter set as the target influencing parameters.

[0049] In this embodiment, since the influencing parameters that have a great influence on the model are selected to train the model, the prediction accuracy of the model can be improved compared with the method of selecting all the influencing parameters to train the model.

[0050] Furthermore, in another embodiment of the present invention, the method further comprises the following steps:

[0051] S400, obtaining the historical target SQL task set M corresponding to the set time period before the current time = {M1, M2, ..., M h , ..., M E},M h is the hth historical target SQL task in M, where h ranges from 1 to E, and E is the number of historical target SQL tasks in M.

[0052] In the embodiment of the present invention, the duration of the set time period can be set based on actual needs, for example, it can be 30 to 90 days, preferably, it can be 30 days.

[0053] S500, get M h The corresponding similarity set D h , if max(D h )>D0, execute S600; wherein, D h ={D h1 , D h2 , ..., D hi , ..., D hn}; D hi M h The corresponding impact value and Q i The similarity between them; D0 is the set similarity threshold.

[0054] In the embodiment of the present invention, the similarity may be cosine similarity. It is known to those skilled in the art that D h The specific calculation method of may be the prior art. D0 may be set based on actual needs, for example, D0>0.95.

[0055] S600, if |T h -Tp h ∣>T0, T h Add to the current intermediate historical task set; the initial value of the intermediate historical task set is null; T h is max(D h ) corresponding to the execution time, Tp h T h The corresponding predicted execution time; T0 is the set time difference threshold.

[0056] In the embodiment of the present invention, T0 may be an empirical value.

[0057] S700, set h=h+1, if h≤E, execute S500; otherwise, execute S800.

[0058] S800, if the number of tasks in the current intermediate historical task set is greater than [E×f], it means that the prediction accuracy of the current target execution time model may not be enough, and then a prompt message for updating the current target execution time prediction model is output; otherwise, M and the corresponding predicted execution time are added to I as new historical query information, f is the preset coefficient, and [] represents rounding.

[0059] In the embodiment of the present invention, f may be a user-defined value, 0<f<1. In an exemplary embodiment, 0.1<f≤0.5.

[0060] In the embodiment of the present invention, the following steps may also be included:

[0061] Based on the output prompt information, M and the corresponding predicted execution time are added to I as new historical query information to update I, and the current target execution time prediction model is updated based on the updated I.

[0062] Those skilled in the art are aware that the method for updating the current target execution time prediction model based on the updated I can refer to the contents described in the aforementioned S10 to S14, or the contents described in S101 to S106, preferably, refer to the contents described in S101 to S106.

[0063] The data processing method based on the data middle station provided in the embodiment of the present invention can make it possible to know the execution time of SQL tasks in advance in actual applications, thereby improving user experience, because the execution time prediction model is trained based on the influence value and execution time of the influence parameters of the SQL corresponding to the historical query information.

[0064] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0065] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the above embodiments.

[0066] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to the above embodiments.

[0067] In an exemplary embodiment, a computer program product includes a computer program, and when the computer program is executed by a processor, the method according to the above embodiments is implemented.

[0068] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0069] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data processing method based on a data middle station, characterized in that: The method comprises the following steps: S100, based on the historical query information set I corresponding to the current data center, obtain the target execution time prediction model and obtain the target impact parameter; I={I1, I2, ..., I i , ..., I n }, I i is the i-th historical query information in I, i ranges from 1 to n, and n is the number of historical query information in I; I i ={U i , Q i , T i },U i For I i The ID of the corresponding SQL task, Q i For I i The corresponding influence value of the influencing parameter, T i For I i The execution time of the corresponding SQL task; Q i =(Q i1 , Q i2 ), Q i1 Q i The impact value set corresponding to the first type of impact parameter in Q i1 ={Q 1 i1 , Q 2 i1 , ..., Q j1 i1 , ..., Q m1 i1 }, Q j1 i1 Q i1 The influence value of the j1th influencing parameter in, j1 ranges from 1 to m1, m1 is Q i1 The number of influencing parameters in Q i2 Q i The impact value set corresponding to the second type of impact parameter in Q i2 ={Q 1 i2 , Q 2 i2 , ..., Q j2 i2 , ..., Q m2 i2 }, Q j2 i2 Q i2 The influence value of the j2th influencing parameter in, j2 ranges from 1 to m2, m2 is Q i2 The number of influencing parameters in the SQL statement; the first type of influencing parameters are parameters related to the metadata of the table associated with the SQL statement, and the second type of influencing parameters are parameters related to the statement structure of the SQL statement; S200, based on receiving a target SQL task, obtaining an impact value corresponding to a target impact parameter corresponding to the target SQL task as input data; S300, inputting the input data into the target execution time prediction model to obtain the corresponding predicted execution time; Among them, S100 specifically includes: S101, taking the influencing parameters in the current intermediate influencing parameter set as the current influencing parameters, and based on I, obtaining the current training set and the current test set; wherein the current training set is composed of the influencing values ​​and execution times corresponding to the current influencing parameters in k1 historical query information, and the current test set is composed of the influencing values ​​and execution times corresponding to the current influencing parameters in k2 historical query information, k1+k2=n; the initial value of the current intermediate influencing parameter set is the first type of influencing parameter; S102, train the preset execution time prediction model using the current training set to obtain the corresponding trained current execution time prediction model; and set the times counter C=C+1, if C<m2+1, execute S103, if C=m2+1, execute S106; the initial value of C is 0; S103, inputting the current test set into the current execution time prediction model to obtain corresponding k2 current predicted execution times; S104, if the current error set ES={ES1, ES2, ..., ES r , ..., ES k2 } is less than the set error threshold. j ≥P0, execute S105, otherwise, execute S106; where ES r is the absolute error between the actual execution time and the predicted execution time corresponding to the rth test data in the current test set, and the value of r ranges from 1 to k2; P0 is the set quantity threshold; S105, obtain max(△d1,△d2, ...,△d s , ..., △ d q ) is used as the current intermediate influencing parameter and added to the current intermediate influencing parameter set, and S101 is executed; wherein, △d s is the sth impact value difference, △d s =|d1 s -d2 s ∣, d1 s The influence value of the sth candidate influencing parameter corresponding to the first test data set formed by all errors in ES that are greater than or equal to the set error threshold, d2 s is the influence value of the sth candidate influencing parameter corresponding to the second test data set formed by all errors in ES that are less than the set error threshold, where s ranges from 1 to q, and q is the number of influencing parameters among the (m1+m2) influencing parameters excluding the current intermediate influencing parameter; d1 s =d1 s1 +d1 s2 +……+d1 su1 +……+d1 sp1 , d1 su1 is the influence value of the sth candidate influencing parameter corresponding to the u1th test data in the first test data set, where u1 ranges from 1 to p1, and p1 is the number of test data in the first test data set; d2 s =d2 s1 +d2 s2 +……+d2 su2 +……+d2 sp2 , d2 su2 is the influence value of the sth candidate influencing parameter corresponding to the u2th test data in the second test data set, the value of u2 ranges from 1 to p2, and p2 is the number of test data in the second test data set; max() is the maximum value; S106, using the current execution time prediction model as the target execution time prediction model, and using the influencing parameters in the current intermediate influencing parameter set as the target influencing parameters; The first type of influencing parameters at least include the fields, data levels and storage capacity of the SQL-related tables; the second type of influencing parameters at least include: the join operation of the SQL statement, the subquery of the SQL statement, the aggregation operation of the SQL statement, the recalculation of the SQL statement, the aggregation function of the SQL statement, the filtering condition of the SQL statement and the data conversion of the SQL statement; The influence value Q of the j1th influencing parameter in the first category of influencing parameters j1 i1 =∑ w b=1 A j1 1b , A j1 1b is the attribute value corresponding to the j1th influencing parameter corresponding to the bth table associated with the SQL statement, where b ranges from 1 to w, and w is the number of tables associated with the SQL statement; the attribute value is a value representing the size of the influencing parameter; The influence value Q of the j2th influencing parameter in the second category of influencing parameters j2 i2 =∑ x d=1 K j2 2d , where K j2 2d is the weight of the keyword corresponding to the dth j2th influencing parameter appearing in the SQL statement, d ranges from 1 to x, x is the number of keywords corresponding to the j2th influencing parameter appearing in the SQL statement, where the keyword corresponding to the d-1th j2th influencing parameter appears before the keyword corresponding to the dth j2th influencing parameter; K j2 2(d-1) >K j2 2d .

2. The method according to claim 1, characterized in that The following steps are also included: S400, obtaining the historical target SQL task set M={M1, M2, ..., M h , ..., M E },M h is the hth historical target SQL task in M, where h ranges from 1 to E, and E is the number of historical target SQL tasks in M; S500, get M h The corresponding similarity set D h , if max(D h )>D0, execute S600; where D h ={D h1 , D h2 , ..., D hi , ..., D hn }; D hi M h The corresponding impact value and Q i The similarity between them; D0 is the set similarity threshold; S600, if |T h -Tp h ∣>T0, T h Add to the current intermediate historical task set; the initial value of the intermediate historical task set is null; T h is max(D h ) corresponding to the execution time, Tp h T h The corresponding predicted execution time; T0 is the set time difference threshold; S700, set h=h+1, if h≤E, execute S500; otherwise, execute S800; S800, if the number of tasks in the current intermediate historical task set is greater than [E×f], then output a prompt message for updating the current target execution time prediction model; otherwise, add M and the corresponding predicted execution time as new historical query information to I, where f is a preset coefficient and [ ] indicates rounding.

3. An electronic device, characterized in that: including a processor and a memory; The processor is used to execute the steps of the method as claimed in claim 1 or 2 by calling the program or instructions stored in the memory.

4. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores a program or instruction, which enables a computer to execute the steps of the method as claimed in claim 1 or 2.

Citation Information

Patent Citations

  • Execution statement recognition method and device

    CN114265860A

  • SQL query time prediction method and device, equipment and medium

    CN116401281A

  • Method and device for predicting statement execution time range, processor and electronic equipment

    CN117131083A

  • Predictive query parsing time and optimization

    US20200183936A1