CN113127509B - Adaptation method and device for SQL execution engine in PaaS platform - Google Patents
Adaptation method and device for SQL execution engine in PaaS platform Download PDFInfo
- Publication number
- CN113127509B CN113127509B CN201911413753.4A CN201911413753A CN113127509B CN 113127509 B CN113127509 B CN 113127509B CN 201911413753 A CN201911413753 A CN 201911413753A CN 113127509 B CN113127509 B CN 113127509B
- Authority
- CN
- China
- Prior art keywords
- sql
- metadata
- execution engine
- decision
- information
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,具体涉及一种PaaS平台中SQL执行引擎的适配方法及装置。The present invention relates to the field of computer technology, in particular to an adaptation method and device for an SQL execution engine in a PaaS platform.
背景技术Background technique
PaaS(Platform as a Service,平台即服务)平台开放的数据服务底层多是基于hadoop的,其一般的执行流程是用户通过PaaS平台数据服务来访问hadoop的数据,执行计算和存储数据都是在Hadoop上完成。Hadoop上SQL处理引擎较多,主流的有hive、sparkSQL、flink、impala等等。其中,每种SQL处理引擎都有适用于的不同的场景,在擅长的场景下才能发挥最优的效果,在不适合的场景下运行效率和稳定性会大幅下降甚至运行失败。Hadoop平台上使用不合适的SQL引擎运行程序,容易出现运行效率不稳定或者失败的现象,增加业务运维难度。并且,Hadoop平台一般每天都有非常多的程序在运行,大量运行效率不高的程序会造成整个平台计算资源的明显浪费。The bottom layer of open data services of PaaS (Platform as a Service) platform is mostly based on Hadoop, and its general execution process is that users access Hadoop data through PaaS platform data services, and execute calculations and store data in Hadoop. completed. There are many SQL processing engines on Hadoop, and the mainstream ones include hive, sparkSQL, flink, impala and so on. Among them, each SQL processing engine is suitable for different scenarios, and the optimal effect can only be exerted in the scenarios in which it is good at, and the operating efficiency and stability will be greatly reduced or even fail in unsuitable scenarios. If an inappropriate SQL engine is used to run programs on the Hadoop platform, it is prone to instability or failure in operating efficiency, which increases the difficulty of business operation and maintenance. Moreover, the Hadoop platform generally has a lot of programs running every day, and a large number of programs with low operating efficiency will cause an obvious waste of computing resources on the entire platform.
现有技术中,技术人员在开发和提交SQL作业的时候,多是依靠技术人员的经验或者根据反复运行测试的结果确定SQL执行引擎。In the prior art, when developing and submitting SQL jobs, technicians mostly rely on the experience of the technicians or determine the SQL execution engine based on the results of repeated test runs.
但是,一方面,通过人工经验判断选择执行引擎,严重依赖技术人员的个人能力,无法保证选择的SQL引擎是最适合业务场景的。另一方面,通过选择不同的SQL引擎进行效率测试后再选择哪个最优的引擎的效率较低,并且在各个SQL引擎上重复运行相同程序测试运行效率会造成平台计算资源的浪费。因此,亟需一种高效的SQL执行引擎的适配方法。However, on the one hand, judging and selecting an execution engine based on manual experience relies heavily on the personal ability of technicians, and there is no guarantee that the selected SQL engine is the most suitable for the business scenario. On the other hand, it is inefficient to select the optimal engine by selecting different SQL engines for efficiency testing, and repeatedly running the same program on each SQL engine to test the operating efficiency will cause a waste of platform computing resources. Therefore, there is an urgent need for an efficient SQL execution engine adaptation method.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的PaaS平台中SQL执行引擎的适配方法及装置。In view of the above problems, the present invention is proposed to provide a method and device for adapting a SQL execution engine in a PaaS platform that overcomes the above problems or at least partially solves the above problems.
根据本发明的一个方面,提供了一种PaaS平台中SQL执行引擎的适配方法,包括:According to one aspect of the present invention, a method for adapting an SQL execution engine in a PaaS platform is provided, including:
接收用户输入的SQL语句;Receive the SQL statement entered by the user;
对SQL语句进行解析,得到SQL元数据信息;Analyze the SQL statement to obtain SQL metadata information;
将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据;Extract the key information in the SQL metadata information from the Hadoop platform to form table metadata;
将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果;Input the SQL metadata information and table metadata into the SQL selector for processing, and obtain the selection result of the SQL execution engine;
将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。Provide the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
可选地,方法进一步包括:Optionally, the method further includes:
对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标;Monitor the execution process of the SQL execution engine corresponding to the selection result of the SQL execution engine to obtain operating performance indicators;
将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。Store running performance indicators, SQL metadata information, and table metadata in the historical indicator library.
可选地,SQL选择器包含至少一个具有预测模型的决策单元;Optionally, the SQL selector comprises at least one decision unit with a predictive model;
则将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果具体包括:Then, the SQL metadata information and table metadata are input into the SQL selector for processing, and the selection results of the SQL execution engine are obtained, including:
将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果;Integrating SQL metadata information and table metadata into a decision request, providing the decision request to at least one decision-making unit, so that at least one decision-making unit can make a decision and output the decision result of the SQL execution engine;
按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。According to the way of voting, the SQL execution engine selection result is selected from at least one SQL execution engine decision result.
可选地,采用自学习的方式,根据历史指标库中的数据对SQL选择器的预测模型进行训练,或者根据历史指标库中的数据对SQL选择器所包含的决策单元的预测模型进行训练。Optionally, a self-learning method is used to train the predictive model of the SQL selector according to the data in the historical index database, or to train the predictive model of the decision-making unit included in the SQL selector according to the data in the historical index database.
可选地,SQL元数据信息包括以下信息中的至少一项:表、字段类型、字段长度、结果字段、排序信息、关联信息、算子类型、插入临时表次数;Optionally, the SQL metadata information includes at least one of the following information: table, field type, field length, result field, sorting information, association information, operator type, and the number of times inserted into the temporary table;
SQL元数据信息中的关键信息包括以下信息中的至少一项:SQL元数据信息中的表信息、SQL元数据信息中的字段信息、SQL元数据信息中的存储信息。。The key information in the SQL metadata information includes at least one of the following information: table information in the SQL metadata information, field information in the SQL metadata information, and storage information in the SQL metadata information. .
根据本发明的另一方面,提供了一种PaaS平台中SQL执行引擎的适配装置,包括:According to another aspect of the present invention, an adaptation device for an SQL execution engine in a PaaS platform is provided, including:
SQL接收器,用于接收用户输入的SQL语句;The SQL receiver is used to receive the SQL statement input by the user;
SQL解析器,用于对SQL语句进行解析,得到SQL元数据信息;The SQL parser is used to parse the SQL statement to obtain SQL metadata information;
表元数据获取器,用于将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据;The table metadata acquirer is used to extract the key information in the SQL metadata information from the Hadoop platform to form table metadata;
SQL选择器,接收SQL元数据信息和表元数据并进行处理,输出SQL执行引擎选择结果;SQL selector, which receives and processes SQL metadata information and table metadata, and outputs the selection result of SQL execution engine;
SQL执行器,将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。The SQL executor provides the SQL statement to the SQL execution engine corresponding to the selection result of the SQL execution engine for execution.
可选地,装置进一步包括:Optionally, the device further includes:
检测模块,用于对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标;The detection module is used to monitor the execution process of the SQL execution engine corresponding to the SQL execution engine selection result, and obtain the operation performance index;
存储模块,用于将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。The storage module is used to store running performance indicators, SQL metadata information, and table metadata in the historical indicator library.
可选地,SQL选择器包含至少一个具有预测模型的决策单元、数据接收单元、决策输出器;Optionally, the SQL selector includes at least one decision-making unit with a predictive model, a data receiving unit, and a decision-making output device;
数据接收单元,用于接收SQL元数据和表元数据,将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果;The data receiving unit is used to receive SQL metadata and table metadata, integrate SQL metadata information and table metadata into a decision request, and provide the decision request to at least one decision unit for at least one decision unit to make a decision and output SQL Execution engine decision results;
决策输出器,用于按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。The decision output device is configured to select a SQL execution engine selection result from at least one SQL execution engine decision result in a voting manner.
可选地,装置进一步包括:Optionally, the device further includes:
自学习模块,用于采用自学习的方式,根据历史指标库中的数据对SQL选择器的预测模型进行训练,或者根据历史指标库中的数据对SQL选择器所包含的决策单元的预测模型进行训练。The self-learning module is used to train the predictive model of the SQL selector according to the data in the historical indicator database by self-learning, or to train the predictive model of the decision-making unit contained in the SQL selector according to the data in the historical indicator database train.
可选地,SQL元数据信息包括以下信息中的至少一项:表、字段类型、字段长度、结果字段、排序信息、关联信息、算子类型、插入临时表次数;Optionally, the SQL metadata information includes at least one of the following information: table, field type, field length, result field, sorting information, association information, operator type, and the number of times inserted into the temporary table;
SQL元数据信息中的关键信息包括以下信息中的至少一项:SQL元数据信息中的表信息、SQL元数据信息中的字段信息、SQL元数据信息中的存储信息。。The key information in the SQL metadata information includes at least one of the following information: table information in the SQL metadata information, field information in the SQL metadata information, and storage information in the SQL metadata information. .
根据本发明的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;According to yet another aspect of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete mutual communication through the communication bus communication;
所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行上述PaaS平台中SQL执行引擎的适配方法对应的操作。The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the adaptation method of the SQL execution engine in the PaaS platform.
根据本发明的再一方面,提供了一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述PaaS平台中SQL执行引擎的适配方法对应的操作。According to another aspect of the present invention, a computer storage medium is provided, and at least one executable instruction is stored in the storage medium, and the executable instruction causes the processor to execute the adaptation method of the SQL execution engine in the PaaS platform as described above. corresponding operation.
根据本发明的PaaS平台中SQL执行引擎的适配方法及装置,该方法包括:接收用户输入的SQL语句;对SQL语句进行解析,得到SQL元数据信息;将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据;将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果;将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。通过上述方式,本发明实现了SQL执行引擎的自动适配,用户使用SQL访问PaaS平台数据时,根据用户提交的SQL自动识别并适配最优的SQL引擎,避免人为经验的不确定性,能够保证在PaaS平台中使用最合适的SQL执行引擎执行相应的SQL语句。According to the adaptation method and device of the SQL execution engine in the PaaS platform of the present invention, the method includes: receiving the SQL statement input by the user; parsing the SQL statement to obtain SQL metadata information; converting the key information in the SQL metadata information from Extracted by the Hadoop platform to form table metadata; input the SQL metadata information and table metadata into the SQL selector for processing, and obtain the selection result of the SQL execution engine; provide the SQL statement to the SQL execution engine corresponding to the selection result of the SQL execution engine to execute. Through the above method, the present invention realizes the automatic adaptation of the SQL execution engine. When the user uses SQL to access the PaaS platform data, the optimal SQL engine is automatically identified and adapted according to the SQL submitted by the user, avoiding the uncertainty of human experience, and being able to Ensure that the most appropriate SQL execution engine is used to execute the corresponding SQL statement in the PaaS platform.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1示出了本发明实施例提供的PaaS平台中SQL执行引擎的适配方法的流程图;Fig. 1 shows the flowchart of the adaptation method of the SQL execution engine in the PaaS platform provided by the embodiment of the present invention;
图2示出了本发明另一实施例提供的PaaS平台中SQL执行引擎的适配方法的流程图;FIG. 2 shows a flowchart of a method for adapting an SQL execution engine in a PaaS platform provided by another embodiment of the present invention;
图3示出了本发明实施例提供的PaaS平台中SQL执行引擎的适配装置的结构示意图;FIG. 3 shows a schematic structural diagram of an adaptation device for an SQL execution engine in a PaaS platform provided by an embodiment of the present invention;
图4示出了本发明实施例中SQL选择器中的流程示意图;Fig. 4 shows the schematic flow diagram in the SQL selector in the embodiment of the present invention;
图5示出了本发明实施例中PaaS平台中SQL执行引擎的适配装置的结构示意图;FIG. 5 shows a schematic structural diagram of an adaptation device for an SQL execution engine in a PaaS platform in an embodiment of the present invention;
图6示出了本发明实施例提供的计算设备的结构示意图。Fig. 6 shows a schematic structural diagram of a computing device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
图1示出了本发明实施例提供的PaaS平台中SQL执行引擎的适配方法的流程图,本实施例中PaaS平台基于Hadoop平台实现,如图1所示,该方法包括以下步骤:Fig. 1 shows the flowchart of the adaptation method of the SQL execution engine in the PaaS platform provided by the embodiment of the present invention, in the present embodiment, the PaaS platform is implemented based on the Hadoop platform, as shown in Fig. 1, the method includes the following steps:
步骤S101,接收用户输入的SQL语句。Step S101, receiving an SQL statement input by a user.
平台用户使用SQL访问PaaS平台数据时,需要提交SQL语句。实际应用中,平台用户可以包括程序开发任务、业务分析人员、数据建模人员等等。When platform users use SQL to access PaaS platform data, they need to submit SQL statements. In practical applications, platform users may include program development tasks, business analysts, data modelers, and so on.
步骤S102,对SQL语句进行解析,得到SQL元数据信息。Step S102, analyzing the SQL statement to obtain SQL metadata information.
接收到用户输入的SQL语句之后,对SQL语句进行解析,解析出SQL元数据。After receiving the SQL statement input by the user, the SQL statement is parsed, and the SQL metadata is parsed out.
步骤S103,将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据。Step S103, extract key information in the SQL metadata information from the Hadoop platform to form table metadata.
然后,将SQL元数据信息匹配Hadoop平台的各个表元数据,提取出SQL元数据信息中的关键信息,构成Hadoop表元数据。Then, the SQL metadata information is matched with each table metadata of the Hadoop platform, and the key information in the SQL metadata information is extracted to form the Hadoop table metadata.
步骤S104,将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果。In step S104, the SQL metadata information and the table metadata are input into the SQL selector for processing, and the selection result of the SQL execution engine is obtained.
将SQL元数据信息和表元数据输入至SQL选择器中,SQL选择器根据这些数据进行选择判断,选择一个最适合处理SQL语句的SQL执行引擎,得到SQL执行引擎选择结果。Input the SQL metadata information and table metadata into the SQL selector, and the SQL selector makes a selection judgment based on these data, selects a SQL execution engine that is most suitable for processing SQL statements, and obtains the selection result of the SQL execution engine.
例如,SQL选择器是一个预测模型,通过预测模型对SQL元数据信息和表元数据进行预测判断,输出SQL执行引擎选择结果。For example, the SQL selector is a predictive model, which predicts and judges SQL metadata information and table metadata through the predictive model, and outputs the selection result of the SQL execution engine.
步骤S105,将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。Step S105, providing the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
最终,将SQL语句提供给选择出来的最合适的SQL执行引擎进行执行。Finally, the SQL statement is provided to the selected most appropriate SQL execution engine for execution.
根据本发明实施例所提供的PaaS平台中SQL执行引擎的适配方法,通过对用户输入的SQL语句进行解析,提取出相应的SQL元数据以及Hadoop表元数据,根据这些数据做选择,选择出最适合的SQL执行引擎。该方式提供了一种自动适配SQL执行引擎的方法,在用户使用SQL访问PaaS平台数据时,根据用户提交的SQL自动识别并适配最优的SQL引擎,避免人工经验的不确定性,能够保证在PaaS平台中使用最合适的SQL执行引擎执行相应的SQL语句,进而能够避免运行效率不稳定或者运行失败的问题,降低业务运维难度,也能够避免计算资源的浪费。According to the adaptation method of the SQL execution engine in the PaaS platform provided by the embodiment of the present invention, by analyzing the SQL statement input by the user, the corresponding SQL metadata and Hadoop table metadata are extracted, and the selection is made according to these data, and the The most suitable SQL execution engine. This method provides a method of automatically adapting the SQL execution engine. When the user uses SQL to access the PaaS platform data, the optimal SQL engine is automatically identified and adapted according to the SQL submitted by the user, avoiding the uncertainty of manual experience. Ensure that the most appropriate SQL execution engine is used in the PaaS platform to execute the corresponding SQL statement, thereby avoiding the problem of unstable operation efficiency or operation failure, reducing the difficulty of business operation and maintenance, and avoiding the waste of computing resources.
图2示出了本发明另一实施例提供的PaaS平台中SQL执行引擎的适配方法的流程图,本实施例中PaaS平台基于Hadoop平台实现,如图2所示,该方法包括以下步骤:Fig. 2 shows the flowchart of the adaptation method of the SQL execution engine in the PaaS platform provided by another embodiment of the present invention, in the present embodiment, the PaaS platform is implemented based on the Hadoop platform, as shown in Fig. 2, the method includes the following steps:
步骤S201,接收用户输入的SQL语句。Step S201, receiving an SQL statement input by a user.
平台用户使用SQL访问PaaS平台数据时,需要提交SQL语句。实际应用中,平台用户可以包括程序开发任务、业务分析人员、数据建模人员等等。When platform users use SQL to access PaaS platform data, they need to submit SQL statements. In practical applications, platform users may include program development tasks, business analysts, data modelers, and so on.
步骤S202,对SQL语句进行解析,得到SQL元数据信息。Step S202, analyzing the SQL statement to obtain SQL metadata information.
对SQL语句进行解析,解析出SQL元数据信息,可选地,SQL元数据信息包括以下信息中的至少一项:表、字段类型、字段长度、结果字段、排序信息、关联信息、算子类型、插入临时表次数。Parse the SQL statement, and parse out the SQL metadata information. Optionally, the SQL metadata information includes at least one of the following information: table, field type, field length, result field, sorting information, association information, operator type , Insert the number of temporary tables.
SQL语句解析需要获取的详细元数据信息列表举例如下,其中,表一为输入SQL的输入表元数据信息举例。表二为输入SQL的关联元数据信息举例。表三为输入SQL的关键算子元数据信息举例。An example of the detailed metadata information list that needs to be obtained for SQL statement parsing is as follows, where Table 1 is an example of the metadata information of the input table entered into SQL. Table 2 is an example of associated metadata information entered into SQL. Table 3 is an example of key operator metadata information entered into SQL.
表一Table I
表二Table II
表三Table three
步骤S203,将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据。In step S203, the key information in the SQL metadata information is extracted from the Hadoop platform to form table metadata.
将SQL元数据信息匹配Hadoop平台的各个表元数据,提取出SQL元数据信息中的关键信息,构成Hadoop表元数据。The SQL metadata information is matched with each table metadata of the Hadoop platform, and the key information in the SQL metadata information is extracted to form the Hadoop table metadata.
可选地,SQL元数据信息中的关键信息包括以下信息中的至少一项:SQL元数据信息中的表信息、SQL元数据信息中的字段信息、SQL元数据信息中的存储信息。构成的表元数据包括以下中的至少一项:表的大小、存储格式、字段类型、长度。Optionally, the key information in the SQL metadata information includes at least one of the following information: table information in the SQL metadata information, field information in the SQL metadata information, and storage information in the SQL metadata information. The formed table metadata includes at least one of the following: table size, storage format, field type, and length.
表四为输入SQL的输入表在hadoop平台中的字段元数据信息举例,表五为输入SQL的输入表在hadoop平台中的存储元数据信息举例。Table 4 is an example of the field metadata information in the hadoop platform of the input table for inputting SQL, and Table 5 is an example of the storage metadata information of the input table for inputting SQL in the hadoop platform.
表四Table four
表五Table five
步骤S204,将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果。Step S204, integrating SQL metadata information and table metadata into a decision request, and providing the decision request to at least one decision unit, so that at least one decision unit can make a decision and output a decision result of the SQL execution engine.
本发明实施例中,SQL选择器包含至少一个具有预测模型的决策单元,决策单元的总数量为奇数,并且各个决策单元之间相互独立。将SQL元数据信息和表元数据整合为决策请求,并将决策请求提供给各个决策单元,各个决策单元通过自身的预测模型对接收到的决策请求进行决策判断,各个决策单元都会输出一个SQL执行引擎决策请求。In the embodiment of the present invention, the SQL selector includes at least one decision-making unit with a predictive model, the total number of decision-making units is an odd number, and each decision-making unit is independent of each other. Integrate SQL metadata information and table metadata into decision-making requests, and provide decision-making requests to each decision-making unit. Each decision-making unit makes a decision and judgment on the received decision-making request through its own prediction model, and each decision-making unit will output a SQL execution Engine decision request.
其中,各个决策单元通过自学习的方式,根据历史指标库中的数据进行预测模型的训练。历史指标库中包括历史运行的SQL元数据信息、历史表元数据、历史SQL运行性能指标。具体地,通过独立的学习模型按照预设周期训练决策单元的预测模型。Among them, each decision-making unit conducts the training of the prediction model according to the data in the historical index library through self-learning. The historical indicator library includes historical running SQL metadata information, historical table metadata, and historical SQL running performance indicators. Specifically, the prediction model of the decision-making unit is trained according to a preset period through an independent learning model.
步骤S205,按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。Step S205, selecting a SQL execution engine selection result from at least one SQL execution engine decision result in a voting manner.
然后,再按照投票选举的方式,从各个决策单元输出的SQL执行引擎决策结果中选出最终的结果,也即SQL执行引擎选择结果,该SQL执行引擎选择结果也就是根据SQL元数据和Hadoop表元数据选择出来的最适合运行SQL语句的执行引擎。Then, according to the voting method, select the final result from the SQL execution engine decision results output by each decision-making unit, that is, the SQL execution engine selection result. The SQL execution engine selection result is based on the SQL metadata and Hadoop table The most suitable execution engine for running SQL statements is selected by the metadata.
步骤S206,将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。Step S206, providing the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
将SQL语句提供给选择出来的最合适的SQL执行进行执行。Provide the SQL statement to the selected most appropriate SQL execution for execution.
步骤S207,对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标。Step S207, monitor the execution process of the SQL execution engine corresponding to the SQL execution engine selection result, and obtain the operation performance index.
对SQL语句在选择出来的最优的SQL执行引擎上运行过程进行监测,得到运行的性能表现指标,运行性能指标具体包括运行时长、消耗CPU、消耗内存等等。Monitor the running process of SQL statements on the selected optimal SQL execution engine to obtain running performance indicators, which specifically include running time, CPU consumption, memory consumption, etc.
步骤S208,将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。Step S208, storing the operation performance index, SQL metadata information, and table metadata in the historical index database.
将运行性能指标、SQL元数据信息以及表元数据,合并一起记录在历史指标库中。根据上述内容,历史指标库中的数据可用于决策单元的预测模型的训练。Merge and record running performance indicators, SQL metadata information, and table metadata in the historical indicator library. According to the above content, the data in the historical indicator library can be used for training the prediction model of the decision-making unit.
表六为SQL执行引擎上运行的性能表现指标举例。Table 6 is an example of performance indicators running on the SQL execution engine.
表六Table six
根据本发明实施例提供的PaaS平台中SQL执行引擎的适配方法,通过对用户输入的SQL语句进行解析,提取出相应的SQL元数据以及Hadoop表元数据,通过多个决策单元对这些数据做决策,并根据SQL决策结果选择出最适合的SQL执行引擎。该方式提供了一种自动适配SQL执行引擎的方法,在用户使用SQL访问PaaS平台数据时,根据用户提交的SQL自动识别并适配最优的SQL引擎,避免人工经验的不确定性,能够保证在PaaS平台中使用最合适的SQL执行引擎执行相应的SQL语句,进而能够避免运行效率不稳定或者运行失败的问题,降低业务运维难度,也能够避免平台计算资源的浪费。同时,决策单元具有自学习自优化的能力,根据历史指标库中的数据进行自优化,从而能够提升选择的精确性,避免认为模型调优工作量。According to the adaptation method of the SQL execution engine in the PaaS platform provided by the embodiment of the present invention, by analyzing the SQL statement input by the user, the corresponding SQL metadata and Hadoop table metadata are extracted, and these data are processed by multiple decision-making units. Make a decision, and select the most suitable SQL execution engine based on the SQL decision result. This method provides a method of automatically adapting the SQL execution engine. When the user uses SQL to access the data of the PaaS platform, the optimal SQL engine is automatically identified and adapted according to the SQL submitted by the user, avoiding the uncertainty of manual experience. Ensure that the most appropriate SQL execution engine is used to execute the corresponding SQL statements in the PaaS platform, thereby avoiding the problem of unstable operation efficiency or failure, reducing the difficulty of business operation and maintenance, and avoiding the waste of platform computing resources. At the same time, the decision-making unit has the ability of self-learning and self-optimization, and performs self-optimization according to the data in the historical index database, so as to improve the accuracy of selection and avoid the workload of model tuning.
图3示出了本发明实施例提供的PaaS平台中SQL执行引擎的适配装置的结构示意图,如图3所示,该装置包括:FIG. 3 shows a schematic structural diagram of an adaptation device for an SQL execution engine in a PaaS platform provided by an embodiment of the present invention. As shown in FIG. 3 , the device includes:
SQL接收器31,用于接收用户输入的SQL语句;SQL receiver 31, for receiving the SQL statement input by the user;
SQL解析器32,用于对SQL语句进行解析,得到SQL元数据信息。The SQL parser 32 is configured to parse the SQL statement to obtain SQL metadata information.
该装置首先接收用户提交的SQL语句,提交给SQL解析器解析SQL。解析SQL过程是从用户提交的SQL语句中提取出需要的元数据信息,包含需要查询的表、字段、关联类型、关联字段、排序类型、排序字段、插入临时表次数等,作为表元数据获取器和SQL选择器的输入数据。The device first receives the SQL statement submitted by the user, and submits it to the SQL parser for parsing the SQL. The process of parsing SQL is to extract the required metadata information from the SQL statement submitted by the user, including the table, field, associated type, associated field, sorting type, sorting field, number of times inserted into the temporary table, etc. to be queried, and obtained as table metadata Input data for selectors and SQL selectors.
表元数据获取器33,用于将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据。The table metadata acquirer 33 is configured to extract key information in the SQL metadata information from the Hadoop platform to form table metadata.
表元数据获取器接收SQL将SQL元数据信息中的关键信息从Hadoop平台中提取出来,构成表元数据,作为SQL选择器的输入数据。The table metadata acquirer receives SQL and extracts the key information in the SQL metadata information from the Hadoop platform to form table metadata, which is used as the input data of the SQL selector.
SQL选择器34,用于接收SQL元数据信息和表元数据并进行处理,输出SQL执行引擎选择结果。The SQL selector 34 is configured to receive and process SQL metadata information and table metadata, and output a SQL execution engine selection result.
将SQL解析器解析出的元数据、表元数据获取器获取的表元数据作为输入数据,提交给SQL引擎选择器选出最优SQL引擎。The metadata parsed by the SQL parser and the table metadata acquired by the table metadata acquirer are used as input data and submitted to the SQL engine selector to select the optimal SQL engine.
SQL执行器35,将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。The SQL executor 35 provides the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
在一种可选的方式中,SQL选择器34包含决策器、数据接收单元、决策输出器;决策器包含至少一个具有预测模型的决策单元In an optional manner, the SQL selector 34 includes a decision maker, a data receiving unit, and a decision outputter; the decision maker includes at least one decision unit with a predictive model
数据接收单元,用于接收SQL元数据和表元数据,将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果。The data receiving unit is used to receive SQL metadata and table metadata, integrate SQL metadata information and table metadata into a decision request, and provide the decision request to at least one decision unit for at least one decision unit to make a decision and output SQL Execution engine decision result.
决策输出器,用于按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。The decision output device is configured to select a SQL execution engine selection result from at least one SQL execution engine decision result in a voting manner.
数据接收单元负责接收提交的SQL元数据和hadoop平台的表元数据,并将这两个数据整合为一个完整的决策请求提交给决策器。决策器由一组奇数个独立的决策单元组成,分别对数据接收单元提交的决策请求进行决策判断,并输出最优SQL执行引擎给决策输出器。决策输出器在接收到各个决策单元的输出结果后,按照投票选举的方式,选出最终的结果,即最优SQL执行引擎。The data receiving unit is responsible for receiving the submitted SQL metadata and table metadata of the hadoop platform, and integrating these two data into a complete decision request and submitting it to the decision maker. The decision maker is composed of a group of odd number of independent decision-making units, which respectively make decisions and judgments on the decision requests submitted by the data receiving unit, and output the optimal SQL execution engine to the decision output unit. After receiving the output results of each decision-making unit, the decision-making output device selects the final result by voting, that is, the optimal SQL execution engine.
图4示出了本发明实施例中SQL选择器中的流程示意图,如图4所示,先接收SQL元数据和Hadoop表元数据,然后将接收到的SQL元数据和Hadoop表元数据整合为决策请求发送给决策单元1、决策单元2、决策单元3、决策单元4……,各个决策单元的输出结果被提供给决策输出器,决策输出器输出最终选择的最优的SQL执行引擎选择结果。Fig. 4 shows the schematic flow chart in the SQL selector in the embodiment of the present invention, as shown in Fig. 4, first receive SQL metadata and Hadoop table metadata, then the SQL metadata that receives and Hadoop table metadata are integrated into The decision-making request is sent to decision-making unit 1, decision-making unit 2, decision-making unit 3, decision-making unit 4..., the output results of each decision-making unit are provided to the decision output device, and the decision output device outputs the final selection result of the optimal SQL execution engine .
在一种可选的方式中,上述装置还包括:检测模块,用于对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标;存储模块,用于将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。In an optional manner, the above-mentioned device also includes: a detection module, configured to monitor the execution process of the SQL execution engine corresponding to the SQL execution engine selection result, to obtain an operating performance index; a storage module, configured to store the operating performance index , SQL metadata information, and table metadata are stored in the historical indicator database.
图5示出了本发明实施例中PaaS平台中SQL执行引擎的适配装置的结构示意图,如图5所示,该装置包括:SQL接收器、SQL解析器、Hadoop表元数据获取器、SQL执行引擎选择器、SQL提交执行器、SQL选择自学习器、历史SQL运行指标库。Fig. 5 shows a schematic structural diagram of an adaptation device of an SQL execution engine in a PaaS platform in an embodiment of the present invention. As shown in Fig. 5, the device includes: a SQL receiver, a SQL parser, a Hadoop table metadata acquirer, a SQL Execution engine selector, SQL submission executor, SQL selection self-learning device, historical SQL operation indicator library.
其中,SQL接收器接收用户提交的SQL语句,提交给SQL解析器解析SQL,提取出SQL元数据信息,作为Hadoop表元数据获取器和SQL执行引擎选择器的输入数据。Hadoop表元数据获取器将SQL元数据信息匹配Hadoop平台中各个表元数据,获得SQL元数据中的关键信息构成Hadoop表元数据,也作为SQL执行引擎选择器的输入数据。Among them, the SQL receiver receives the SQL statement submitted by the user, submits it to the SQL parser to parse the SQL, and extracts the SQL metadata information as the input data of the Hadoop table metadata acquirer and the SQL execution engine selector. The Hadoop table metadata acquirer matches the SQL metadata information with each table metadata in the Hadoop platform, and obtains the key information in the SQL metadata to form the Hadoop table metadata, which is also used as the input data of the SQL execution engine selector.
然后,将SQL解析器解析出的元数据、hadoop平台表元数据获取器获取的表元数据作为输入数据,提交给SQL执行引擎选择器选出最优SQL引擎。SQL执行引擎选择器又包括数据接收单元、决策器、决策输出器。具体实现过程如下:Then, the metadata parsed by the SQL parser and the table metadata acquired by the Hadoop platform table metadata acquirer are used as input data, and submitted to the SQL execution engine selector to select the optimal SQL engine. The SQL execution engine selector further includes a data receiving unit, a decision maker, and a decision outputter. The specific implementation process is as follows:
数据接收单元负责接收提交的SQL元数据和hadoop平台的表元数据,并将这两个数据整合为一个完整的决策请求提交给决策器。The data receiving unit is responsible for receiving the submitted SQL metadata and table metadata of the hadoop platform, and integrating these two data into a complete decision request and submitting it to the decision maker.
决策器由一组奇数个独立的决策单元组成,分别对数据接收单元提交的决策请求进行决策判断,并输出最优SQL执行引擎决策结果给决策输出器。The decision maker is composed of a group of odd number of independent decision-making units, which respectively make decision-making judgments on the decision-making requests submitted by the data receiving unit, and output the decision-making results of the optimal SQL execution engine to the decision-making output unit.
决策输出器在接收到各个决策单元的输出结果后,按照投票选举的方式,选出最终的结果,即最优SQL执行引擎。After receiving the output results of each decision-making unit, the decision-making output device selects the final result by voting, that is, the optimal SQL execution engine.
其中,SQL引擎选择自学习器为SQL执行引擎选择器中的各个决策单元提供决策支撑,是决策单元的大脑。每个决策单元独立的一套算法模型,每天进行自动学习,不断积累和提升决策准确度。Among them, the SQL engine selection self-learner provides decision-making support for each decision-making unit in the SQL execution engine selector, and is the brain of the decision-making unit. Each decision-making unit has an independent set of algorithm models, which automatically learn every day to continuously accumulate and improve decision-making accuracy.
决策单元自学习具体指的是从历史SQL运行指标库中获取各个历史运行的SQL元数据、表元数据、历史SQL运行性能指标,通过独立的学习模型每天进行决策计算训练。Decision-making unit self-learning specifically refers to obtaining the SQL metadata, table metadata, and historical SQL operation performance indicators of each historical operation from the historical SQL operation index database, and performing daily decision-making calculation training through an independent learning model.
最终,SQL提交执行器将SQL语句提交给选择出来的SQL执行引擎,如hive、spark、flink、impala等等。Finally, the SQL submission executor submits the SQL statement to the selected SQL execution engine, such as hive, spark, flink, impala, and so on.
本发明实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的PaaS平台中SQL执行引擎的适配方法。An embodiment of the present invention provides a non-volatile computer storage medium, the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the SQL execution engine in the PaaS platform in any of the above method embodiments adaptation method.
可执行指令具体可以用于使得处理器执行以下操作:Specifically, the executable instruction can be used to make the processor perform the following operations:
接收用户输入的SQL语句;Receive the SQL statement entered by the user;
对SQL语句进行解析,得到SQL元数据信息;Analyze the SQL statement to obtain SQL metadata information;
将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据;Extract the key information in the SQL metadata information from the Hadoop platform to form table metadata;
将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果;Input the SQL metadata information and table metadata into the SQL selector for processing, and obtain the selection result of the SQL execution engine;
将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。Provide the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
在一种可选的方式中,所述可执行指令使所述处理器执行以下操作:In an optional manner, the executable instructions cause the processor to perform the following operations:
对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标;Monitor the execution process of the SQL execution engine corresponding to the selection result of the SQL execution engine to obtain operating performance indicators;
将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。Store running performance indicators, SQL metadata information, and table metadata in the historical indicator library.
在一种可选的方式中,SQL选择器包含至少一个具有预测模型的决策单元,所述可执行指令使所述处理器执行以下操作:In an optional manner, the SQL selector includes at least one decision-making unit with a predictive model, and the executable instructions cause the processor to perform the following operations:
将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果;Integrating SQL metadata information and table metadata into a decision request, providing the decision request to at least one decision-making unit, so that at least one decision-making unit can make a decision and output the decision result of the SQL execution engine;
按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。According to the way of voting, the SQL execution engine selection result is selected from at least one SQL execution engine decision result.
在一种可选的方式中,所述可执行指令使所述处理器执行以下操作:In an optional manner, the executable instructions cause the processor to perform the following operations:
采用自学习的方式,根据历史指标库中的数据对SQL选择器的预测模型进行训练,或者根据历史指标数据库中的数据对SQL选择器所包含的决策单元的预测模型进行训练。In the way of self-learning, the prediction model of the SQL selector is trained according to the data in the historical index database, or the prediction model of the decision-making unit contained in the SQL selector is trained according to the data in the historical index database.
在一种可选的方式中,SQL元数据信息包括以下信息中的至少一项:表、字段类型、字段长度、结果字段、排序信息、关联信息、算子类型、插入临时表次数;In an optional manner, the SQL metadata information includes at least one of the following information: table, field type, field length, result field, sorting information, association information, operator type, and the number of times inserted into the temporary table;
SQL元数据信息中的关键信息包括以下信息中的至少一项:SQL元数据信息中的表信息、SQL元数据信息中的字段信息、SQL元数据信息中的存储信息。The key information in the SQL metadata information includes at least one of the following information: table information in the SQL metadata information, field information in the SQL metadata information, and storage information in the SQL metadata information.
图6示出了本发明计算设备实施例的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。FIG. 6 shows a schematic structural diagram of an embodiment of a computing device according to the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
如图6所示,该计算设备可以包括:处理器(processor)602、通信接口(Communications Interface)604、存储器(memory)606、以及通信总线608。As shown in FIG. 6 , the computing device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
其中:处理器602、通信接口604、以及存储器606通过通信总线608完成相互间的通信。通信接口604,用于与其它设备比如客户端或其它服务器等的网元通信。处理器602,用于执行程序610,具体可以执行上述用于计算设备的PaaS平台中SQL执行引擎的适配方法实施例中的相关步骤。Wherein: the processor 602 , the communication interface 604 , and the memory 606 communicate with each other through the communication bus 608 . The communication interface 604 is used to communicate with network elements of other devices such as clients or other servers. The processor 602 is configured to execute the program 610, specifically, may execute the relevant steps in the embodiment of the method for adapting the SQL execution engine in the PaaS platform of the computing device.
具体地,程序610可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 610 may include program codes including computer operation instructions.
处理器602可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 602 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be of the same type, such as one or more CPUs, or may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器606,用于存放程序610。存储器606可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 606 is used for storing the program 610 . The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
程序610具体可以用于使得处理器602执行以下操作:The program 610 can specifically be used to make the processor 602 perform the following operations:
接收用户输入的SQL语句;Receive the SQL statement entered by the user;
对SQL语句进行解析,得到SQL元数据信息;Analyze the SQL statement to obtain SQL metadata information;
将SQL元数据信息中的关键信息从Hadoop平台提取出来,构成表元数据;Extract the key information in the SQL metadata information from the Hadoop platform to form table metadata;
将SQL元数据信息和表元数据输入至SQL选择器中进行处理,得到SQL执行引擎选择结果;Input the SQL metadata information and table metadata into the SQL selector for processing, and obtain the selection result of the SQL execution engine;
将SQL语句提供给SQL执行引擎选择结果对应的SQL执行引擎进行执行。Provide the SQL statement to the SQL execution engine corresponding to the SQL execution engine selection result for execution.
在一种可选的方式中,所述程序610使所述处理器602执行以下操作:In an optional manner, the program 610 enables the processor 602 to perform the following operations:
对SQL执行引擎选择结果对应的SQL执行引擎的执行过程进行监测,得到运行性能指标;Monitor the execution process of the SQL execution engine corresponding to the selection result of the SQL execution engine to obtain operating performance indicators;
将运行性能指标、SQL元数据信息、表元数据存入历史指标库中。Store running performance indicators, SQL metadata information, and table metadata in the historical indicator library.
在一种可选的方式中,SQL选择器包含至少一个具有预测模型的决策单元;所述程序610使所述处理器602执行以下操作:In an optional manner, the SQL selector includes at least one decision-making unit with a predictive model; the program 610 enables the processor 602 to perform the following operations:
将SQL元数据信息和表元数据整合为决策请求,将决策请求提供给至少一个决策单元,以供至少一个决策单元进行决策并输出SQL执行引擎决策结果;Integrating SQL metadata information and table metadata into a decision request, providing the decision request to at least one decision-making unit, so that at least one decision-making unit can make a decision and output the decision result of the SQL execution engine;
按照投票的方式,从至少一个SQL执行引擎决策结果中选择出SQL执行引擎选择结果。According to the way of voting, the SQL execution engine selection result is selected from at least one SQL execution engine decision result.
在一种可选的方式中,所述程序610使所述处理器602执行以下操作:采用自学习的方式,根据历史指标库中的数据对SQL选择器的预测模型进行训练,或者根据历史指标数据库中的数据对SQL选择器所包含的决策单元的预测模型进行训练。In an optional manner, the program 610 enables the processor 602 to perform the following operations: use self-learning to train the predictive model of the SQL selector according to the data in the historical index library, or use the historical index The data in the database trains the predictive model of the decision-making unit contained in the SQL selector.
在一种可选的方式中,SQL元数据信息包括以下信息中的至少一项:表、字段类型、字段长度、结果字段、排序信息、关联信息、算子类型、插入临时表次数;In an optional manner, the SQL metadata information includes at least one of the following information: table, field type, field length, result field, sorting information, association information, operator type, and the number of times inserted into the temporary table;
SQL元数据信息中的关键信息包括以下信息中的至少一项:SQL元数据信息中的表信息、SQL元数据信息中的字段信息、SQL元数据信息中的存储信息。The key information in the SQL metadata information includes at least one of the following information: table information in the SQL metadata information, field information in the SQL metadata information, and storage information in the SQL metadata information.
在此提供的算法或显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明实施例也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, embodiments of the present invention are not directed to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本发明并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明实施例的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline the present disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the embodiments of the invention are sometimes grouped together into a single implementation examples, figures, or descriptions thereof. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some embodiments herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。上述实施例中的步骤,除有特殊说明外,不应理解为对执行顺序的限定。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the execution order.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911413753.4A CN113127509B (en) | 2019-12-31 | 2019-12-31 | Adaptation method and device for SQL execution engine in PaaS platform |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911413753.4A CN113127509B (en) | 2019-12-31 | 2019-12-31 | Adaptation method and device for SQL execution engine in PaaS platform |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113127509A CN113127509A (en) | 2021-07-16 |
| CN113127509B true CN113127509B (en) | 2023-08-15 |
Family
ID=76770385
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911413753.4A Active CN113127509B (en) | 2019-12-31 | 2019-12-31 | Adaptation method and device for SQL execution engine in PaaS platform |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113127509B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107818112A (en) * | 2016-09-13 | 2018-03-20 | 腾讯科技(深圳)有限公司 | A kind of big data analysis operating system and task submit method |
| CN108549683A (en) * | 2018-04-03 | 2018-09-18 | 联想(北京)有限公司 | data query method and system |
| CN109670653A (en) * | 2018-12-29 | 2019-04-23 | 北京航天数据股份有限公司 | A kind of method and device predicted based on industrial model predictive engine |
| CN110427992A (en) * | 2019-07-23 | 2019-11-08 | 杭州城市大数据运营有限公司 | Data matching method, device, computer equipment and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8239369B2 (en) * | 2008-03-20 | 2012-08-07 | DBSophic, Ltd. | Method and apparatus for enhancing performance of database and environment thereof |
| US10122783B2 (en) * | 2015-11-18 | 2018-11-06 | Microsoft Technology Licensing, Llc | Dynamic data-ingestion pipeline |
| US20180060341A1 (en) * | 2016-09-01 | 2018-03-01 | Paypal, Inc. | Querying Data Records Stored On A Distributed File System |
| CN108763573A (en) * | 2018-06-06 | 2018-11-06 | 众安信息技术服务有限公司 | A kind of OLAP engines method for routing and system based on machine learning |
| US12008456B2 (en) * | 2019-06-28 | 2024-06-11 | Intel Corporation | Methods, apparatus, systems and articles of manufacture for providing query selection systems |
-
2019
- 2019-12-31 CN CN201911413753.4A patent/CN113127509B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107818112A (en) * | 2016-09-13 | 2018-03-20 | 腾讯科技(深圳)有限公司 | A kind of big data analysis operating system and task submit method |
| CN108549683A (en) * | 2018-04-03 | 2018-09-18 | 联想(北京)有限公司 | data query method and system |
| CN109670653A (en) * | 2018-12-29 | 2019-04-23 | 北京航天数据股份有限公司 | A kind of method and device predicted based on industrial model predictive engine |
| CN110427992A (en) * | 2019-07-23 | 2019-11-08 | 杭州城市大数据运营有限公司 | Data matching method, device, computer equipment and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| Hadoop configuration tuning with ensemble modeling and metaheuristic optimization;Xingcheng Hua等;《IEEE Access》;第6卷;第44161-44174页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113127509A (en) | 2021-07-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11379755B2 (en) | Feature processing tradeoff management | |
| JP6634515B2 (en) | Question clustering processing method and apparatus in automatic question answering system | |
| US10102480B2 (en) | Machine learning service | |
| CN108121795A (en) | User's behavior prediction method and device | |
| WO2018166113A1 (en) | Random forest model training method, electronic apparatus and storage medium | |
| US11688393B2 (en) | Machine learning to propose actions in response to natural language questions | |
| JP2022041801A (en) | System and method for gaining advanced review understanding using area-specific knowledge base | |
| CN119378523B (en) | Text processing method, computing device, electronic device and storage medium | |
| CN114020774A (en) | Method, device and equipment for processing multiple rounds of question-answering sentences and storage medium | |
| CN110297820A (en) | A kind of data processing method, device, equipment and storage medium | |
| CN113377791A (en) | Data processing method, system and computing equipment | |
| CN120066803A (en) | Large model end-to-end distillation deployment method, device, equipment and medium for low-computation-force equipment | |
| CN119273443B (en) | Financial information query method and device based on artificial intelligence | |
| CN106372231A (en) | Search method and device | |
| US20240320500A1 (en) | Method and apparatus for generating training data | |
| CN118485054B (en) | Bulletin document generation method, device and equipment | |
| US10127075B2 (en) | Model driven optimization of annotator execution in question answering system | |
| CN113127509B (en) | Adaptation method and device for SQL execution engine in PaaS platform | |
| JP7187411B2 (en) | Coaching system and coaching method | |
| CN112966031A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
| CN110866393A (en) | Resume information extraction method and system based on domain knowledge base | |
| CN110008242A (en) | One kind being based on Spark streaming program generator and program data processing method | |
| KR101870658B1 (en) | System and method for distributed realtime processing of linguistic intelligence moduel | |
| CN113704286A (en) | Engine selection method and device and computing equipment | |
| CN119781800A (en) | Application maintenance method, device, equipment and medium based on artificial intelligence |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |