Data checking method, system and electronic device

By converting the raw dataset from the data source into a more secure target dataset and verifying the data based on the correlation information to determine the execution strategy, the problem of inaccurate and insecure data querying in the existing technology is solved, and security and accuracy are achieved in the process of multi-party data exchange.

CN116795861BActive Publication Date: 2025-12-12ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310466406.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-12-12
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In existing technologies, structured query language databases cannot guarantee the accuracy and security of data queries, resulting in the inability to effectively guarantee data security and query accuracy during multi-party data exchange.

Method used

By acquiring query task data from the query end, the original dataset from the data source is transformed into a more secure target dataset. Based on the correlation information, the execution strategy data is determined and verified to ensure the correctness of the data query.

Benefits of technology

While ensuring data security, it enables effective data querying, improving the security and query accuracy during the data exchange process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795861B_ABST
    Figure CN116795861B_ABST
Patent Text Reader

Abstract

The application discloses a data verification method, system and electronic equipment. The method comprises the following steps: obtaining query task data of a query end, wherein the query task data is used for performing data query on at least one data source end; converting an original data set of the data source end into a target data set, wherein the security of the target data set is higher than that of the original data set; associating the query task data and the target data set to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; and verifying the execution strategy data to obtain a verification result, wherein the verification result is used for at least indicating the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data. The application solves the technical problem that data cannot be effectively queried under the premise of ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computers, in particular to a data verification method and system and electronic device. BACKGROUND

[0002] At present, with the big data technology and the data exchange between enterprises or individuals becoming more and more important, how to efficiently complete the multi-party secure query under large-scale data on the premise of ensuring the safety of all enterprise or individual data in the process of data exchange is very important.

[0003] In the related art, the structured query language database (Structured Query Language, SQL for short) is relatively simple, and the data is directly queried based on the SQL statement, however, it cannot guarantee the accuracy of each data query, nor can it guarantee that the queried data is allowed to be exchanged by multiple parties, resulting in that the safety of data and the accuracy of query cannot be guaranteed in the process of multi-party data exchange, and there is still a technical problem that data cannot be effectively queried on the premise of ensuring data safety.

[0004] In view of the above problems, no effective solution has been proposed at present. SUMMARY

[0005] The embodiments of the present application provide a data verification method, system and electronic device to at least solve the technical problem that data cannot be effectively queried on the premise of ensuring data safety.

[0006] According to an aspect of an embodiment of the present application, a data verification method is provided. The method can include: obtaining query task data of a query end, wherein the query task data is used to execute data query on at least one data source end; converting an original data set of the data source end into a target data set, wherein the security of the target data set is higher than that of the original data set; associating the query task data and the target data set to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; verifying the execution strategy data to obtain a verification result, wherein the verification result is used to at least indicate the correctness of an execution result obtained by executing data query on the target data set according to the execution strategy data.

[0007] According to another aspect of the embodiments of the present application, a query method of data is provided. The method can include: obtaining query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; obtaining a verification result corresponding to the query task data, wherein the verification result is used to at least indicate correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and security of the target data set is higher than that of the original data set; and in response to an attribute value of the correctness corresponding to the verification result being higher than an attribute threshold, performing data query on the target data set according to the execution strategy data to obtain the execution result.

[0008] According to another aspect of the embodiments of the present application, a verification method of data is provided. The method can include: receiving query task data of a query end by calling a first interface, wherein the query task data is used to perform data query on at least one data source; converting an original data set of the data source end into a target data set, wherein security of the target data set is higher than that of the original data set; associating the query task data and the target data set to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; verifying the execution strategy data to obtain a verification result, wherein the verification result is used to at least indicate correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data; and outputting the verification result by calling a second interface, wherein the second interface includes a second parameter, and an attribute value of the second parameter is the verification result.

[0009] According to another aspect of the embodiments of the present application, a verification system of data is also provided. The system can include: a query end configured to generate query task data, wherein the query task data is used to perform data query on at least one data source end; a data source end configured to generate an original data set; an engine configured to convert the original data set of the data source end into a target data set, wherein security of the target data set is higher than that of the original data set; associate the query task data and the target data set to obtain association information; determine execution strategy data corresponding to the query task data based on at least the association information; and verify the execution strategy data to obtain a verification result, wherein the verification result is used to at least indicate correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data.

[0010] According to another aspect of the embodiments of the present application, an electronic device is provided, which can include a memory and a processor. The memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, any one of the data verification methods described above is implemented.

[0011] According to another aspect of the embodiments of the present application, a processor is provided, which is configured to run a program. When the program is run, any one of the data verification methods described above is implemented.

[0012] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, which includes a stored program. When the program is run, the device in which the storage medium is located is controlled to implement any one of the data verification methods described above.

[0013] In the embodiments of the present application, query task data of a query end is acquired, wherein the query task data is used to perform data query on at least one data source end. The original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set. The query task data and the target data set are associated to obtain association information. The execution strategy data corresponding to the query task data is determined based on at least the association information. The execution strategy data is verified to obtain a verification result, wherein the verification result is used to at least indicate the correctness of the execution result obtained by performing data query on the target data set according to the execution strategy data. That is, in the embodiments of the present application, when the data of any data source end needs to be queried at the query end, the original data set of the data source end can be converted into a target data set with higher security. The association information between the query task data and the target data set is established to determine the corresponding execution strategy data. The data in the target data set is queried based on the acquired execution strategy data of the query end to obtain an execution result. It can be judged whether the obtained execution result is correct. Therefore, the process of querying data is verified in advance, which can improve the security of data when the data is actually exchanged between the participating parties. Thus, the technical effect of effectively querying data under the premise of ensuring data security is achieved, and the technical problem of being unable to effectively query data under the premise of ensuring data security is solved.

[0014] It should be noted that the general description above and the detailed description below are merely examples and illustrations of the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0015] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0016] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data checking method according to an embodiment of the application;

[0017] Figure 2 is a structure block diagram of a computing environment of a data checking method according to an embodiment of the application;

[0018] Figure 3 is a flowchart of a data checking method according to an embodiment of the application;

[0019] Figure 4 is a flowchart of a data query method according to an embodiment of the application;

[0020] Figure 5 is a flowchart of another data checking method according to an embodiment of the application;

[0021] Figure 6 is a schematic diagram of a data checking system according to an embodiment of the application;

[0022] Figure 7 is a schematic diagram of attributing a field in all data sources according to an embodiment of the application;

[0023] Figure 8 is a schematic diagram of decomposing a piece of secure SQL based on two data sources according to an embodiment of the application;

[0024] Figure 9 is a schematic diagram of obtaining an execution result based on a multi-party joint query of SQL statements according to an embodiment of the application;

[0025] Figure 10 is a schematic diagram of a data checking device according to an embodiment of the application;

[0026] Figure 11 is a schematic diagram of a data query device according to an embodiment of the application;

[0027] Figure 12 is a schematic diagram of another data checking device according to an embodiment of the application;

[0028] Figure 13 is a structure block diagram of a computer terminal according to an embodiment of the application;

[0029] Figure 14A block diagram of an electronic device according to a data verification method of an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the personnel in the technical field better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work should fall within the protection scope of the present application.

[0031] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0032] First, some nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:

[0033] Field lineage, a security SQL field lineage is a security SQL query statement to track and manage the association between fields according to the relationship between fields;

[0034] Plain operator, input, output and execution logic in SQL operator, all complete the required computing task on the side of participation, without involving data exchange with other participants;

[0035] Cipher operator, input, output and execution logic tasks in SQL operator must be completed between multiple participants through secure data exchange and calculation;

[0036] Logical plan, by analyzing the security SQL statement, the query statement is disassembled into plain operator and cipher operator, and then a series of execution plans are generated according to the operators;

[0037] Physical plan, on the basis of the logical plan, the logical plan is compiled by a self-developed compiler to produce a reliable multi-party query plan that can be executed by an execution engine to improve the query performance of the database;

[0038] The execution of the verification refers to the verification of the input, output and logic of the safe SQL by using a pre-run mechanism before the execution of the physical plan, so as to ensure the correctness of the database query;

[0039] The execution engine refers to an execution engine responsible for the execution of the physical plan, and common execution engines include a computing engine (for example, Apache Spark), a general data processing platform (Apache Flink) and a data warehouse tool (Hive);

[0040] Embodiment 1

[0041] According to the embodiment of the present application, a data verification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] The method provided in Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing the data verification method according to the embodiment of the present application is shown in Figure 1 As shown in the figure, the computer terminal 10 (or mobile device) can include one or more processors 102 (the processor 102 can include but is not limited to a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA) and the like processing device), a memory 104 for storing data, and a transmission module 106 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (Universal Serial Bus, USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown in the figure is only schematic, and it does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more or less components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 .

[0043] Figure 1The illustrated hardware architecture diagram can not only serve as an exemplary block diagram of the above-mentioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the above-mentioned server, in an alternative embodiment, Figure 2 The above-mentioned computer terminal 10 (or mobile device) is illustrated in a block diagram as an embodiment of a computing node in a computing environment 201. Figure 1 The illustrated computer terminal 10 (or mobile device) is illustrated in a block diagram as an embodiment of a computing node in a computing environment 201. Figure 2 The illustrated computer terminal 10 (or mobile device) is illustrated in a block diagram as an embodiment of a computing node in a computing environment 201. Figure 2 As shown, the computing environment 201 includes a plurality of computing nodes (e.g., servers) running on a distributed network (shown as 210-1, 210-2, …, etc.). The computing nodes all contain local processing and memory resources, and end users 202 can remotely run applications or store data in the computing environment 201. Applications can be provided as a plurality of services 220-1, 220-2, 220-3, and 220-4 in the computing environment 201, representing services “A”, “D”, “E”, and “H”, respectively.

[0044] The end users 202 can provide and access the services through a web browser or other software applications on a client, and in some embodiments, the provisioning and / or requests of the end users 202 can be provided to an entry gateway 230. The entry gateway 230 can include a corresponding proxy to handle the provisioning and / or requests for the services (one or more of the services provided in the computing environment 201).

[0045] The services are provided or deployed according to various virtualization technologies supported by the computing environment 201. In some embodiments, the services can be provided according to virtual machine (VM)-based virtualization, container-based virtualization, and / or the like. The VM-based virtualization can be to emulate a real computer by initializing a virtual machine to execute programs and applications without directly accessing any actual hardware resources. While the virtual machine is virtualized, according to the container-based virtualization, a container can be started to virtualize an entire operating system (OS) so that multiple workloads can run on a single OS instance.

[0046] In one embodiment of the container-based virtualization, a number of containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). For example, as shown in Figure 2As shown, service 220-2 can be equipped with one or more pods 240-1, 240-2, …, 240-N (collectively, pods). A pod can include a proxy 245 and one or more containers 242-1, 242-2, …, 242-M (collectively, containers). The one or more containers in a pod handle requests related to one or more respective functions of the service, and the proxy 245 generally controls network functions related to the service, such as routing, load balancing, etc. Other services can also be equipped with pods similar to the pods.

[0047] In operation, executing a user request from end user 202 can require invoking one or more services in computing environment 201, and executing one or more functions of a service can require invoking one or more functions of another service. As Figure 2 As shown, service "A" 220-1 receives a user request from end user 202 from ingress gateway 230, service "A" 220-1 can invoke service "D" 220-2, and service "D" 220-2 can request service "E" 220-3 to execute one or more functions.

[0048] The computing environment described above can be a cloud computing environment, in which allocation of resources is managed by a cloud service provider, allowing development of functions without regard to implementation, tuning, or scaling servers. The computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be split into a set of functions that can automatically scale independently, rather than scaling a single hardware device to handle potential loads.

[0049] In the above-described operating environment, the present application provides a data verification method as shown in Figure 3 It should be noted that the data verification method of this embodiment can be executed by a mobile terminal as shown in Figure 1 Figure 3 A flowchart of a data verification method according to an embodiment of the present application is shown in Figure 3 The method can include the following steps:

[0050] In step S302, query task data of a query end is acquired, wherein the query task data is used to perform data query on at least one data source end.

[0051] ​In the technical solution provided in step S302 of the present application, when the query end needs to query the data of the data source end, the query task data input by the query end can be obtained, wherein the query end and the data source end can represent the device end used by the enterprise or individual needing to exchange data. The query end can be the data demand provider in the data exchange process, that is, the query end can be the party querying the data of the data source end. The data source end can also be referred to as a device end for providing a data source, and can be the participant in the data exchange process, that is, the data source end is the party providing the data to be queried.

[0052] Optionally, in this embodiment, the query end task data can be used to perform the operation of querying at least one data source end, and can be a SQL statement, which can also be referred to as SQL or secure SQL.

[0053] Optionally, if the query end needs to query the data of the data source end, the query task data corresponding to the data to be queried can be input by the query end. By analyzing the query task data, the SQL statement can be divided into different execution steps, and each execution step usually contains one or more operators. Based on the operators, the location information (ownership information) of the data to be queried in the data source end can be determined, wherein the operator can be used to record the location of the corresponding data in the data source end in the SQL.

[0054] In step S304, the original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set.

[0055] In the technical solution provided in step S304 of the present application, after obtaining the query task data of the query end, the original data set of the data source end is converted into a target data set. Each data in the original data set of the data source end can be converted into data with higher security, and after all the data in the data source end are converted, all the new data with higher security obtained can be combined into a new set to obtain the target data set. The original data set can be a set of all data stored in the data source end corresponding to the participant. The target data set can be a set with higher security after conversion, and can be a physical table of the data source end, which can be composed of rows and columns. The column (column name) can be referred to as a field, and can be the attribute information of all data in the column, such as data type or data magnitude. The field in the target data set can also be referred to as a physical table field. It should be noted that the attribute information of the data herein is only for illustration and does not limit the content of the attribute information.

[0056] Optionally, the embodiment can mark (marking) the fields differently based on the different security and privacy requirements of each participant for each field, such as special marking for fields with high security and privacy (not allowed to participate in multi-party data exchange), so that all fields in the original data set can be converted into corresponding fields with higher security, obtaining the target data set corresponding to the original data set. Since the fields with high security and privacy have special marks, it is easy to focus on whether the data in these fields is exchanged during multi-party data exchange, so as to ensure the security of the special marked data and prevent multi-party data exchange of such data.

[0057] In the embodiment of the present application, by securely marking the original data set, it can be judged whether each field in the original data set is a privacy field or a public field, effectively protecting the security of the privacy field of all participating data exchange enterprises or individuals. On the premise of ensuring the security of the data in the privacy field, data exchange between the data in the public field can be allowed, thereby realizing the technical effect of improving the security of the data when querying the data in multiple parties. The privacy field can be a single data source end that only completes input, output and execution logic tasks. The public field can be at least two parties that jointly complete input, output and execution logic tasks.

[0058] Step S306, associating the query task data and the target data set to obtain association information.

[0059] In the technical solution provided by the above step S306 of the present application, after the original data set is converted into the target data set, the query task data and the target data set can be associated to determine the association information between the query task data and the target data set. The association information can be the security SQL blood relationship information obtained through blood relationship analysis, also known as security blood relationship information, security information or blood relationship information.

[0060] Optionally, based on the association relationship (blood relationship) between the fields in the query task data and each field in the target data set, that is, the blood relationship analysis can be performed between all fields in the security SQL and each physical table field in the physical table, thereby constructing the blood relationship information of the entire security SQL.

[0061] For example, after the query task data is parsed, the association relationship between the column (that is, the output column of the query task data) where at least one data to be queried in the query task data is located and each field in the physical table can be parsed, obtaining the blood relationship information of the entire query task data.

[0062] Step S308, determining the execution strategy data corresponding to the query task data based on at least the association information.

[0063] In the technical solution provided in step S308 of the present application, after the association information between the query task data and the target data set is determined, the execution strategy data corresponding to the query task data can be determined based at least on the association information, wherein the execution strategy data is used to represent the flow of querying the data in the data source end based on the query task data, which can be referred to as an execution plan, and can be used to perform plan decomposition on the query task data. The execution plan can include input, output, and execution logic processes when querying the corresponding data in the target data set of the data source end based on the query task data, and the execution plan can include a logical plan, a physical plan, and a dimensionless plan. It should be noted that the plan included in the execution plan is only an example, and any plan for querying the data in the data source end based on the query task data is within the scope of the embodiment, and the execution plan will not be described one by one.

[0064] Optionally, the operators in the query task data can be split based on the association information and the security policy, such as splitting the operators in the query task data into plaintext operators and ciphertext operators, and determining the corresponding execution plan for the split plaintext operators and ciphertext operators, wherein the plaintext operator can be used to represent that the input, output, and execution logic of the operator are completed in the same participant to complete the required computing task, and do not involve communication with other participants. The ciphertext operator can be used to represent that the operator must complete the input, output, and execution logic tasks between multiple participants through secure data exchange and calculation. In the embodiment of the present application, since the splitting of the operators parsed from the query task data is considered, the security of the plaintext operator executing only within a single participant is ensured, and the accuracy of the multi-party data exchange based on the ciphertext operator is improved.

[0065] In related technologies, for different query task data, only a single secure multi-party computing protocol can be used to complete the input, output, and execution logic of the operators in the query task data. Therefore, due to the lack of targeted selection of appropriate secure multi-party computing protocols for different query task data, there is still the technical problem of low efficiency when calculating between multiple participants. However, in the embodiment of the present application, the operators of the associated query task data can be intelligently selected to have the highest efficiency of the secure multi-party computing protocol for calculation in combination with the data meta information (such as data type and data magnitude) of the data source end. Since the most suitable secure multi-party computing protocol can be selected for different query task data, the technical effect of improving the efficiency of calculation between multiple participants is achieved.

[0066] Step S310, the execution strategy data is checked to obtain a checking result, wherein the checking result is used to indicate the correctness of the execution result obtained by executing the data query on the target data set according to the execution strategy data.

[0067] In the technical solution provided in step S310 of the present application, after the execution strategy data corresponding to the query task data is determined, the input, output and execution logic of the execution strategy data can be checked to obtain an execution result, and the execution result can be determined to determine whether the checking result is correct. The checking result can be used to indicate the correctness of the execution result obtained by executing the data query on the target data set according to the execution strategy data, which can be an execution report or a running report. The execution result can be the data obtained by executing the data query on the target data set according to the execution strategy data.

[0068] Optionally, based on the query task data, the execution strategy data to be executed when querying the data in the target data set is determined, and the input, output and execution logic of the execution strategy data can be pre-run checked to obtain the data (execution result) output from the target data set based on the execution strategy data. It can be determined whether the execution result is the data required by the query task data to determine whether the checking result of the pre-run checking is correct. The pre-run checking can also be referred to as pre-checking.

[0069] For example, the correct data corresponding to the target data set to be queried by different query task data can be determined in advance to obtain a pre-execution result. After the execution strategy data is pre-run checked without data in memory to obtain the corresponding execution result, the execution result and the pre-execution result can be compared and checked to determine whether they are consistent. If they are consistent, it can be indicated that the checking result is correct, otherwise, it can be indicated that the checking result is incorrect. Since the query task data can be pre-run checked without data in memory, the safety of data query can be ensured, and the speed of checking can be ensured, so that the safety and efficiency of data query can be improved. It should be noted that this is only an example and does not limit the method of checking the execution strategy data and the method and process of determining whether the checking result is correct.

[0070] Through the above steps S302 to S310 of the present application, when the query end needs to query the data of any data source end, the original data set of the data source end can be converted into a target data set with higher security, the association information between the query task data and the target data set is established, the corresponding execution strategy data is determined, the query operation on the data in the target data set is performed based on the obtained execution strategy data of the query end, the execution result is obtained, and it can be judged whether the obtained execution result is correct, so that the process of the query is checked in advance, the security of the data exchange between the participating parties can be improved, and the technical effect of effectively querying the data under the premise of ensuring the security of the data is achieved. The technical problem of being unable to effectively query the data under the premise of ensuring the security of the data is solved.

[0071] The above method of the embodiment will be further introduced below.

[0072] As an optional implementation, in step S306, the query task data and the target data set are associated to obtain association information, including: the output information of the query task data and the target data set are associated to obtain the association information, wherein the association information is used to indicate that the target data set executes the data query, and the obtained execution result is output through the output information.

[0073] In the embodiment, in the process of associating the query task data and the target data set to obtain the association information, the output information of the query task data and the target data set can be associated to obtain the association information, wherein the output information can be the fields corresponding to all the data required to be queried by the query task data. The association information can be used to indicate that the target data set executes the data query, and the obtained execution result is output through the output information.

[0074] In the embodiment of the present application, the query task data can be parsed to determine the column name of at least one column where the required data in the query task data is located. A one-to-one association relationship can be established between the column name of the column where the data in the query task data is located and each physical table field (column name of each column of the physical table) in the physical table in the data source end. Based on the association relationship between all the columns where the data in the query task data is located and all the physical table fields, the security SQL blood relationship information of the whole query task data can be constructed. Through the above method, since the security SQL can be parsed and the column name of each required query data parsed is subjected to blood analysis, the blood analysis of complex security SQL such as nested security SQL and composite security SQL can be supported, thereby achieving the purpose of blood analysis of complex security SQL and realizing the technical effect of improving the flexibility of blood analysis of different security SQL. It should be noted that the content of complex security SQL herein is only for illustration and does not limit the form of complex security SQL.

[0075] Optionally, more security policies of security SQL can be established according to the process of blood analysis, so that the participants can customize and select appropriate security policies according to their own requirements for the security of the data in the data source end.

[0076] Since the syntax of security SQL is flexible, complex security SQL is easily nested or combined. In this case, the table alias and column name are introduced in the complex security SQL, which leads to the problem that the security of the column of the output information of the complex security SQL cannot be analyzed, and the complex security SQL cannot be supported and executed. However, in the embodiment of the present application, the complex security SQL can be executed by being disassembled into multiple execution steps, and each execution step generates some intermediate tables. If the blood relationship of the complex security SQL needs to be constructed, the blood relationship of the column of the intermediate table (intermediate temporary table) of each execution step needs to be determined. Since each execution step has a certain blood inheritance rule, the association information between the final output information and the target data set can be determined based on the blood relationship in each execution step based on the blood inheritance rule, thereby achieving the purpose of analyzing and determining the blood relationship based on the complex security SQL and realizing the technical effect of being able to support and execute the complex security SQL.

[0077] As an optional implementation, the method further comprises: determining the output column of the query task data as the output information.

[0078] In this embodiment, the output column of the query task data can be determined as the output information, wherein the output column can be a column in an output table of the query task data, and can represent attribute information of the corresponding data to be queried. The output table can be a collection of all data queried from the target data set by the query task data.

[0079] Optionally, after obtaining the column name of the column in which the required query data is located by parsing the query task data, the parsed column name of the column in which the data is located can be determined as the column name of the output column, and all data in each column (output column) in the output table can be determined as the output information.

[0080] Optionally, an association relationship between each output column of the secure SQL and each physical table field can be established, so that the overall secure SQL blood relationship information can be constructed based on the association relationship between all output columns and the physical table fields.

[0081] As an optional implementation, the step S304 of converting the original data set at the data source end into the target data set includes: performing secure labeling on the original data set to obtain the target data set.

[0082] In this embodiment, in the process of converting the original data set at the data source end into the target data set with higher security, the original data can be securely labeled, and the data set after secure labeling can be determined as the target data set.

[0083] In the embodiments of the present application, each data in the data source end can be securely labeled according to the needs of different participants for data exchange of data in their respective data source ends, and the privacy data of each participant can be protected by secure labeling, so that the technical effect of effectively protecting the security of the privacy data in the process of data exchange can be achieved, wherein the privacy data can be used to represent data that the participants do not allow to be exchanged.

[0084] As an optional implementation, the original data set is securely labeled to obtain the target data set, including: securely labeling the fields of the table of the original data set to obtain the target data set.

[0085] In this embodiment, the fields in the table in which the original data set is located can be securely labeled to obtain the target data set.

[0086] Optionally, the columns (fields) of the table in which each original data set is located can be securely labeled, such as the intersection field, the grouping field and the aggregation function field, and the collection of all corresponding fields and data in the fields after secure labeling is referred to as the target data set. It should be noted that the types of fields are only for illustration and are not limited to the fields.

[0087] For example, each field in the original data set of the data source end corresponding to each participant can be security labeled. Through security labeling, the security of each field and whether privacy protection is needed can be determined, such as whether the data in each field can be viewed by other participants and the like, so that each field can be security labeled, and fields that need privacy protection can be marked differently, such as marking a field that does not need privacy protection (public field) as "0" and marking a field that needs privacy protection (private field) as "1". The set of fields and corresponding data obtained through security labeling can be referred to as a target data set, in which it can be determined whether each field can participate in the data exchange process with other participants. It should be noted that this is only an example and the method and process of security labeling the fields in the original data set are not specifically limited.

[0088] As an optional implementation, in step S308, the execution strategy data corresponding to the query task data is determined based on at least the association information, including: determining the execution strategy data based on the association information and the operators of the query task data.

[0089] In this embodiment, in the process of determining the execution strategy data corresponding to the query task data based on at least the association information, the execution strategy data corresponding to different query task data can be determined based on the association information and the operators of the query task data, wherein the operators can include SQL operators, security operators, and data source operators (SOURCE operators), and can be divided into plaintext operators and ciphertext operators. The plaintext operator can be used to indicate that the required computing task is completed in the same participant and does not involve data exchange with other participants. The ciphertext operator can be used to indicate that the computing task is completed between multiple participants through secure data exchange and calculation. It should be noted that this is only an example and the operators are not specifically limited.

[0090] Optionally, it can be determined based on the association information whether each operator in the query task data is a plaintext operator or a ciphertext operator, and the corresponding execution plan can be executed for different operators.

[0091] As an optional implementation, the execution strategy data is determined based on the association information and the operators of the query task data, including: dividing the operators of the query task data into plaintext operators and / or ciphertext operators based on the association information, wherein the plaintext operator is used to indicate the computing task required for executing the data query in the data source end, and the ciphertext operator is used to indicate the computing task required for executing the data query between at least two data source ends; determining the execution strategy data corresponding to the plaintext operator, and / or the execution strategy data corresponding to the ciphertext operator.

[0092] In this embodiment, the operators in the query task data can be divided according to the association information, into plaintext operators and / or ciphertext operators, the execution strategy data corresponding to the plaintext operators can be determined, and the execution strategy data corresponding to the ciphertext operators can also be determined, wherein the plaintext operators can be used to represent the calculation tasks required for executing data query in one data source end. The ciphertext operators can be used to represent the calculation tasks required for executing data query between multiple data source ends.

[0093] In the embodiments of the present application, the operators of the secure SQL can be split into plaintext operators and ciphertext operators according to the association information and the security policy, and two different types of execution plans corresponding to the split operators are customized under the premise of ensuring the security of data. Since the operators are split, the security of the data corresponding to the plaintext operators is ensured, and the technical effect of improving the accuracy of exchanging only the data corresponding to the ciphertext operators during multi-party data exchange is achieved.

[0094] As an optional implementation, based on the association information, the operators of the query task data are divided into plaintext operators and / or ciphertext operators, including: based on the association information, the data source end to which the operators of the query task data belong is attributed and marked, to obtain the plaintext operators and / or the ciphertext operators.

[0095] In this embodiment, the data in the data source end to which the operators of the query task data belong can be attributed and marked according to the association information, and the operators in the query task data can be split (divided) to obtain corresponding plaintext operators and / or ciphertext operators.

[0096] Optionally, the attribution information of the data in the operators of the secure SQL can be recorded, and based on the security bloodline information and the security policy of the secure SQL, the corresponding fields in the target data set of the corresponding data source end can be attributed and marked based on the attribution information. Based on the result obtained by the attribution marking, the operators of the secure SQL can be split, wherein the attribution information can be used to determine whether the process of executing the operators is single-party execution or multi-party joint execution.

[0097] Optionally, the logical plan can be the process of splitting the secure SQL statement into plaintext operators and ciphertext operators by analyzing the secure SQL statement, and then generating a corresponding execution plan based on the plaintext operators and the ciphertext operators.

[0098] Optionally, the corresponding attribution information of the security SQL is recorded for the operator, and based on the attribution information, the fields in the data source end to which each node (operator) in the parsed tree (such as the RelNode tree) of the security SQL belongs can be attributedly marked, for example, the local node (local) running on the local side, the remote node (remote) running on the opposite side, and the node (mix) requiring joint analysis of both sides can be attributedly marked. If the node is a local node or a remote node, it can be indicated that the query data operation corresponding to the operator can only be executed on a single side of the participant. If the node is a joint analysis node of both sides, it can be indicated that the query data operation corresponding to the operator can be executed by multiple participants. Based on the above steps, the execution plan corresponding to different operators can be obtained. It should be noted that the method of attribution marking is not specifically limited here.

[0099] For example, if there are two data source ends, a local data source end and an opposite data source end, all physical tables of the two can be table scanned, and after scanning, the physical tables related to the operators in the current security SQL can be filtered out, and all filtered physical tables in the two can be attributedly marked. The fields in the physical tables can be first attributedly marked for joint analysis of both sides, and if the physical table fields require joint analysis of both participants, the corresponding fields can be marked with mix. After marking is completed, the fields marked with mix can be filtered out, and then local analysis can be performed to determine which fields in the fields only need to be executed by the local data source, and the corresponding fields can be marked with local. After marking is completed, the remaining fields can be marked with remote. Thus, the marking of all fields in the data source end is completed. It should be noted that this is only an example and the attribution marking method and process of the fields are not specifically limited.

[0100] As an optional implementation, the ciphertext operator is divided into a plurality of sub-ciphertext operators; the execution strategy data is checked to obtain a checking result, including: the execution strategy data corresponding to the plaintext operator and the execution strategy data corresponding to the sub-ciphertext operator are checked respectively to obtain the checking result.

[0101] In this embodiment, the ciphertext operator can be divided into a plurality of sub-ciphertext operators, the corresponding execution strategy data of each sub-ciphertext operator and the plaintext operator is executed, and the execution process of the execution strategy data is checked to determine a checking result, wherein the ciphertext operator can be some nodes on the RelNode tree, and the sub-ciphertext operator can be nodes on the sub-tree split from the RelNode tree.

[0102] For example, after the ownership labeling of the nodes in the RelNode tree is completed, the adjacent local, remote and mix nodes can be aggregated into a logical part (logical stage), so that the RelNode tree can be cut into multiple sub-trees, and each node (sub-ciphertext operator) in the sub-tree can be further ownership labeled and the execution plan corresponding to each sub-ciphertext operator can be determined. It should be noted that this is only an example and does not specifically limit the process and method of splitting the RelNode tree into sub-trees.

[0103] Optionally, the physical plan can be a process of cutting the RelNode tree to obtain a sub-tree of the RelNode tree.

[0104] Optionally, the plaintext operator is pre-run checked in the process of executing the input, output and execution logic of the corresponding single participant execution plan to ensure that the data queried from the target data set based on the secure SQL is the required privacy data.

[0105] Optionally, the process of the execution plan of the multiple participants corresponding to each sub-ciphertext operator is pre-run checked, for example, the data required by the sub-ciphertext operator to query can be encrypted, and the secure transmission of data between each other is performed through a cryptographic security transmission protocol, to ensure that the data queried from the target data set based on the secure SQL is in the required public data, and to avoid the problem of querying privacy data.

[0106] As an optional implementation, the method further includes: replacing the time variable in the query task data, wherein the replaced query task data is used to perform data query on the data source end according to a target period.

[0107] In this embodiment, the time variable in the query task data can be replaced, so as to realize the operation of performing data query on the data source end according to the target period, and the replaced query task data can be used to perform data query on the data source end according to the target period. The target period can represent the period of time of performing data query, which can be a pre-set value or a value set according to the actual verification process. It should be noted that the size of the target period is not specifically limited here.

[0108] Optionally, the value of the time variable (such as ${bizdate}) in the query task data can be replaced according to the target period required to perform data query, and the replaced query task data can perform data query on the target data set in the data source end according to the corresponding target period.

[0109] Optionally, before the execution of the no-volume plan, a compilation plan can be executed, which can be a process of data type and parameter replacement and the like according to specific parameters in the engine for executing the entire checksum query data step.

[0110] Optionally, the no-volume plan can be a process of translating the physical plan into a no-volume task scheduling configuration.

[0111] The embodiment of the present application also provides a data query method, Figure 4 is a flow chart of a data query method according to the embodiment of the present application, as Figure 4 shown, the method can include the following steps:

[0112] Step S402, obtaining query task data of a query end, wherein the query task data is used for executing data query on at least one data source end.

[0113] In the technical solution provided in the above step S402 of the present application, the query task instruction of the query end to the data in the data source end to be queried can be collected, wherein the query task data can be used to represent the operation of executing data query on at least one data source end.

[0114] Step S404, obtaining a verification result corresponding to the query task data, wherein the verification result is at least used to represent the correctness of the execution result obtained by executing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least the association relationship between the query task data and the target data set, the target data set is obtained by converting an original data set of the data source end, and the security of the target data set is higher than that of the original data set.

[0115] In the technical solution provided in the above step S404 of the present application, the verification result obtained after verifying the execution process of the execution strategy data corresponding to the query task data can be obtained, wherein the verification result can be at least used to represent whether the execution result obtained by executing data query on a target data set according to execution strategy data corresponding to the query task data is correct. The execution strategy data can be determined based on at least the association relationship between the query task data and the target data set. The target data set can be a set of data obtained by converting an original data set of the data source end, and the security of the target data set is higher than that of the original data set.

[0116] Optionally, after obtaining the query task data of the query end, the original data set of the data source end can be converted into a target data set with higher security. The execution strategy data for performing data query on the data in the target data set based on the query task data can be determined, and the verification result of whether the execution result of the execution strategy data is correct can be determined based on the execution strategy data.

[0117] Step S406, in response to the attribute value corresponding to the correctness of the verification result being higher than the attribute threshold, performing data query on the target data set according to the execution strategy data to obtain an execution result.

[0118] In the technical solution provided by the above step S406 of the present application, the size relationship between the attribute value related to correctness in the verification result and the attribute threshold can be determined. If the attribute value is greater than the attribute threshold, it can be concluded that the correctness of the verification result is relatively high. At this time, the data query operation can be performed on the data in the target data set according to the execution strategy data, and the final execution result can be obtained. The execution result can be used to represent the data required by the execution strategy data extracted from the target data set after the data query. The attribute threshold can be used to represent the minimum correctness of the verification result, which can be a preset value or a value set according to the actual verification situation. It should be noted that the size of the attribute threshold is not specifically limited here.

[0119] Through the above steps S402 to S406 of the present application, the query task data of the query end is obtained, wherein the query task data is used to perform data query on at least one data source end. The verification result corresponding to the query task data is obtained, wherein the verification result is used to at least represent the correctness of the execution result obtained by performing data query on the target data set according to the execution strategy data corresponding to the query task data. The execution strategy data is determined based on the association relationship between the query task data and the target data set. The target data set is converted from the original data set of the data source end, and the security of the target data set is higher than that of the original data set. In response to the attribute value corresponding to the correctness of the verification result being higher than the attribute threshold, data query is performed on the target data set according to the execution strategy data to obtain the execution result. Thus, the technical effect of effectively querying data under the premise of ensuring data security is achieved, and the technical problem of being unable to effectively query data under the premise of ensuring data security is solved.

[0120] The present application also provides another data verification method. Figure 5 The flowchart of another data verification method according to an embodiment of the present application is shown in FIG. 5, which can include the following steps: Figure 5

[0121] Step S502, querying the query task data of the query end by calling the first interface, wherein the query task data is used to perform data query on at least one data source end.

[0122] ​In the technical solution provided in the step S502 of the application, the first interface can be an interface for data interaction between the server and the client. The client can transmit the query task data of the query end into the first interface as a first parameter of the first interface, so as to realize the purpose of querying the query task data of the query end.

[0123] The server of the embodiment can query the query task data of the query end by calling the first interface, wherein the query task data can perform data query on at least one data source end. The first interface can be used to query the query task data.

[0124] In step S504, the original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set.

[0125] In the technical solution provided in the step S504 of the application, all original data sets corresponding to the data source end can be converted into target data sets with higher security, wherein the security of the target data set is higher than that of the original data set.

[0126] Optionally, each data in all original data sets can be converted into data with higher security, and after all data are converted, the collection of the converted data can be referred to as a target data set.

[0127] In step S506, the query task data and the target data set are associated to obtain association information.

[0128] In the technical solution provided in the step S506 of the application, the query task data and the target data set can be associated to determine the association information therebetween, wherein the association information can be the blood relationship information of the secure SQL obtained through blood relationship analysis, and can also be referred to as secure blood relationship information, secure information or blood relationship information.

[0129] Optionally, the blood relationship information of the entire secure SQL can be constructed based on the association relationship between the fields in the query task data and each field in the target data set, wherein the association relationship can also be referred to as field blood relationship.

[0130] In step S508, the execution strategy data corresponding to the query task data is determined based on at least the association information.

[0131] In the technical solution provided in the step S508 of the application, the execution strategy data corresponding to the query task data can be determined according to at least the association information.

[0132] Optionally, the operators in the query task data can be split according to the association information and the security policy, for example, into plaintext operators and ciphertext operators, and different operators after splitting are set to correspond to the execution strategy data.

[0133] In step S510, the execution strategy data is checked to obtain a checking result, wherein the checking result at least indicates the correctness of an execution result obtained by executing the data query on the target data set according to the execution strategy data.

[0134] In the technical solution provided by the above step S510 of the present application, the input, output and execution logic in the execution strategy data can be executed to obtain an execution result, and a checking result indicating whether the execution result is correct can be determined.

[0135] Optionally, based on the execution strategy data to be executed for querying the corresponding data in the target data set according to the query task data, the process of the input, output and execution logic in the execution strategy data can be pre-run and checked to obtain an execution result. It can be judged whether the execution result is the data required by the query task data to obtain a checking result.

[0136] In step S512, the checking result is output by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the checking result.

[0137] In the technical solution provided by the above step S512 of the present application, the second interface can be an interface for data interaction between the server and the client. The server can output the checking result by calling the second interface. The checking result is taken as the second parameter of the second interface to achieve the purpose of outputting the checking result obtained by checking the execution strategy data.

[0138] The server of the embodiment can output the checking result by calling the second interface, wherein the second interface can include a second parameter, and the parameter value of the second parameter can be the checking result.

[0139] By the above steps S502 to S512, the query task data of the query end is queried by calling the first interface, wherein the query task data is used to perform data query on at least one data source end; the original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set; the query task data and the target data set are associated to obtain association information; the execution strategy data corresponding to the query task data is determined based on at least the association information; the execution strategy data is verified to obtain a verification result, wherein the verification result is used to at least indicate the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data; and the verification result is output by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the verification result, thereby achieving the technical effect that the data can be effectively queried under the premise of ensuring data security, and solving the technical problem that the data cannot be effectively queried under the premise of ensuring data security.

[0140] Embodiment 2

[0141] According to the embodiments of the present application, an embodiment of a data verification system is also provided, Figure 6 is a schematic diagram of a data verification system according to an embodiment of the present application, as Figure 6 shown, the data verification system 600 can include a query end 601, a data source end 602 and an engine 603.

[0142] The query end 601 is configured to generate query task data, wherein the query task data is used to perform data query on at least one data source end.

[0143] Optionally, when the query end 601 inputs an SQL statement for querying data in the data source end, the query end 601 can generate query task data and send the query task data to the engine 603.

[0144] The data source end 602 is configured to generate an original data set.

[0145] Optionally, the data source end 602 can be configured to obtain data of a corresponding device end of a corresponding participant, and form an original data set from the data in the device end of each participant, and send the original data set to the engine 603, wherein the data source end corresponds to the participant.

[0146] The engine 603 is configured to convert the original data set of the data source end into a target data set, where the security of the target data set is higher than that of the original data set; associate the query task data and the target data set to obtain association information; determine the execution strategy data corresponding to the query task data based on at least the association information; and check the execution strategy data to obtain a check result, where the check result is used to indicate at least the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data.

[0147] Optionally, after receiving the original data set of the data source end 602, the engine 603 can convert each data in the original data set into data with higher security based on a security marking manner, and the obtained new data set with higher security can be determined as the target data set.

[0148] Optionally, after receiving the query task data of the query end 601, the engine 603 can analyze the query task data to determine the position of the data to be queried in the data source end. The analyzed query task data and the target data set can be analyzed to establish an association between the query task data and the target data set, and the association information of the query task data can be determined. The execution strategy data for performing data query based on the execution task data can also be determined based on the association information. The process of querying data in the data source end based on the execution strategy data and obtaining an execution result can be checked to obtain a check result.

[0149] Optionally, the engine 603 can analyze the check result to determine whether the execution result obtained by querying data based on the query task data is correct. If correct, the engine 603 can send a query data request to the data source end, and after receiving the query data request, the data source end can send corresponding data to the query end. If incorrect, the engine 603 can send a check error message to the query end to prompt the participants of the query end.

[0150] In this embodiment, a data verification system is provided. Through a query end, query task data is generated, wherein the query task data is used to perform data query on at least one data source end; through a data source end, an original data set is generated; through an engine, the original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set; the query task data and the target data set are associated to obtain association information; at least based on the association information, execution strategy data corresponding to the query task data is determined; the execution strategy data is verified to obtain a verification result, wherein the verification result is used to at least indicate the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data, thereby realizing the technical effect that data can be effectively queried under the premise of ensuring data security, and solving the technical problem that data cannot be effectively queried under the premise of ensuring data security.

[0151] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application, such as data for verification, are all information and data authorized by users or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions, and provide corresponding operation entrances for users to choose authorization or refusal.

[0152] Embodiment 3

[0153] At present, in order to help enterprises protect data privacy and realize the potential value of data under the premise of meeting supervision and management requirements, major data platforms are trying to use secure multi-party computation (MPC), encryption technology and distributed computing technology, support multi-party joint calculation of secure SQL, and realize the state of data available but invisible, promote enterprise growth and open up new business tracks.

[0154] In the related art, complex SQL blood relation verification and pre-execution verification cannot be supported, so that large-scale data calculation cannot be realized, and the security cannot be guaranteed when data is exchanged between participants, and there is still the technical problem that data cannot be effectively queried under the premise of ensuring data security.

[0155] In an embodiment, an automatic association SQL query statement processing method is proposed, which collects execution log information of multiple source systems into an object association system in a batch data synchronization manner, analyzes the blood relationship of objects in the execution log information, builds a syntax tree according to the parsed blood relationship, stores the objects in the syntax tree into a graph database according to the results of the syntax tree, and stores the object nodes and the blood relationship between the nodes in the graph database. The method provides an automatic association module to the user, determines the objects to be associated selected by the user, queries the blood relationship between the objects to be associated in the graph database, and generates a SQL query statement. Since the blood relationship between the objects to be associated can be automatically queried by using the table relationship parsed from the execution log, and the SQL query statement is automatically associated and generated, the analysis work of the database developer is reduced, the required SQL development script is automatically generated according to the selection of the developer, the processing efficiency is improved, and the error rate is reduced. Since the blood relationship of the complex SQL is not considered before data query, and the pre-execution verification is not considered, the security cannot be guaranteed when the data is exchanged between the participants, and the technical problem that the data cannot be effectively queried under the premise of ensuring data security still exists.

[0156] Further, the application provides a method for clear-text and cipher-text operator disassembly verification in multi-party joint query SQL, which solves the technical problem that data cannot be effectively queried under the premise of ensuring data security, and is different from the traditional solution that does not perform blood relationship verification and pre-execution verification on SQL, and directly parses and executes the SQL statement, thereby solving the technical problem that data cannot be effectively queried under the premise of ensuring data security.

[0157] In the embodiment of the application, when the data of any data source end needs to be queried at the query end, the original data set of the data source end can be converted into a target data set with higher security, the association information between the query task data and the target data set is established, the corresponding execution strategy data is determined, and the data in the target data set is executed based on the obtained execution strategy data of the query end to obtain an execution result. It can be judged whether the obtained execution result is correct, so as to achieve the purpose of verifying the query process in advance before querying the data, improving the security of the data when the data is actually exchanged between the participants, and realizing the technical effect that the data can be effectively queried under the premise of ensuring data security, thereby solving the technical problem that the data cannot be effectively queried under the premise of ensuring data security.

[0158] The above method of the embodiment will be further introduced below.

[0159] In this embodiment, before the required data is queried from the data source by the query end through the secure SQL, the execution process of the data query based on the secure SQL can be verified first to obtain a verification result, and it is judged through the verification result whether the secure SQL can query the required data, and the security of the private data is ensured. If the required data can be queried and there is no private data of the data source output to the query end, it can be indicated that the verification result is correct. The secure SQL based on the required data can be allowed and executed. Otherwise, it can be indicated that the verification result is incorrect, and the secure SQL is not allowed to be executed.

[0160] In this embodiment, in the first step of verifying the process of querying data by the secure SQL, when the query end needs to query data from the data source, the query end can input the SQL statement corresponding to the required query data. After the SQL statement is obtained, the field in the data source required to be queried can be parsed from the SQL statement, wherein the data source can be a participant for data exchange.

[0161] For example, the SQL statement can be parsed into a corresponding RelNode tree, and each node on the RelNode tree can be determined as an operator. Through each operator, the ownership of the corresponding required query data in the data source can be determined.

[0162] In this embodiment, in the second step of verifying the process of querying data by the secure SQL, all fields in the original data set of each data source can be converted into fields with higher security, so as to convert the entire original data set of each data source into a corresponding target data set with higher security.

[0163] Optionally, the original data set composed of the fields of all data sources can be securely labeled to determine the security of each field in the original data set, so as to convert all fields in the original data set into corresponding fields with higher security, and obtain a target data set corresponding to the original data set, wherein the target data set can be a physical table, and the segment in the target data set is a physical table field, that is, the column name of the column in the physical table.

[0164] Optionally, the fields in the table where the original data set is located can be securely labeled to obtain corresponding fields in the physical table where the target data set after secure labeling is located, so as to obtain the target data set.

[0165] For example, each field in the table where the original data set of all data sources is located can be security labeled, and through security labeling, the security of each field and whether privacy protection is required can be determined, such as whether each field can be viewed by other participants and the like, so that each field can be security labeled, and fields that require privacy protection can be marked differently, such as fields that are allowed to be public can be marked as "0", and fields that are private can be marked as "1". The set of fields obtained through security labeling can be referred to as a target data set, and in the target data set, it can be determined whether each field can participate in the data exchange process with other participants.

[0166] In the embodiment of the present application, by security labeling the fields in the original data set, it can be determined whether each field in the original data set is allowed to be viewed by other participants, effectively protecting the security of the fields of each participant in the data exchange, and under the premise of ensuring the security of the fields of the privacy, data exchange between the fields that are allowed to be public is allowed, thereby achieving the technical effect of improving the security of data when multiple parties query the data.

[0167] In this embodiment, in the third step of checking the process of security SQL query data, blood analysis can be performed on the SQL statement and the target data set to determine the blood information therebetween.

[0168] Alternatively, blood analysis can be performed between the fields in the SQL statement and each field in the target data set to determine the blood information between the entire SQL statement and the target data set.

[0169] Alternatively, the column name of the column where the parsed data is located can be determined as the column name of the output column, and the data in each column (output column) in the output table can be determined as output information. The query task data can be parsed to determine at least one column where the data required to be queried in the query task data is located, and a one-to-one association relationship can be established between the column name of the column where the data in the query task data is located and each physical table field (the column name of each column of the physical table) in the physical table in the data source end, and based on the association relationship between all the columns where the data in the query task data is located and all the physical table fields, the security SQL blood information of the whole query task data can be constructed.

[0170] Due to the flexible syntax of the SQL statement, complex SQL statements formed by nesting or combining are prone to occur. In this case, the table alias and column name are introduced in the middle of the complex SQL statement, which leads to the security of the column of the output information of the complex SQL statement without analysis, and leads to the technical problem that the complex SQL statement cannot be supported and executed. However, in the embodiment of the present application, the complex SQL statement can be disassembled into multiple execution steps for execution, and each execution step generates some intermediate tables. If it is necessary to build the blood relationship of the complex SQL statement, it is necessary to determine the blood relationship of the column of the intermediate table (intermediate temporary table) of each execution step. Since each execution step has a certain blood inheritance rule, the blood relationship between the final output information and the target data set can be determined based on the blood inheritance rule and the blood relationship in each execution step, thereby achieving the purpose of analyzing and determining the blood relationship based on the complex SQL statement, and realizing the technical effect that the complex SQL statement can be supported and executed.

[0171] In this embodiment, in the fourth step of checking the process of the secure SQL query data, the execution plan of the SQL statement can be determined according to the blood relationship information and the security policy.

[0172] Optionally, the operators parsed from the SQL statement can be split into plaintext operators and ciphertext operators according to the association information and the security policy, and the corresponding execution plan can be determined according to different types of operators, wherein the plaintext operator can be used to represent that the required calculation task is completed in the same participant and does not involve data exchange with other participants. The ciphertext operator can be used to represent that the calculation task needs to be completed between multiple participants through secure data exchange and calculation.

[0173] Optionally, the SQL statement can be parsed into a corresponding RelNode tree, and each node on the RelNode tree can be determined as an operator. Through each operator, the ownership information of the required query data in the data source can be determined, and the corresponding field in the data source can be marked with ownership based on the determined ownership information, so that it can be determined whether the corresponding operator is a plaintext operator or a ciphertext operator.

[0174] For example, the ownership information of each operator can be determined based on each node (operator) in the RelNode tree after SQL statement analysis, and the fields in the data source to which the data in the operator belongs can be marked based on the attribute information, such as local, remote, and mix. If the node is local or remote, it can be indicated that the query operation corresponding to the operator can only be executed on a single participant, that is, the operator is a plaintext operator. If the node is a node for joint analysis of both parties, it can be indicated that the query operation corresponding to the operator can be executed on multiple participants, that is, the operator is a ciphertext operator. Based on the above steps, the execution plan corresponding to the plaintext operator / ciphertext operator can be determined. It should be noted that the method of ownership marking is not specifically limited here.

[0175] Optionally, the operators in the SQL can be divided into plaintext operators and / or ciphertext operators according to the association information, the execution plan corresponding to the plaintext operator can be determined, and the execution plan corresponding to the ciphertext operator can also be determined.

[0176] For another example, Figure 7 is a schematic diagram of marking the ownership of the fields in all data sources according to an embodiment of the present application, as shown in Figure 7As shown, assuming that there are two data sources (local data source and opposite data source), the table in which the local data source and the opposite data source store data can be table scanned, and the data in the table can be filtered through the filter. The filtered result can first enter the process of attribution marking of joint analysis of both parties, the field in the filtered result that needs to be analyzed by joint analysis of both parties can be marked with a mark (mix) that needs joint analysis of both parties, and the field marked with the mark can be filtered out through the filter. The remaining other filtered results can be input into the process of local analysis, and the data in the remaining filtered results that only needs local unilateral analysis and calculation at this time can be marked with a mark (local) that needs local unilateral analysis, and the remaining field can be marked with a mark (remote) that needs opposite unilateral analysis. The result of marking all marks is output. The local, remote, and mix that are adjacent can be aggregated into a logical Stage. Based on the two kinds of Stages, the intermediate temporary table of the execution step in each sub-tree can be scanned, the RelNode tree can be cut into multiple sub-trees according to certain blood inheritance rules between certain execution steps, and the sub-trees can be further attributed and marked. After the attribution marking is completed, the operators that are marked can be safely compiled, and the plaintext operators (for example, the EXEC SQL operator and the SINK SQL operator are plaintext operators of the local data source) of the two data sources and the ciphertext operators (for example, the SOURCE SQL operator and the PSI secure operator are ciphertext operators of the two data sources) that are common to both can be determined. The ciphertext operator self-checking can be communicated through a cryptography security protocol. The logical Stage can include a local data source Stage and an opposite data source Stage.

[0177] As an optional example, Figure 8 is a schematic diagram of decomposing a secure SQL based on two data sources according to an embodiment of the present application, as Figure 8 shown, when the query end needs to query the data of the data source, the SQL statement corresponding to the SQL query task of the query end can be obtained, input into the cloud security coordination center (CSCC) for SQL verification and SQL analysis, and after verification and analysis, the SQL can be used for security query database availability group (DAG). The query end can pre-calculate and configure T+1 scheduling, input the T+1 scheduling into the CSCC, pre-process the configuration of the query task, and perform security preprocessing on the query task. Thus, the no-volume heterogeneous task (no-volume plan) can be obtained, and the no-volume plan execution and task scheduling can be performed through the no-volume heterogeneous task scheduling engine CSCC.

[0178] For example, such as Figure 8 As shown, assume there are two Local Security Computation Centers (LSCCs), corresponding to two participants: Participant 1 and Participant 2. Through these two participants, the operators in the SQL can be decomposed. For example, Participant 1 can decompose it into ciphertext operator 1, ciphertext operator 2, ciphertext operator 3, ciphertext operator 4, ciphertext operator 5, and plaintext operator 1. Participant 2 can decompose it into the same ciphertext operators. Ciphertext operator 1 can be used for task scheduling, such as Open Data Processing Service (ODPS), Spark engine, and Java Database Connectivity (JDBC). Ciphertext operator 3 and the boundless plan are parsed into a physical plan, which determines the local running node, ODPS, and computing engine (Flink). Ciphertext operator 4 can be used by the operator execution engine (operator FLOW execution engine) to obtain ciphertext operator 6. The second participant can securely transmit (SEND) its data through the processes of LOAD, Private Set Intersection (PSI), and encryption. The first participant can save (SAVE) the data transmitted by the second participant through the processes of LOAD, PSI, and acknowledgment (RECIVE). The local secure computing centers where the first and second participants reside can feed back the Wuliang Project's task identifier (ID) to the Wuliang Heterogeneous Task Scheduling Engine (CSCC).

[0179] In related technologies, for different SQL statements, only a single secure multi-party computation (SMPC) protocol can be used to complete the input, output, and execution logic of the operators in the query task data. Therefore, since there is no specific secure multi-party computation protocol selected for different SQL statements, the technical problem of low efficiency in operator analysis and computation remains. However, in the embodiments of this application, by combining the data metadata information (data type and data volume) at the data source end, the most efficient secure multi-party computation protocol can be intelligently selected for computation of the operators of the associated SQL statements. By considering that the most suitable secure multi-party computation protocol can be selected for different query task data, the technical effect of improving the efficiency of operator analysis and computation is achieved.

[0180] In the fifth step of checking the process of querying the secure SQL query data, the corresponding execution plan can be pre-executed (checked), and the execution result can be obtained. The checking result of whether the execution result is correct can be obtained. Based on the checking result, it can be determined whether the corresponding SQL statement can be executed.

[0181] Optionally, based on the execution plan to be executed for querying the corresponding data in the target data set by the SQL statement, the input, output and execution logic process in the execution plan can be pre-run and checked, and the execution result output from the target data set based on the execution plan can be obtained. It can be determined whether the execution result is the data required by the query task data, and the checking result can be obtained.

[0182] Optionally, the correct data corresponding to the target data set to be queried by different query task data can be determined in advance, and the pre-execution result can be obtained. After pre-running and checking the execution strategy data, the corresponding execution result can be obtained. The execution result and the pre-execution result can be compared and checked to determine whether they are consistent. If they are consistent, it can be indicated that the checking result is that the execution result is correct, otherwise, it can be indicated that the checking result is that the execution result is incorrect.

[0183] For example, after the ownership marking of the nodes in the RelNode tree is completed, the adjacent local, remote and mix nodes can be summarized into a logical part (logical stage), so that the RelNode tree can be cut into multiple sub-trees. Each node (sub-ciphertext operator) in the sub-tree can be further marked with ownership and the execution plan corresponding to each sub-ciphertext operator can be determined. The process of the execution plan for calculating the single participant corresponding to the plaintext operator is pre-run and checked to ensure that the data queried from the target data set based on the secure SQL is all the required private data. The process of the execution plan for calculating the multiple participants corresponding to each sub-ciphertext operator is pre-run and checked to ensure that the data queried from the target data set based on the SQL statement is all the required public data, and the problem of querying private data is avoided.

[0184] In this embodiment, after the execution plan based on the SQL query data is checked as described above, if the checking result is that the execution plan is correct, the security of the data can be ensured. The data in the data source can be queried based on the SQL.

[0185] Optionally, Figure 9 is a schematic diagram of obtaining an execution result based on a SQL statement for multi-party joint query according to an embodiment of the present application, as Figure 9As shown, when the query end needs to query the data in the data source, the corresponding SQL of the required query data can be input to start the query process. The SQL can be parsed, and the parameters in the parsed SQL can be replaced, such as the time variable in the SQL can be replaced to realize the periodic scheduling of the SQL. After the parameter replacement, the blood relationship of the fields in the SQL can be analyzed, and a series of rules defined before the execution of the query can be optimized. After the optimization of the SQL RelNode tree, the logical plan for executing the SQL can be obtained after the ownership marking is completed. The logical plan is cut to obtain a physical plan, such as the RelNode tree can be cut into different sub-trees. The physical plan is parsed and translated to generate a corresponding no-volume task scheduling configuration, which can be referred to as a no-volume plan. Before executing the no-volume plan, the no-volume plan can be pulled according to the specific parameters of the engine to replace the data types and parameters and the like, which can be referred to as a compilation plan (compilation optimization). After the no-volume plan is compiled and optimized, the no-volume plan can be pre-run in memory without data to verify the corresponding input, output, execution logic and execution process, which can be referred to as an execution plan (execution verification). In the execution verification process, the data to be queried by the SQL can be distributed from the data source, and the scheduled data can be referred to as an execution result. Outputting the execution result can end the process of querying the data based on the SQL. If there are two data sources of participants, such as a first participant data source and a second participant data source, the respective plaintext SQL can be executed separately to load the data to be queried in the plaintext operator and preliminarily filter the corresponding data from all data of the respective data sources. After each data set filters the data, the data can be encrypted. The encrypted data is sent to the other data source through the ciphertext SQL, and joint calculation can be performed to determine the intersection from the two encrypted data. The two data sources perform data type conversion based on the corresponding plaintext SQL. After completing the data type conversion, the data sources can perform cryptographic security transmission protocol processing (i.e., the process of encrypting and transmitting to the other data source) on the respective data through the ciphertext SQL. After receiving the encrypted data of the other party, joint calculation can be performed to decrypt the encrypted data. The required query data is output to the output table of the query end through the respective plaintext SQL for display.

[0186] In the embodiment of the present application, when the data of any data source end needs to be queried at the query end, the original data set of the data source end can be converted into a target data set with higher security, the association information between the query task data and the target data set is established, the corresponding execution strategy data is determined, the query operation on the data in the target data set is performed based on the obtained execution strategy data of the query end, the execution result is obtained, and it is determined whether the obtained execution result is correct, so that the process of querying is checked in advance, the security of the data during the actual data exchange between the participating parties is improved, and the technical effect of effectively querying the data under the premise of ensuring the security of the data is achieved, and the technical problem of effectively querying the data under the premise of ensuring the security of the data is solved.

[0187] Embodiment 4

[0188] According to the embodiment of the present application, a data query method for implementing the above-mentioned data query method is also provided. Figure 3 A data verification device for implementing the data verification method shown in the above-mentioned data verification method is also provided.

[0189] Figure 10 is a schematic diagram of a data verification device according to the embodiment of the present application. As shown in the figure, the data verification device 1000 can include a first acquisition unit 1002, a first conversion unit 1004, a first association unit 1006, a first determination unit 1008, and a verification unit 1010. Figure 10

[0190] Here, the first acquisition unit 1002, the first conversion unit 1004, the first association unit 1006, the first determination unit 1008, and the first verification unit 1010 correspond to steps S302 to S310 in the embodiment 1, and the five units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above-mentioned embodiment 1. It should be noted that the above-mentioned units can be hardware components or software components stored in a memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above-mentioned units can also be a part of the device and can run in the computer terminal 10 provided in the embodiment 1.

[0191] According to the embodiment of the present application, a data query method for implementing the above-mentioned data query method is also provided. Figure 4 A data query device for implementing the data query method shown in the above-mentioned data query method is also provided.

[0192] Figure 11 is a schematic diagram of a data query device according to the embodiment of the present application. As shown in the figure, the data query device 2000 can include a second acquisition unit 2002, a second conversion unit 2004, a second association unit 2006, a second determination unit 2008, and a query unit 2010. Figure 11 ​As shown, the data query device 1100 can include a second acquisition unit 1102, a third acquisition unit 1104, and an execution unit 1106.

[0193] The second acquisition unit 1102 is configured to acquire query task data of a query end, where the query task data is used to perform data query on at least one data source end.

[0194] The third acquisition unit 1104 is configured to acquire a verification result corresponding to the query task data, where the verification result is used to at least indicate correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and security of the target data set is higher than that of the original data set.

[0195] The execution unit 1106 is configured to perform data query on the target data set according to the execution strategy data to obtain the execution result, in response to the attribute value of the correctness corresponding to the verification result being higher than an attribute threshold.

[0196] It should be noted that the second acquisition unit 1102, the third acquisition unit 1104, and the execution unit 1106 correspond to steps S402 to S406 in Embodiment 1, and the three units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the units can be hardware components or software components stored in a memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b,..., 102n), or the units can be a part of the device and can run in the computer terminal 10 provided in Embodiment 1.

[0197] According to the embodiments of the present application, a data verification method and a data verification device are also provided. Figure 5 As shown, the data verification method includes the following steps.

[0198] Figure 12 FIG. 12 is a schematic diagram of another data verification device according to the embodiments of the present application. Figure 12 As shown, the data verification device 1200 can include a first receiving unit 1202, a second conversion unit 1204, a second association unit 1206, a second determination unit 1208, a second verification unit 1210, and an output unit 1212.

[0199] The first receiving unit 1202 is configured to query query task data of a query end by calling a first interface, where the query task data is used to perform data query on at least one data source end.

[0200] The second conversion unit 1204 is configured to convert the original data set of the data source end into a target data set, wherein the security of the target data set is higher than that of the original data set.

[0201] The second association unit 1206 is configured to associate the query task data and the target data set to obtain association information.

[0202] The second determination unit 1208 is configured to determine the execution strategy data corresponding to the query task data based on at least the association information.

[0203] The second verification unit 1210 is configured to verify the execution strategy data to obtain a verification result, wherein the verification result is used to at least indicate the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data.

[0204] The output unit 1212 is configured to output the verification result by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter is the verification result.

[0205] It should be noted that the first receiving unit 1202, the second conversion unit 1204, the second association unit 1206, the second determination unit 1208, the second verification unit 1210 and the output unit 1212 correspond to steps S502 to S512 in Embodiment 1, and the six units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above units can be hardware components or software components stored in a memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), or the above units can be a part of the device and can run in the computer terminal 10 provided in Embodiment 1.

[0206] In the data verification device, when the data of any data source end needs to be queried at the query end, the original data set of the data source end can be converted into a target data set with higher security, the association information between the query task data and the target data set is established, the corresponding execution strategy data is determined, and the data in the target data set is queried based on the obtained execution strategy data of the query end to obtain an execution result. It can be judged whether the obtained execution result is correct, so as to achieve the purpose of verifying the query process in advance before querying the data, and improving the security of the data when the data is actually exchanged between the participants. Thus, the technical effect of effectively querying the data under the premise of ensuring the security of the data is achieved, and the technical problem of being unable to effectively query the data under the premise of ensuring the security of the data is solved.

[0207] Embodiment 5

[0208] The embodiment of the present application can provide a computer terminal, which can be any one of computer terminal devices in a computer terminal group. Alternatively, in the embodiment, the computer terminal can be replaced by a mobile terminal or other terminal device.

[0209] Alternatively, in the embodiment, the computer terminal can be located in at least one of a plurality of network devices of a computer network.

[0210] In the embodiment, the computer terminal can execute program codes of the following steps in the data verification method: obtaining query task data of a query end; converting original data sets of a data source end into target data; associating the query task data and the target data sets to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; and verifying the execution strategy data to obtain a verification result.

[0211] Alternatively, Figure 13 is a structural block diagram of a computer terminal according to an embodiment of the present application. As shown in Figure 13 the computer terminal A can include one or more (only one is shown in the figure) processors 1302, a memory 1304, and a transmission device 1306.

[0212] The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data verification method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned data verification method. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, which can be connected to the terminal A through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0213] The processor can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining query task data of a query end; converting original data sets of a data source end into target data; associating the query task data and the target data sets to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; and verifying the execution strategy data to obtain a verification result.

[0214] Optionally, the processor can further execute program codes of the following steps: associating the output information of the query task data and the target data set to obtain association information, wherein the association information is used to indicate that the target data set performs data query, and an execution result obtained by outputting the output information.

[0215] Optionally, the processor can further execute program codes of the following steps: determining the output column of the query task data as the output information.

[0216] Optionally, the processor can further execute program codes of the following steps: performing security labeling on the original data set to obtain the target data set.

[0217] Optionally, the processor can further execute program codes of the following steps: performing security labeling on the fields of the table of the original data set to obtain the target data set.

[0218] Optionally, the processor can further execute program codes of the following steps: determining the execution strategy data based on the association information and the operators of the query task data.

[0219] Optionally, the processor can further execute program codes of the following steps: based on the association information, dividing the operators of the query task data into plaintext operators and / or ciphertext operators, wherein the plaintext operators are used to indicate the calculation task required for performing data query in the data source end, and the ciphertext operators are used to indicate the calculation task required for performing data query between at least two data source ends; determining the execution strategy data corresponding to the plaintext operators and / or the execution strategy data corresponding to the ciphertext operators.

[0220] Optionally, the processor can further execute program codes of the following steps: based on the association information, performing attribution labeling on the data source end to which the operators of the query task data belong to obtain the plaintext operators and / or the ciphertext operators.

[0221] Optionally, the processor can further execute program codes of the following steps: respectively verifying the execution strategy data corresponding to the plaintext operators and the execution strategy data corresponding to the ciphertext operators to obtain a verification result.

[0222] Optionally, the processor can further execute program codes of the following steps: replacing the time variable in the query task data, wherein the replaced query task data is used to perform data query on the data source end according to a target period.

[0223] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; obtaining a verification result corresponding to the query task data, wherein the verification result is used to at least indicate the correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and the security of the target data set is higher than that of the original data set; and in response to an attribute value of the correctness corresponding to the verification result being higher than an attribute threshold, performing data query on the target data set according to the execution strategy data to obtain the execution result.

[0224] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; obtaining a verification result corresponding to the query task data, wherein the verification result is used to at least indicate the correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and the security of the target data set is higher than that of the original data set; and in response to an attribute value of the correctness corresponding to the verification result being higher than an attribute threshold, performing data query on the target data set according to the execution strategy data to obtain the execution result.

[0225] By adopting the embodiment of the present application, a data verification method is provided. In the embodiment of the present application, when the query end needs to query data of any data source end, the original data set of the data source end can be converted into a target data set with higher security, the association information between the query task data and the target data set is established, the corresponding execution strategy data is determined, and the data in the target data set is queried based on the obtained execution strategy data of the query end to obtain an execution result. Whether the obtained execution result is correct can be determined, so that the process of querying data is verified in advance, the security of data during real data exchange between participants is improved, and the technical effect of effectively querying data under the premise of ensuring data security is achieved, and the technical problem of being unable to effectively query data under the premise of ensuring data security is solved.

[0226] Those skilled in the art can understand that, Figure 13The structure shown is only schematic, and the computer terminal A can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 13 This does not limit the structure of the computer terminal A described above. For example, the computer terminal A can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1. Figure 13 Figure 13

[0227] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above-described embodiments can be completed by a program instructing a terminal device-related hardware, and the program can be stored in a computer-readable storage medium, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, etc.

[0228] Embodiment 6

[0229] The embodiments of the present application also provide a computer-readable storage medium. Optionally, in the embodiment, the computer-readable storage medium can be used to store program codes executed by the data verification method provided in Embodiment 1.

[0230] Optionally, in the embodiment, the computer-readable storage medium can be located in any one of a computer terminal group in a computer network, or in any one of a mobile terminal group.

[0231] Optionally, in the embodiment, the computer-readable storage medium is configured to store program codes for performing the following steps: obtaining query task data of a query end; converting an original data set of a data source end into target data; associating the query task data and the target data set to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; and verifying the execution strategy data to obtain a verification result.

[0232] Optionally, the computer-readable storage medium can further execute program codes for performing the following steps: associating output information of the query task data and the target data set to obtain association information, wherein the association information is used to indicate that the target data set executes data query, and an execution result obtained through the output information is output.

[0233] ​​Optionally, the computer readable storage medium can further execute program codes of the following steps: determining the output column of the query task data as the output information.

[0234] Optionally, the computer readable storage medium can further execute program codes of the following steps: performing security labeling on the original data set to obtain the target data set.

[0235] Optionally, the computer readable storage medium can further execute program codes of the following steps: performing security labeling on the fields of the table of the original data set to obtain the target data set.

[0236] Optionally, the computer readable storage medium can further execute program codes of the following steps: determining the execution strategy data based on the association information and the operators of the query task data.

[0237] Optionally, the computer readable storage medium can further execute program codes of the following steps: based on the association information, dividing the operators of the query task data into plaintext operators and / or ciphertext operators, wherein the plaintext operators are used to represent the calculation tasks required for executing the data query in the data source end, and the ciphertext operators are used to represent the calculation tasks required for executing the data query between at least two data source ends; determining the execution strategy data corresponding to the plaintext operators and / or the execution strategy data corresponding to the ciphertext operators.

[0238] Optionally, the computer readable storage medium can further execute program codes of the following steps: based on the association information, performing attribution labeling on the data source end to which the operators of the query task data belong to, to obtain the plaintext operators and / or the ciphertext operators.

[0239] Optionally, the computer readable storage medium can further execute program codes of the following steps: respectively verifying the execution strategy data corresponding to the plaintext operators and the execution strategy data corresponding to the ciphertext operators to obtain the verification result.

[0240] Optionally, the computer readable storage medium can further execute program codes of the following steps: replacing the time variable in the query task data, wherein the replaced query task data is used to execute the data query on the data source end according to the target period.

[0241] As an optional example, the computer readable storage medium is configured to store program code for performing the following steps: obtaining query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; obtaining a verification result corresponding to the query task data, wherein the verification result is used to at least indicate correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and security of the target data set is higher than that of the original data set; and in response to an attribute value of the correctness corresponding to the verification result being higher than an attribute threshold, performing data query on the target data set according to the execution strategy data to obtain the execution result.

[0242] As an optional example, the computer readable storage medium is configured to store program code for performing the following steps: obtaining query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; obtaining a verification result corresponding to the query task data, wherein the verification result is used to at least indicate correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and security of the target data set is higher than that of the original data set; and in response to an attribute value of the correctness corresponding to the verification result being higher than an attribute threshold, performing data query on the target data set according to the execution strategy data to obtain the execution result.

[0243] Embodiment 7

[0244] Embodiments of the present application can provide an electronic device, which can include a memory and a processor.

[0245] Figure 14 is a block diagram of an electronic device according to a data verification method of embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0246] As Figure 14As shown, the device 1400 includes a computing unit 1401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from the storage unit 1408 into a random access memory (RAM) 1403. Various programs and data required for the operation of the device 1400 can also be stored in the RAM 1403. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0247] Various components in the device 1400 are connected to the I / O interface 1405, including an input unit 1406 such as a keyboard, a mouse, etc., an output unit 1404 such as various types of displays, speakers, etc., a storage unit 1408 such as a magnetic disk, an optical disk, etc., and a communication unit 1409 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the device 1400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0248] The computing unit 1401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1401 performs various methods and processes described above, such as the verification method of data. For example, in some embodiments, the verification method of data can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 1408. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 1400 via the ROM 1402 and / or the communication unit 1409. When the computer program is loaded into the RAM 1403 and executed by the computing unit 1401, one or more steps of the verification method of data described above can be performed. Alternatively, in other embodiments, the computing unit 1401 can be configured to perform the verification method of data by any other appropriate means, such as by means of firmware.

[0249] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0250] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions / acts specified in the flowcharts and / or block diagrams to be implemented. The program code can execute entirely on a machine, partly on a machine, partly on a remote machine or entirely on a remote machine or server.

[0251] In the context of the present application, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0252] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0253] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0254] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0255] It should be noted that the above-mentioned sequence numbers of the embodiments of the present application are only for description, not representing the advantages and disadvantages of the embodiments.

[0256] In the above-described embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0257] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.

[0258] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0259] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0260] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0261] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method of checking data, characterized by, The method comprises: obtaining query task data of a query end, wherein the query task data is used for performing data query on at least one data source end; converting an original data set of the data source end into a target data set, wherein the security of the target data set is higher than that of the original data set; associating the query task data and the target data set to obtain association information; determining execution strategy data corresponding to the query task data based on at least the association information; verifying the execution strategy data to obtain a verification result, wherein the verification result is used at least for indicating the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data; wherein the method further comprises: dividing the query task data into different execution steps; splitting operators in the execution steps based on the association information, wherein the operators are used for recording positions of corresponding data in the query task data in the data source end; performing data query on the target data set according to the execution strategy data corresponding to the split operators to obtain the execution result.

2. The method of claim 1, wherein, associating the query task data and the target data set to obtain association information comprises: associating output information of the query task data and the target data set to obtain the association information, wherein the association information is used for indicating that the execution result obtained by performing data query on the target data set is output through the output information.

3. The method of claim 2, wherein, The method further comprises: determining an output column of the query task data as the output information.

4. The method of claim 1, wherein, converting the original data set of the data source end into a target data set comprises: safely marking the original data set to obtain the target data set.

5. The method of claim 4, wherein, safely marking the original data set to obtain the target data set comprises: safely marking fields of a table of the original data set to obtain the target data set.

6. The method of claim 1, wherein, determining execution strategy data corresponding to the query task data based on at least the association information comprises: determining the execution strategy data based on the association information and operators of the query task data.

7. The method of claim 6, wherein, determining the execution strategy data based on the association information and operators of the query task data comprises: based on the association information, dividing the operators of the query task data into plaintext operators and / or ciphertext operators, wherein the plaintext operators are used for indicating calculation tasks required for performing data query in the data source end, and the ciphertext operators are used for indicating calculation tasks required for performing data query between at least two data source ends; determining the execution strategy data corresponding to the plaintext operators and / or the execution strategy data corresponding to the ciphertext operators.

8. The method of claim 7, wherein, based on the association information, dividing the operators of the query task data into plaintext operators and / or ciphertext operators comprises: based on the association information, performing ownership marking on the data source end to which the operators of the query task data belong to obtain the plaintext operators and / or the ciphertext operators.

9. The method of claim 7, wherein, The method further comprises: dividing the ciphertext operators into a plurality of sub-ciphertext operators; The execution strategy data is checked to obtain a checking result, including: the execution strategy data corresponding to the plaintext operator and the execution strategy data corresponding to the ciphertext operator are checked respectively to obtain the checking result.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: The time variable in the query task data is replaced, wherein the replaced query task data is used to perform data query on the data source end according to a target period.

11. A query method of data, characterized by, Including: Obtain query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; Obtain a checking result corresponding to the query task data, wherein the checking result is used to at least indicate the correctness of an execution result obtained by performing data query on a target data set according to execution strategy data corresponding to the query task data, the execution strategy data is determined based on at least an association relationship between the query task data and the target data set, the target data set is converted from an original data set of the data source end, and the security of the target data set is higher than that of the original data set; In response to the attribute value of the correctness corresponding to the checking result being higher than an attribute threshold, perform data query on the target data set according to the execution strategy data to obtain the execution result; The method further includes: determining association information of the query task data based on the association relationship; performing data query on the target data set according to the execution strategy data to obtain the execution result, including: dividing the query task data into different execution steps; splitting operators in the execution steps based on the association information, wherein the operators are used to record positions of corresponding data in the query task data in the data source end; performing data query on the target data set according to the execution strategy data corresponding to the split operators to obtain the execution result.

12. A data checking method, characterized in that, A first interface is called to receive query task data of a query end, wherein the query task data is used to perform data query on at least one data source end; An original data set of the data source end is converted into a target data set, wherein the security of the target data set is higher than that of the original data set; The query task data and the target data set are associated to obtain association information; Execution strategy data corresponding to the query task data is determined based on at least the association information; The execution strategy data is checked to obtain a checking result, wherein the checking result is used to at least indicate the correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data; A second interface is called to output the checking result, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the checking result. The method further comprises: dividing the query task data into different execution steps; splitting an operator in the execution steps based on the association information, wherein the operator is used to record a position of corresponding data in the query task data in the data source end; and performing data query on the target data set according to the execution strategy data corresponding to the split operator to obtain the execution result.

13. A system for checking data, characterized by The system comprises: a query end configured to generate query task data, wherein the query task data is used to perform data query on at least one data source end; the data source end configured to generate an original data set; an engine configured to convert the original data set of the data source end into a target data set, wherein the security of the target data set is higher than that of the original data set; associate the query task data and the target data set to obtain association information; determine execution strategy data corresponding to the query task data based on at least the association information; and check the execution strategy data to obtain a checking result, wherein the checking result is used to at least indicate correctness of an execution result obtained by performing data query on the target data set according to the execution strategy data; The system is further configured to perform the following steps: divide the query task data into different execution steps; split an operator in the execution steps based on the association information, wherein the operator is used to record a position of corresponding data in the query task data in the data source end; and perform data query on the target data set according to the execution strategy data corresponding to the split operator to obtain the execution result.

14. An electronic device, comprising: The system comprises: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, and the computer executable instructions, when executed by the processor, implement steps of the method in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data processing method and device

    CN111984684A

  • Secure multi-party computing method, secure multi-party computing device and electronic equipment

    CN115374457A