Cloud computing index recommendation method and system

文档序号:7803 发布日期:2021-09-17 浏览:40次 中文

1. A cloud computing index recommendation method is characterized by comprising the following steps:

acquiring unit computing cost and unit storage cost of a currently used cloud computing server in unit time;

acquiring all historical query sentences of a target user, extracting common features of all the historical query sentences, and determining query indexes corresponding to the historical query sentences according to the common features;

determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources;

determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

recommending a target query index to the target user, wherein the target query index comprises the query index with the lowest cost in the total cost corresponding to each current query index.

2. The cloud computing index recommendation method according to claim 1, wherein the method for determining the query cost of each query index according to the frequency, time and used computing resources of the query index query database comprises:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

3. The cloud computing index recommendation method according to claim 1, wherein the method for determining the usage amount and usage time of the computing resource corresponding to each current query index comprises:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

4. The cloud computing index recommendation method according to claim 1, wherein after recommending the target query index to the target user, the method further comprises:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

5. The cloud computing index recommendation method according to claim 1, wherein before the obtaining all historical query sentences of the target user, extracting common features of all the historical query sentences, and determining the query index corresponding to the historical query sentence according to the common features, the method further comprises:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

6. A cloud computing index recommendation system, the system comprising:

the cloud computing and storage cost collecting module is used for acquiring the unit computing cost and the unit storage cost of the currently used cloud computing server in unit time;

the query history analysis and prediction module is used for acquiring all history query sentences of a target user, extracting common features of all the history query sentences and determining query indexes corresponding to the history query sentences according to the common features;

the construction and storage cost analysis and prediction module is used for determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources; determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

and the intelligent hub judgment module is used for recommending target query indexes to the target user, wherein the target query indexes comprise query indexes with the lowest cost in the total cost corresponding to each current query index.

7. The cloud computing index recommendation system of claim 6, wherein the build and store cost analysis prediction module is further configured to:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

8. The cloud computing index recommendation system of claim 6, wherein the build and store cost analysis prediction module is further configured to:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

9. The cloud computing index recommendation system of claim 6, further comprising a cost calculation module to:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

10. The cloud computing index recommendation system of claim 6, further comprising a model matching module to:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

Background

In recent years, the cloud computing industry has been rapidly advanced, more and more enterprises begin to embrace the cloud environment On a large scale, and no matter the applications are OLTP (On-Line Transaction Processing) or OLAP (On-Line Analytical Processing), the applications are gradually migrated to the cloud, and mainstream cloud manufacturers provide reliable and flexible computing services and storage services to meet the requirements of customers.

One trend of the current big data architecture is separation of computing and storage, and under the big background of a cloud environment, computing services are deployed on a flexible cloud server provided by a cloud manufacturer, and storage services can be selected to use cheap infinitely scalable block storage provided by the cloud manufacturer.

After product pricing of a plurality of mainstream cloud computing service providers is observed, it can be seen that cost of block storage is far lower than computing cost, in the current OLAP analysis field, many software are systems adopting an MPP architecture, a core idea of MPP (Massively Parallel Processing) is to distribute tasks to a plurality of servers and nodes in Parallel, after computing is completed on each node, respective results are collected together to obtain a final analysis result, and then in the current cloud environment, when an ultra-large-scale data set is processed, each query consumes a large amount of computing resources, even if repeated query analysis demands, high analysis cost is generated.

Disclosure of Invention

The embodiment of the disclosure provides a cloud computing index recommendation method and system, which can reduce the total ownership cost used on a cloud by exchanging computing cost into storage cost.

In a first aspect of the embodiments of the present disclosure, a cloud computing index recommendation method is provided, including:

acquiring unit computing cost and unit storage cost of a currently used cloud computing server in unit time;

acquiring all historical query sentences of a target user, extracting common features of all the historical query sentences, and determining query indexes corresponding to the historical query sentences according to the common features;

determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources;

determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

recommending a target query index to the target user, wherein the target query index comprises the query index with the lowest cost in the total cost corresponding to each current query index.

In an alternative embodiment, the method for determining the query cost of each query index according to the frequency, time and used computing resources of the query index query database comprises:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

In an optional implementation, the method for determining the usage amount and usage time of the computing resource corresponding to each current query index includes:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

In an optional implementation manner, after recommending the target query index to the target user, the method further includes:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

In an optional implementation manner, before the obtaining all historical query sentences of the target user, extracting common features of all the historical query sentences, and determining the query indexes corresponding to the historical query sentences according to the common features, the method further includes:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

In a second aspect of the embodiments of the present disclosure, a cloud computing index recommendation system is provided, where the system includes:

the cloud computing and storage cost collecting module is used for acquiring the unit computing cost and the unit storage cost of the currently used cloud computing server in unit time;

the query history analysis and prediction module is used for acquiring all history query sentences of a target user, extracting common features of all the history query sentences and determining query indexes corresponding to the history query sentences according to the common features;

the construction and storage cost analysis and prediction module is used for determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources; determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

and the intelligent hub judgment module is used for recommending target query indexes to the target user, wherein the target query indexes comprise query indexes with the lowest cost in the total cost corresponding to each current query index.

In an alternative embodiment, the build and store cost analysis prediction module is further configured to:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

In an alternative embodiment, the build and store cost analysis prediction module is further configured to:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

In an alternative embodiment, the system further comprises a cost calculation module for:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

In an optional embodiment, the system further comprises a model matching module for:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

The embodiment of the disclosure provides a cloud computing index recommendation method, which comprises the following steps:

acquiring unit computing cost and unit storage cost of a currently used cloud computing server in unit time;

acquiring all historical query sentences of a target user, extracting common features of all the historical query sentences, and determining query indexes corresponding to the historical query sentences according to the common features;

determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources;

determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

recommending a target query index to the target user, wherein the target query index comprises the query index with the lowest cost in the total cost corresponding to each current query index.

The embodiment of the disclosure provides an intelligent recommendation index to reduce query computation cost, and more indexes recommended by the intelligence are used for pre-computation, so that the computation cost is exchanged into storage cost, and the total ownership cost used on a cloud is reduced. Especially in a highly concurrent scenario, the more queries, the more pre-computed results can be multiplexed, and the more computing resources consumed by each query can be reduced.

Drawings

Fig. 1 is a schematic flow chart of a cloud computing index recommendation method according to an embodiment of the present disclosure;

FIG. 2 is a logic diagram of a cloud computing index recommendation system according to an embodiment of the present disclosure;

fig. 3 is a schematic structural diagram of a cloud computing index recommendation system according to an embodiment of the present disclosure.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present disclosure and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein.

It should be understood that, in various embodiments of the present disclosure, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

It should be understood that in the present disclosure, "including" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

It should be understood that in the present disclosure, "plurality" means two or more. "and/or" is merely an association describing an associated object, meaning that three relationships may exist, for example, and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "comprises A, B and C" and "comprises A, B, C" means that all three of A, B, C comprise, "comprises A, B or C" means that one of A, B, C comprises, "comprises A, B and/or C" means that any 1 or any 2 or 3 of A, B, C comprises.

It should be understood that in this disclosure, "B corresponding to a", "a corresponds to B", or "B corresponds to a" means that B is associated with a, from which B can be determined. Determining B from a does not mean determining B from a alone, but may be determined from a and/or other information. And the matching of A and B means that the similarity of A and B is greater than or equal to a preset threshold value.

As used herein, "if" may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context.

The technical solution of the present disclosure is explained in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.

Fig. 1 exemplarily shows a flowchart of a cloud computing index recommendation method according to an embodiment of the present disclosure, and as shown in fig. 1, the method includes:

step S101, acquiring unit computing cost and unit storage cost of a currently used cloud computing server in unit time;

the cloud computing index recommendation method is a scheme for intelligently recommending indexes based on cost on the cloud in the OLAP field, and based on the scheme of the embodiment of the disclosure, on the premise that a client analyzes query performance and construction performance, the query history can be analyzed according to the client, comprehensive and multi-round intelligent feedback tuning can be performed, and finally a part of indexes are intelligently recommended.

In the embodiment of the present disclosure, an OLTP (On-Line Transaction Processing) application generally has the following characteristics:

1. the real-time performance requirement is high.

2. The data size is not very large, the data size on the production library is not too large generally, and corresponding data processing and transferring can be performed in time.

3. Transactions are generally deterministic, such as the amount of money deposited by a bank must be deterministic, so OLTP accesses deterministic data.

4. High concurrency and requires the ACID principle to be satisfied. For example, two people operate a bank card account at the same time, such as a QPS request of tens of thousands when a large shopping website is deactivated in seconds.

OLAP (On-Line Analytical Processing) application is generally characterized by comprising the following steps:

1. the real-time requirement is not very high, for example, the most common application is day-level updating data and then outputting a corresponding data report.

2. The data size is large, because dynamic query is supported by OLAP, a user may need to obtain information that is desired to know by counting many data, such as time series analysis and the like, so that the processed data size is large;

the key point of the OLAP system is to provide decision support through data, so the query is generally dynamic and self-defined. The concept of dimension is particularly important in OLAP. Generally, all the dimension data concerned by the user is stored in the corresponding data platform.

The unit computing cost and the unit storage cost of the currently used cloud computing server in unit time are obtained, so that the cloud computing server can be adapted to a plurality of mainstream cloud computing manufacturers, and is used for collecting accurate unit computing and storage cost information to support the subsequent cost computing process.

Step S102, obtaining all historical query sentences of a target user, extracting common features of all the historical query sentences, and determining query indexes corresponding to the historical query sentences according to the common features;

by extracting the common features of all historical query sentences, the query index can be further determined according to the common features, and the query index can be reused, so that the subsequent query cost is reduced.

In an optional implementation manner, before the obtaining all historical query sentences of the target user, extracting common features of all the historical query sentences, and determining the query indexes corresponding to the historical query sentences according to the common features, the method further includes:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

By collecting all historical analysis query statements of the client, common features are extracted from all query plan trees, and therefore models which can answer the queries are recommended.

Step S103, determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources;

in an alternative embodiment, the method for determining the query cost of each query index according to the frequency, time and used computing resources of the query index query database comprises:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

Because the analysis query of a client is complex and various, a large number of indexes with inclusion relationship can be recommended, and the query history analysis prediction module conjectures the use amount of the calculation resources which can be reduced by each query SQL after a certain index is prepared according to the query SQL frequency in the history query, the time consumption and the use of the query SQL calculation resources and the data sampling statistical information of the source data, so that the calculation cost is saved, and a label of the query cost and the benefit is marked on each index.

Step S104, determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

step S015, according to the current query indexes, determining a total cost corresponding to each current query index according to the unit calculation cost, the unit storage cost, the calculation resource usage amount and the usage time;

in an optional implementation, the method for determining the usage amount and usage time of the computing resource corresponding to each current query index includes:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

And the plurality of candidate indexes can be used for deducing the construction calculation cost and the storage cost required for constructing each index according to the data sampling statistical information of the source data. When the calculation cost of the construction is presumed, the inclination rate and the repetition rate of each dimension can be identified according to the data sampling statistical information of the source data, so that the cpu, the memory resource and the construction duration required by each index are intelligently predicted and calculated, and the usage amount and the usage duration of the calculation resource are presumed.

When the storage cost is presumed, the storage size of the index is presumed and constructed according to the data characteristics, the total cost of each index is calculated according to the unit calculation cost and the unit storage cost provided by the cloud calculation and storage cost collection module, and then all candidate indexes are marked with tags with construction cost expenditure.

And step S106, recommending a target query index to the target user.

The target query index comprises the query index with the lowest cost in the total cost corresponding to each current query index.

In an optional implementation manner, after recommending the target query index to the target user, the method further includes:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

According to all candidate indexes and the condition of query cost and income, all the conditions of construction cost and expenditure can be analyzed. The index is then chosen based on the total cost gain, thereby providing an index recommendation that minimizes the total cost.

The embodiment of the disclosure provides a cloud computing index recommendation method, which comprises the following steps:

acquiring unit computing cost and unit storage cost of a currently used cloud computing server in unit time;

acquiring all historical query sentences of a target user, extracting common features of all the historical query sentences, and determining query indexes corresponding to the historical query sentences according to the common features;

determining the query cost of each query index according to the frequency and time of querying the database by the query index and the used computing resources;

determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

recommending a target query index to the target user, wherein the target query index comprises the query index with the lowest cost in the total cost corresponding to each current query index.

The embodiment of the disclosure provides an intelligent recommendation index to reduce query computation cost, and more indexes recommended by the intelligence are used for pre-computation, so that the computation cost is exchanged into storage cost, and the total ownership cost used on a cloud is reduced. Especially in a highly concurrent scenario, the more queries, the more pre-computed results can be multiplexed, and the more computing resources consumed by each query can be reduced.

Fig. 2 is a logic diagram of a cloud computing index recommendation system according to an embodiment of the present disclosure, where as shown in fig. 2, the operation logic of the system includes:

the cloud computing and storage cost collection module can automatically collect the type of a computing host of a currently used cloud service provider, the use cost of a computing server in unit time and the storage cost of unit storage data volume in unit time, is suitable for a plurality of mainstream manufacturers, and is used for collecting accurate unit computing and storage cost information to support the cost computing process of inquiring the history analysis prediction module and constructing and storing the cost analysis prediction module.

The query history analysis and prediction module collects all history analysis query statements of a client and extracts common characteristics from all query plan trees so as to recommend a model capable of answering the queries, because the analysis queries of the client are complex and various, a large number of indexes with relation are recommended, and the query history analysis and prediction module speculates the use amount of the calculation resources which can be reduced by the SQL of each query after a certain index is prepared according to the frequency of the SQL queries in the history queries, the time consumption and the use of the SQL and the data sampling statistical information of source data, so that the calculation cost is saved, and a label of query cost and benefit is marked on each index.

And the building and storage cost analysis and prediction module receives the built index candidates transmitted by the intelligent hub judgment module, and can deduce the building calculation cost and the storage cost required by building each index according to the data sampling statistical information of the source data. When the calculation cost is presumed to be constructed, the module can identify the inclination rate and the repetition rate of each dimension according to data sampling statistical information of source data, so that cpu, memory resources and construction time required by each index are intelligently predicted and calculated, the usage amount and the usage time of the calculation resources are presumed, when the storage cost is presumed, the storage size of the index is presumed and constructed according to data characteristics, then the total cost of each index is calculated according to the unit calculation cost and the unit storage cost provided by the cloud calculation and storage cost collection module, and then all candidate indexes are marked with tags of construction cost expenditure.

And the intelligent hub judgment module informs the query history analysis and prediction module of providing all candidate indexes and the query cost and income conditions of the candidate indexes and gives the construction and storage cost analysis and prediction module to analyze all construction cost and expenditure conditions. The index is then chosen based on the total cost gain, thereby providing an index recommendation that minimizes the total cost.

The pre-calculation and query engine module can construct a pre-calculation index according to the index recommended by the intelligent hub judgment module, the pre-calculation module can pull an original ultra-large-scale data set to pre-aggregate, and the constructed index is provided for the query module, so that the execution efficiency of SQL analysis by a client is accelerated, the scanned data volume is reduced, and the query calculation cost is further reduced.

Fig. 3 is a schematic structural diagram of a cloud computing index recommendation system according to an embodiment of the present disclosure, and as shown in fig. 3, the system includes:

the cloud computing and storage cost collecting module 31 is configured to obtain a unit computing cost and a unit storage cost of a currently used cloud computing server in unit time;

the query history analysis and prediction module 32 is configured to obtain all history query statements of a target user, extract common features of all the history query statements, and determine a query index corresponding to the history query statement according to the common features;

a construction and storage cost analysis prediction module 33, configured to determine a query cost for each query index according to the frequency and time of querying the database by the query index and the used computing resources; determining a plurality of current query indexes corresponding to the current query statement based on the obtained current query statement of the target user;

determining the total cost corresponding to each current query index according to the unit calculation cost and the unit storage cost as well as the calculation resource usage amount and the usage time of the plurality of current query indexes;

and the intelligent hub judgment module 34 recommends a target query index to the target user, wherein the target query index includes a query index with the lowest cost in the total costs corresponding to each current query index.

In an alternative embodiment, the build and store cost analysis prediction module 33 is further configured to:

determining the query cost of each query index according to the frequency of querying the database by the query index, the time of querying the database by the query index, the computing resources used by querying the query index and the data sampling statistical information of the pre-acquired source data;

and calculating cost based on the pre-acquired query index, determining the cost benefit of the query index, and adding a cost benefit label to the query index.

In an alternative embodiment, the build and store cost analysis prediction module 33 is further configured to:

determining the inclination rate and the repetition rate of the query index in each dimension according to data sampling statistical information of pre-acquired source data;

predicting the computing resources, the memory resources and the construction duration required by each query index based on the inclination rate and the repetition rate of each dimension;

and determining the usage amount and the usage time of the computing resources corresponding to each current query index based on the computing resources, the memory resources and the construction duration required by each query index, and the unit computing cost and the unit storage cost.

In an alternative embodiment, the system further comprises a cost calculation module for:

constructing a pre-computed index based on the target query index;

pre-polymerizing the pre-computed index based on the pre-computed index and a pre-constructed data set;

analyzing the query efficiency of the query statement of the target user to a database and scanning the data volume of the database based on the pre-calculated index after pre-polymerization;

determining a computational cost of the target query index based on the query efficiency and the amount of data scanned across the database.

In an optional embodiment, the system further comprises a model matching module for:

based on all pre-acquired historical query sentences of a plurality of users, constructing query plan trees corresponding to all the historical query sentences;

extracting common features of query sentences of the query plan tree, and matching a query analysis model corresponding to the common features based on the common features;

and determining a query index corresponding to the historical query statement according to the query analysis model, wherein the query index comprises the inclusion relation between the query statement and the query index.

The present disclosure also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the device may read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the methods provided by the various embodiments described above.

The readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, a readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Additionally, the ASIC may reside in user equipment. Of course, the processor and the readable storage medium may also reside as discrete components in a communication device. The readable storage medium may be a read-only memory (ROM), a random-access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

In the above embodiments of the terminal or the server, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present disclosure may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.

Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:蜘蛛池网站的识别方法、装置、电子装置和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!