Fidelius-based sql data analysis method and system
Patent Information
- Application Number
- CN202311540313.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-11-17
AI Technical Summary
[0023] This invention provides a Fidelius-based SQL data analysis method that can parse user-input SQL data and establish computation graph code and operator code corresponding to Fidelius, facilitating the correct execution of SQL statements by Fidelius. It encapsulates SQL data analysis, allowing developers to seamlessly integrate privacy-preserving computation data analysis.
Smart Images

Figure CN117609721B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software technology, specifically to a Fidelius-based SQL data analysis method, system, terminal, and medium. Background Technology
[0002] In developing data analysis programs based on the privacy-preserving computing middleware Fidelius, developers need to implement data analysis logic using the Fidelius programming model. However, SQL is a more familiar data analysis tool for developers. How to facilitate data analysis of user-input SQL data using the privacy-preserving computing middleware Fidelius is a problem that needs to be solved. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a Fidelius-based SQL data analysis method, system, terminal, and medium. It can parse user-input SQL data and establish computational graph code and operator code corresponding to Fidelius, facilitating the correct execution of SQL statements by Fidelius.
[0004] In a first aspect, the present invention provides a Fidelius-based SQL data analysis method, comprising:
[0005] Obtain the database metadata description file input by the user, wherein the metadata description file includes database table information and information of each field of the database table;
[0006] Retrieves the SQL query statement input by the user and the specified database metadata description file;
[0007] ClickHouse is used to parse the SQL query statement to obtain the native abstract syntax tree, and the native abstract syntax tree is then simplified to obtain the simplified abstract syntax tree;
[0008] The database metadata description file is parsed to obtain the database data structure. The specific data information of the database is read and parsed, the read data information is stored in the data structure, and the database table and field information is mapped to the nodes of the simplified abstract syntax tree.
[0009] Generate Fidelius computation graph code from the simplified abstract syntax tree and determine whether Fidelius operator code needs to be generated.
[0010] If so, then Fidelius operator code is dynamically generated based on the simplified abstract syntax tree and the database;
[0011] If not, use the integrated Fidelius operator code;
[0012] Fidelius executes and parses SQL query statements based on the Fidelius computation graph code and Fidelius operator code to obtain query results.
[0013] Secondly, the present invention provides a Fidelius-based SQL data analysis system, comprising: a first acquisition module, a second acquisition module, a simplification module, a database parsing module, a Fidelius code generation module, and an SQL parsing module.
[0014] The first acquisition module is used to acquire a database metadata description file input by the user, the metadata description file including database table information and information of each field of the database table;
[0015] The second acquisition module is used to acquire the SQL query statement input by the user and the specified database metadata description file;
[0016] The simplification module is used to parse the SQL query statement using ClickHouse to obtain the native abstract syntax tree, and then simplifies the native abstract syntax tree to obtain a simplified abstract syntax tree;
[0017] The database parsing module is used to parse the database metadata description file to obtain the database data structure, read and parse the specific data information of the database, store the read data information into the data structure, and map the database table and field information to the nodes of the simplified abstract syntax tree.
[0018] The Fidelius code generation module generates Fidelius computation graph code based on the simplified abstract syntax tree and determines whether Fidelius operator code needs to be generated. If so, it dynamically generates Fidelius operator code based on the simplified abstract syntax tree and the database. If not, it uses the integrated Fidelius operator code.
[0019] The SQL parsing module Fidelius executes and parses SQL query statements based on the Fidelius computation graph code and Fidelius operator code to obtain query results.
[0020] Thirdly, an embodiment of the present invention provides a smart terminal, including a processor, an input device, an output device, and a memory. The processor is connected to the input device, the output device, and the memory, respectively. The memory is used to store a computer program, the computer program including program instructions, and the processor is configured to call the program instructions to execute the method described in the above embodiments.
[0021] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the methods described in the above embodiments.
[0022] The beneficial effects of this invention are:
[0023] This invention provides a Fidelius-based SQL data analysis method that can parse user-input SQL data and establish computation graph code and operator code corresponding to Fidelius, facilitating the correct execution of SQL statements by Fidelius. It encapsulates SQL data analysis, allowing developers to seamlessly integrate privacy-preserving computation data analysis.
[0024] This invention provides a Fidelius-based SQL data analysis system, a smart terminal, and a computer-readable storage medium, which are based on the same inventive concept and have the same beneficial effects as the aforementioned Fidelius-based SQL data analysis method. Attached Figure Description
[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0026] Figure 1 A flowchart of a Fidelius-based SQL data analysis method provided in the first embodiment of the present invention is shown;
[0027] Figure 2 A diagram of the native abstract syntax tree structure in the first embodiment of the present invention is shown;
[0028] Figure 3 A simplified abstract syntax tree structure diagram is shown in the first embodiment of the present invention;
[0029] Figure 4 The diagram shows a structural block diagram of a Fidelius-based SQL data analysis system provided in the second embodiment of the present invention.
[0030] Figure 5 A structural block diagram of a smart terminal provided in the third embodiment of the present invention is shown. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0033] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0034] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0035] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0036] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0037] like Figure 1 The diagram illustrates a flowchart of a Fidelius-based SQL data analysis method provided in the first embodiment of the present invention, comprising:
[0038] Obtain the database metadata description file input by the user, wherein the metadata description file includes database table information and information of each field of the database table;
[0039] Retrieves the SQL query statement input by the user and the specified database metadata description file;
[0040] ClickHouse is used to parse the SQL query statement to obtain the native abstract syntax tree, and the native abstract syntax tree is then simplified to obtain the simplified abstract syntax tree;
[0041] The database metadata description file is parsed to obtain the database data structure. The specific data information of the database is read and parsed, the read data information is stored in the data structure, and the database table and field information is mapped to the nodes of the simplified abstract syntax tree.
[0042] Generate Fidelius computation graph code from the simplified abstract syntax tree and determine whether Fidelius operator code needs to be generated.
[0043] If so, then Fidelius operator code is dynamically generated based on the simplified abstract syntax tree and the database;
[0044] If not, use the integrated Fidelius operator code;
[0045] Fidelius executes and parses SQL query statements based on the Fidelius computation graph code and Fidelius operator code to obtain query results.
[0046] In the specific implementation process, the user provides a database description file, i.e., a metadata description file. In this embodiment, the database metadata description file includes the following: database table name, each field of the database table, and the type of each field. The user inputs an SQL query statement and specifies the corresponding metadata description file to generate a corresponding syntax tree. When generating the syntax tree, the SQL syntax parsing module in ClickHouse is used. ClickHouse is an open-source database, and its SQL syntax parsing module generates an abstract syntax tree from the SQL statement. Based on the syntax tree generated in ClickHouse, the syntax tree is simplified by removing useless nodes and edges to obtain a simplified syntax tree that can be used in subsequent processes. For example, executing the SQL statement "SELECT * FROM STATION;" yields the original abstract syntax tree as shown below. Figure 2 As shown. The original abstract syntax tree is simplified to obtain a simplified abstract syntax tree. The simplification process only retains the parts useful for subsequent processes, removing nodes such as TableInQueryElement and TableExpression, as shown. Figure 3 As shown.
[0047] The database file input by the user includes the names and types of tables and fields, as well as the specific data information in the database. The database file needs to be parsed, such as parsing the table and field names and types to generate the corresponding database data structure; and reading and parsing the specific data information and storing it in the data structure. Simultaneously, because nodes in the SQL syntax tree contain certain tables and fields, mapping the database table and field information to specific nodes in the simplified abstract syntax tree (SAST) is used when parsing the SAST.
[0048] This invention is based on Fidelius, a privacy technology middleware that includes the HPDA (High Performance Data Analysis) module. HPDA implements various data analysis operators, which serve as the basic data processing units for SQL data analysis. These operators can perform data processing within a Trusted Execution Environment (TEE), such as Intel's SGX or AMD's SEV, ensuring the program runs in a protected environment and achieving the two fundamental goals of preventing code tampering and the inability to access intermediate variables. In this invention, the TEE technology ensures that the analysis program running on the computing power provider is the one specified by the data user (the recipient of the final analysis result) or the intermediate data initiator, preventing the algorithm provider from tampering with the program code; and ensuring that the privacy data passed to the TEE by the data provider or intermediate data initiator cannot be accessed. Typically, a program running in a TEE is called an Enclave. Enclaves have specific methods to obtain their own hash value. The hash value, also called a digest value, is obtained by calculating a given collision-resistant function. The original data information cannot be calculated from a hash value alone. Based on a secure data channel, it allows two parties in different locations to transmit private data from one party to the other's TEE while ensuring privacy is not leaked—that is, it cannot be accessed by anyone other than the sender. Furthermore, the sender can ensure that its transmitted content will only run within a designated instance of the trusted execution environment (including a specified parser hash and specified parameters). This invention primarily improves the operators in HPDA to support complete SQL.
[0049] The HPDA module parses the Simplified Abstract Syntax Tree (SAST) to generate Fidelius computation graph code and determine whether Fidelius operator code needs to be generated. The Fidelius computation graph, contained within the HPDA module, determines the data flow direction during Fidelius execution. For example, in the SQL statement "SELECT ID FROM STATION WHERE ID>10;", the computation graph generation process first reads "STATION", then filters out data with IDs less than or equal to 10, followed by the Trim operator to extract the ID attribute from the entire data record, and finally outputs the resulting data. Therefore, the Fidelius computation graph controls the data flow direction, and its code is generated during SAST parsing. A key design principle of the Fidelius computation graph is that the computation graph generated by a query statement must be unique and cannot be divided into multiple graphs. For instance, in subqueries, the result of the subquery must be passed as an intermediate node to the computation graph, not as the output of another computation graph. Therefore, the design of the Fidelius computation graph needs to consider the order of operations of each Fidelius operator. Only in this way can the data processed by the subquery be passed to subsequent nodes. The current order of nodes in the Fidelius computation graph is: source data processing, filter processing, output processing, and limit processing. All Fidelius operators can be divided into the above processing steps. Each processing step may contain multiple operators. These operators, except for aggregation operations, can be processed in any procedure, but the processing steps cannot be disordered. The filter operator is included in the filter processing step, the orderby operator, aggregation operator, trim operator, and groupby operator are included in the output processing step, and the limit operator is included in the limit processing step. At the same time, due to the existence of aggregation operations and subqueries, it is unavoidable to store data in the intermediate nodes of the Fidelius computation graph.
[0050] In this embodiment of the invention, parsing the SQL syntax tree requires not only Fidelius computation graph code but also Fidelius operator code. The Fidelius operator code specifies how Fidelius computation graph nodes process data. There are two types of Fidelius operators: one type is independent of specific SQL statements and therefore does not require parsing the simplified abstract syntax tree (SLT) and can be integrated into Fidelius; the other type is related to specific SQL statements and therefore needs to be dynamically generated based on the database and SQL statements during execution.
[0051] The key to designing Fidelius operators is how each operator processes data. Some operators, such as the Filter operator, do not require temporary data storage during processing; others, like the Aggregation operator, must store data temporarily because they involve set operations. Furthermore, some operators, such as the Filter operator, may require multiple implementations to meet different user SQL requirements. The following is a detailed design scheme for Fidelius operators:
[0052] The operators integrated into Fidelius include the following:
[0053] (1) Limit operator: This operator is mainly used to limit the output of SQL data. For example, Limit 2,5 means outputting the second to fifth data from all data.
[0054] (2) Orderby operator: This operator is mainly used to sort SQL data. It contains a quicksort algorithm to implement the processing of this operator.
[0055] (3) Trim operator: The function of this operator is to obtain certain fields in the input data, such as the input type is InputObjType and the output type is OutputObjType. At this time, you can directly assign a value to OutputObjType using InputObjType. This uses the feature of NTObject. You can refer to the source code of the "operator=" part in NTObject.
[0056] The following types of operators need to be dynamically generated based on SQL statements and the database:
[0057] (1) The Filter operator is mainly used to filter data that does not meet the conditions. It has two implementations: one is when there is only one source, such as "SELECT ID FROM STATION WHERE ID>1"; the other is when there are two sources, which is mainly used to implement subqueries, such as "SELECT ID FROM STATS WHERE ID IN(SELECT ID FROM STATION)". These two cases can be distinguished by whether the input source is empty when calling the Filter operator.
[0058] (2) The Group operator is to group the data according to the GroupBy field as needed, and the final output is a vector.
[0059] (3) The Aggregation operator is mainly used for aggregation calculation. There are two implementations: one is to take general data as input, such as “SELECT SUM(ID) FROM STATION”; the other is to take the output of a group as input, such as “SELECT SUM(ID) FROM STATION GROUP BY CITY”.
[0060] (4) The Join operator is mainly used to handle multi-table queries. Since the syntax trees generated by various join queries are exactly the same, different join situations in multi-table queries cannot be distinguished at this stage. Therefore, the output of the Join operator is the result of a full join in a multi-table query.
[0061] Fidelius executes the SQL parsing process based on the generated Fidelius computation graph code and Fidelius operator code, ultimately obtaining the query results corresponding to the SQL query statement.
[0062] This invention provides a Fidelius-based SQL data analysis method that can parse user-input SQL data and establish computation graph code and operator code corresponding to Fidelius, facilitating the correct execution of SQL statements by Fidelius. This method encapsulates SQL data analysis, allowing developers to seamlessly integrate privacy-preserving computation data analysis.
[0063] In the first embodiment described above, a Fidelius-based SQL data analysis method is provided. Correspondingly, this application also provides a Fidelius-based SQL data analysis system. Please refer to... Figure 4 This is a structural block diagram of a Fidelius-based SQL data analysis system provided in the second embodiment of the present invention. Since the device embodiment is basically similar to the method embodiment, it is described simply; relevant details can be found in the description of the method embodiment. The device embodiment described below is merely illustrative.
[0064] like Figure 4The diagram illustrates a structural block diagram of a Fidelius-based SQL data analysis system according to another embodiment of the present invention. The system includes: a first acquisition module, a second acquisition module, a simplification module, a database parsing module, a Fidelius code generation module, and an SQL parsing module. The first acquisition module acquires a database metadata description file input by the user, the metadata description file including database table information and information about each field of the database table. The second acquisition module acquires a user-input SQL query statement and a specified database metadata description file. The simplification module uses ClickHouse to parse the SQL query statement to obtain a native abstract syntax tree, and then simplifies the native abstract syntax tree to obtain a simplified abstract syntax tree. The database parsing module... The database metadata description file is parsed to obtain the database data structure. Specific data information from the database is read and parsed, stored in the data structure, and the database tables and fields are mapped to nodes in the simplified abstract syntax tree (SLP). The Fidelius code generation module generates Fidelius computation graph code based on the SLP and determines whether Fidelius operator code needs to be generated. If so, Fidelius operator code is dynamically generated based on the SLP and the database; otherwise, the integrated Fidelius operator code is used. The Fidelius SQL parsing module executes and parses SQL query statements based on the Fidelius computation graph code and the Fidelius operator code to obtain the query results.
[0065] The Fidelius code generation module includes a Fidelius computation graph code generation unit, which analyzes the operations contained in the simplified abstract syntax tree nodes and generates the call code corresponding to the operations according to a set order, which is source data processing, filter processing, output processing and limit processing.
[0066] The dynamically generated Fidelius operator code includes: Filter operator, Group operator, Aggregation operator, and Join operator. The Filter operator is used to filter data, the Group operator is used to group data according to the GroupBy field, the Aggregation operator is used to perform aggregation calculations, and the Join operator is used to handle multi-table queries. The integrated Fidelius operator code includes: Limit operator, Orderby operator, and Trim operator. The Limit operator is used to limit the output of SQL data, the Orderby operator is used to sort SQL data, and the Trim operator is used to obtain a specified field from the input data.
[0067] This invention provides a Fidelius-based SQL data analysis system that can parse user-input SQL data and establish corresponding computation graph code and operator code for Fidelius, facilitating the correct execution of SQL statements by Fidelius. It encapsulates SQL data analysis, allowing developers to seamlessly integrate privacy-preserving computation data analysis.
[0068] like Figure 5 The diagram shows a schematic of a smart terminal according to another embodiment of the present invention. The terminal includes a processor, an input device, an output device, and a memory. The processor is connected to the input device, the output device, and the memory. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions to execute the method described in the above embodiments.
[0069] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0070] Input devices may include touchpads, fingerprint sensors (used to collect the user's fingerprint information and fingerprint orientation information), microphones, etc., while output devices may include displays (LCDs, etc.), speakers, etc.
[0071] The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information about the device type.
[0072] In specific implementations, the processor, input device, and output device described in the embodiments of the present invention can execute the implementation methods described in the method embodiments of the present invention, or they can execute the implementation methods described in the system embodiments of the present invention, which will not be repeated here.
[0073] The present invention also provides an embodiment of a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the methods described in the above embodiments.
[0074] The computer-readable storage medium can be an internal storage unit of the terminal described in the foregoing embodiments, such as the terminal's hard drive or memory. The computer-readable storage medium can also be an external storage device of the terminal, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the terminal. The computer-readable storage medium is used to store the computer program and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0075] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0076] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the terminals and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed terminals and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A SQL data analysis method based on Fidelius, characterized in that, include: Obtain the database metadata description file input by the user, wherein the metadata description file includes database table information and information of each field of the database table; Retrieves the SQL query statement input by the user and the specified database metadata description file; ClickHouse is used to parse the SQL query statement to obtain the native abstract syntax tree, and the native abstract syntax tree is then simplified to obtain the simplified abstract syntax tree; The database metadata description file is parsed to obtain the database data structure. The specific data information of the database is read and parsed, the read data information is stored in the data structure, and the database table and field information is mapped to the nodes of the simplified abstract syntax tree. Generate Fidelius computation graph code from the simplified abstract syntax tree and determine whether Fidelius operator code needs to be generated. If so, then Fidelius operator code is dynamically generated based on the simplified abstract syntax tree and the database; If not, use the integrated Fidelius operator code; Fidelius executes and parses SQL query statements based on the Fidelius computation graph code and Fidelius operator code to obtain query results.
2. The method as described in claim 1, characterized in that, The specific method for generating Fidelius computation graph code based on the simplified abstract syntax tree includes: Analyze the operations contained in the nodes of the simplified abstract syntax tree; The call code corresponding to the operation is generated according to the set order.
3. The method of claim 2, wherein, The specified order is as follows: source data processing, filter processing, output processing, and limit processing.
4. The method of claim 1, wherein, The dynamically generated Fidelius operator code includes: Filter operator, Group operator, Aggregation operator, and Join operator. The Filter operator is used to filter data, the Group operator is used to group data according to the GroupBy field, the Aggregation operator is used to perform aggregation calculations, and the Join operator is used to handle multi-table queries.
5. The method as described in claim 1, characterized in that, The integrated Fidelius operator code includes: Limit operator, Orderby operator, and Trim operator. The Limit operator is used to limit the output of SQL data, the Orderby operator is used to sort the SQL data, and the Trim operator is used to obtain a specified field from the input data.
6. A SQL data analysis system based on Fidelius, characterized in that, include: The system comprises a first acquisition module, a second acquisition module, a simplification module, a database parsing module, a Fidelius code generation module, and an SQL parsing module. The first acquisition module is used to acquire a database metadata description file input by the user, the metadata description file including database table information and information of each field of the database table; The second acquisition module is used to acquire the SQL query statement input by the user and the specified database metadata description file; The simplification module is used to parse the SQL query statement using ClickHouse to obtain the native abstract syntax tree, and then simplifies the native abstract syntax tree to obtain a simplified abstract syntax tree; The database parsing module is used to parse the database metadata description file to obtain the database data structure, read and parse the specific data information of the database, store the read data information into the data structure, and map the database table and field information to the nodes of the simplified abstract syntax tree. The Fidelius code generation module generates Fidelius computation graph code based on the simplified abstract syntax tree and determines whether Fidelius operator code needs to be generated. If so, it dynamically generates Fidelius operator code based on the simplified abstract syntax tree and the database. If not, it uses the integrated Fidelius operator code. The SQL parsing module Fidelius executes and parses SQL query statements based on the Fidelius computation graph code and Fidelius operator code to obtain query results.
7. The system as described in claim 6, characterized in that, The Fidelius code generation module includes a Fidelius computation graph code generation unit, which is used to analyze the operations contained in the simplified abstract syntax tree nodes and generate the call code corresponding to the operations according to a set order. The set order is source data processing, filter processing, output processing, and limit processing.
8. The system as described in claim 6, characterized in that, The dynamically generated Fidelius operator code includes: Filter operator, Group operator, Aggregation operator, and Join operator. The Filter operator is used to filter data, the Group operator is used to group data according to the GroupBy field, the Aggregation operator is used to perform aggregation calculations, and the Join operator is used to handle multi-table queries. The integrated Fidelius operator code includes: Limit operator, Orderby operator, and Trim operator. The Limit operator is used to limit the output of SQL data, the Orderby operator is used to sort SQL data, and the Trim operator is used to obtain a specified field from the input data.
9. A smart terminal, comprising a processor, an input device, an output device, and a memory, wherein the processor is connected to the input device, the output device, and the memory, and the memory is used to store a computer program, the computer program comprising program instructions, characterized in that, The processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Electric power information system security protection method and device based on code semantic analysis
CN113297580A
Ciphertext query calculation method for encrypted database
CN113742362A