The invention relates to a TEE-based
big data hierarchical
encryption filtering mechanism and
query optimization method,
system, equipment and medium, and the method comprises the following steps: firstly, in the process of writing Parquet data into a disk, performing hierarchical
encryption processing on the data in the TEE through a user-defined Spark
data source interface, and generating a multi-level
metadata index; then, based on data hierarchical
encryption processing and the generated multi-level
metadata index,
data query is carried out, and in the query execution process, a Spark query engine firstly receives an
SQL query request of a user, and parses a
plaintext predicate in a query condition into a
ciphertext predicate; then, the query execution process enters a layered encryption filtering stage, and partition-level, file-level, row-group-level and column-level screening operations are executed in sequence, so that the
ciphertext decryption calculation amount in the TEE is reduced; the
system, the equipment and the medium realize the
big data hierarchical encryption filtering mechanism and the
query optimization based on the
big data hierarchical encryption filtering mechanism and the
query optimization method of the TEE; according to the method, the EPC memory pressure caused by full-disk decryption of a traditional TEE scheme is avoided, Parquet
data query can be efficiently executed under the condition of relatively low memory occupation, and finally, the balance of
privacy protection and query optimization is realized.