US 12,292,885 B2
Data processing method and data processing apparatus
Zilin Chen, Zhejiang (CN)
Assigned to Alibaba Cloud Computing Co. Ltd., Hangzhou (CN)
Filed by Alibaba Cloud Computing Co. Ltd., Zhejiang (CN)
Filed on Nov. 18, 2022, as Appl. No. 18/056,936.
Application 18/056,936 is a continuation of application No. PCT/CN2021/099343, filed on Jun. 10, 2021.
Claims priority of application No. 202010567428.X (CN), filed on Jun. 19, 2020.
Prior Publication US 2023/0082563 A1, Mar. 16, 2023
Int. Cl. G06F 16/2453 (2019.01); G06F 16/2455 (2019.01); G06F 16/25 (2019.01); G06F 16/28 (2019.01)
CPC G06F 16/24537 (2019.01) [G06F 16/24545 (2019.01); G06F 16/24568 (2019.01); G06F 16/254 (2019.01); G06F 16/284 (2019.01)] 16 Claims
OG exemplary drawing
 
1. A data processing method, comprising:
receiving a data processing request carrying a query statement;
converting the query statement into a corresponding relational algebra tree based on the data processing request by parsing the query statement into a corresponding abstract syntax tree;
and converting the abstract syntax tree into the corresponding relational algebra tree, wherein the relational algebra tree includes tree nodes and edges;
determining an operation type corresponding to the query statement based on the relational algebra tree by:
determining structural information of the query statement and logical information of the query statement based on the relational algebra tree;
in response to the structural information of the query statement not satisfying a first preset rule and the logical information of the query statement not satisfying a second preset rule, determining an execution plan of the query statement based on the relational algebra tree and calculating a physical execution cost of the query statement according to the execution plan; and
determining the operation type corresponding to the query statement being a first type in response to the physical execution cost being less than or equal to a preset cost threshold;
delivering the query statement to a first database in response to the operation type being the first type; and
completing the data processing request in the first database based on the query statement.