A data processing method, device, apparatus, and computer-readable storage medium
By generating a joint query scheme and using a secret sharing algorithm to segment and rewrite sensitive data, an executable subtask is generated. Combining plaintext and ciphertext query methods, the problem of high computational load in multi-party joint queries is solved, and secure and efficient data sharing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, data sharing through multi-party joint queries involves a large amount of computation, resulting in high consumption of computing resources.
A secret sharing algorithm is used to generate a joint query scheme. Sensitive data is then segmented and rewritten through secret sharing execution tasks to generate executable subtasks. Data queries are performed by combining plaintext and ciphertext query methods.
It reduces the computational load of encrypted data retrieval, enables secure data sharing without leaving the local environment, and reduces the consumption of computing resources.
Smart Images

Figure CN114510503B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security, and in particular to a data processing method, apparatus and computer-readable storage medium. Background Technology
[0002] As big data technology matures, the value of data is becoming increasingly apparent, making data sharing to enhance that value ever more important. However, the privacy and security issues arising from data sharing are also receiving increasing attention. Related technical solutions typically employ cryptographic algorithms based entirely on complex computations like obfuscated circuits for data sharing, which suffers from high computational demands. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this application aim to provide a data processing method, apparatus, device, and computer-readable storage medium, which solves the problem of high computational load in related technologies when sharing data through multi-party joint queries, thereby reducing the computational load of data sharing.
[0004] To achieve the above objectives, the technical solution of this application is implemented as follows:
[0005] A data processing method, the method comprising:
[0006] In response to a query request; the query request is used to query data agreed upon by the participating parties for joint querying;
[0007] The query request is parsed to determine whether the query data includes sensitive data;
[0008] If the queried data includes sensitive data, obtain the secret and share it to execute the task;
[0009] Based on the secret sharing, the task is executed to query the sensitive data and display the query results.
[0010] In the above scheme, the step of obtaining the secret sharing execution task includes:
[0011] Based on the data agreed upon by the participating parties for joint querying, a joint query scheme is generated; wherein, the joint query scheme is a scheme for querying the data, including query constraints and processing logic for the task of generating the joint query;
[0012] Based on the joint query scheme and the query request, a secret sharing execution task is generated; wherein, the secret sharing execution task includes a second query condition for joint query generated based on the first query condition in the query request, and a constraint condition for encrypted query by encrypting and decrypting the execution statement of the secret sharing execution task based on the secret sharing algorithm.
[0013] In the above scheme, the step of querying the sensitive data based on the secret sharing includes:
[0014] The secret sharing execution task is segmented and rewritten to generate executable subtasks;
[0015] The executable subtask is executed to query the sensitive data and obtain the query results.
[0016] In the above scheme, a joint query scheme is generated based on the data agreed upon by the participating parties for joint querying, including:
[0017] Based on the data table structure information of the data and the first permission information of the data agreed upon by each participating party, target information for joint query is determined; wherein, the target information includes the structure information of the data table determined after combining each of the data and the first permission information;
[0018] Based on the target information, the processing logic, and the constraints, the joint query scheme is generated.
[0019] In the above scheme, based on the joint query scheme and the query request, a secret sharing execution task is generated, including:
[0020] Obtain the first query condition from the query request;
[0021] Based on the first query condition and the structure information of the data table in the target information, a second query condition for joint query is generated; wherein, the second query condition includes a query statement;
[0022] Based on the second query condition and the constraints in the joint query scheme, the secret sharing execution task is generated.
[0023] In the above scheme, the secret sharing execution task is split and rewritten to generate executable subtasks, including:
[0024] Based on the target information, second permission information is determined for each query statement in the second query condition across the participating parties; wherein, the first permission information includes the second permission information;
[0025] Based on the second permission information and the constraints, the secret sharing execution task is rewritten to obtain the rewritten secret sharing execution task;
[0026] Based on the second permission information, the rewritten secret sharing execution task is split into executable subtasks; wherein, the executable subtasks include plaintext feasibility subtasks and secret sharing executable subtasks.
[0027] In the above scheme, executing the executable subtask to query the sensitive data and obtain the query result includes:
[0028] For the plaintext executable subtask, based on the third query condition of the plaintext executable subtask and the corresponding data, the data is queried in plaintext to obtain the first query result;
[0029] For the secret sharing executable subtask, based on the fourth query condition of the secret sharing executable subtask and the corresponding data, the data is queried in encrypted form to obtain the second query result.
[0030] In the above scheme, before executing the executable subtask to query the sensitive data and obtain the query result, the method further includes:
[0031] Each of the executable subtasks is sent to the data processing device of the corresponding participant where the data is located.
[0032] The method in the above scheme further includes:
[0033] Based on the first query result and / or the second query result executed by each of the executable subtasks, the query result corresponding to the first query condition is obtained.
[0034] A data processing apparatus, the data processing apparatus comprising:
[0035] The acquisition unit is used to respond to a query request; the query request is used to query data agreed upon by the participating parties for joint querying;
[0036] A processing unit is used to parse the query request to determine whether the query data includes sensitive data;
[0037] The acquisition unit is also used to acquire secret sharing execution tasks if the queried data includes sensitive data;
[0038] The processing unit is also configured to query the sensitive data based on the secret sharing to perform the task;
[0039] The display unit is used to show the query results.
[0040] A data processing device, the data processing device comprising: a processor, a memory, and a communication bus;
[0041] The communication bus is used to realize the communication connection between the processor and the memory;
[0042] The processor is used to execute a data processing program in the memory to implement the steps of the data processing method described above.
[0043] A computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the data processing method described above.
[0044] The data processing method, apparatus, device, and computer-readable storage medium provided in the embodiments of this application, in response to a query request; the query request is used to query data agreed upon by the participating parties for joint querying; the query request is parsed to determine whether the query data includes sensitive data; if the query data includes sensitive data, a secret sharing execution task is obtained; the sensitive data is queried based on the secret sharing execution task, and the query results are displayed. Thus, in situations where data does not leave the local environment and secure joint queries are performed to achieve data sharing, the computational load for ciphertext querying is reduced by using a secret sharing algorithm for partial encrypted data querying, rather than using computationally intensive algorithms such as obfuscated circuits for encrypted querying throughout the entire query process. Attached Figure Description
[0045] Figure 1 A flowchart illustrating a data processing method provided in this application embodiment. Figure 1 ;
[0046] Figure 2 A flowchart illustrating a data processing method provided in this application embodiment. Figure 2 ;
[0047] Figure 3 A flowchart illustrating a data processing method provided in this application embodiment. Figure 3 ;
[0048] Figure 4 This application provides a schematic diagram of an implementable segmentation and rewriting process. Figure 1 ;
[0049] Figure 5 This application provides a schematic diagram of an implementable segmentation and rewriting process. Figure 2 ;
[0050] Figure 6 A flowchart illustrating a data processing method provided in this application embodiment. Figure 4 ;
[0051] Figure 7 A flowchart illustrating a data processing method provided in this application embodiment. Figure 5 ;
[0052] Figure 8 A flowchart illustrating a data processing method provided in this application embodiment. Figure 6 ;
[0053] Figure 9(a) is a schematic diagram of a task rewriting provided in an embodiment of this application. Figure 1 ;
[0054] Figure 9(b) is a schematic diagram of a task rewriting provided in an embodiment of this application. Figure 2 ;
[0055] Figure 10 A flowchart illustrating a data processing method provided in this application embodiment. Figure 7 ;
[0056] Figure 11 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0057] Figure 12 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0059] This application provides a data processing method, which is applied in a data processing device, wherein the data processing device can be the respective device of each participant in a joint query, as described above. Figure 1 As shown, the method includes the following steps:
[0060] Step 101: Respond to the query request.
[0061] The query request is used to retrieve data agreed upon by the participating parties for joint queries.
[0062] In this embodiment, the data in the joint query includes data agreed upon by the participating parties that can be queried by other participating parties in a manner that satisfies constraints. From a privacy perspective, the data types included in the joint query are divided into sensitive data and non-sensitive data.
[0063] Step 102: Parse the query request to determine whether the query data includes sensitive data.
[0064] Step 103: If the queried data includes sensitive data, obtain the secret and share it to execute the task.
[0065] In this embodiment of the application, the secret sharing execution task can also be referred to as a secret sharing (SS) execution plan.
[0066] In this embodiment of the application, the Secret Sharing (SS) plan refers to splitting the original data into multiple parts and distributing these parts to multiple participants. Each participant receives only a portion of the original data. One or a few participants cannot reconstruct the original data; the data can only be reconstructed by combining their respective data. Here, the original data used for splitting can be generated using a random number generation algorithm.
[0067] Step 104: Query sensitive data based on secret sharing and display the query results.
[0068] The data processing method provided in the embodiments of this application responds to a query request; the query request is used to query data agreed upon by the participating parties for joint querying; the query request is parsed to determine whether the query data includes sensitive data; if the query data includes sensitive data, a secret sharing execution task is obtained; the sensitive data is queried based on the secret sharing execution task, and the query results are displayed. In this way, it solves the problem of achieving data sharing through secure joint queries without the data leaving the local environment. By employing a secret sharing algorithm for partial encrypted data querying, rather than using computationally intensive algorithms such as obfuscated circuits for encrypted querying throughout the entire query process, the computational load of encrypted data querying is reduced.
[0069] In other embodiments of this application, obtaining the secret sharing execution task in step 103 above can be achieved through methods such as... Figure 2 The steps shown are to be implemented as follows:
[0070] Step 1031: Generate a joint query scheme based on the data agreed upon by each participating party for joint query.
[0071] Among them, the joint query scheme is a scheme for querying data, including the query constraints and the processing logic for the task of generating the joint query.
[0072] In this embodiment, the joint query scheme is a query scheme agreed upon by all participating parties to query each other's data in a manner that satisfies constraints. Here, "data" represents data agreed upon by each participating party that can be queried by other participating parties in a manner that satisfies constraints. From a privacy perspective, the data types contained in the data are divided into sensitive data and non-sensitive data, and different constraints are applied to query different data types. Constraints are conditions used to constrain the execution process of the joint query, including constraints that query sensitive data in encrypted form and non-sensitive data in plaintext form. During the joint query process, tasks can be generated through the processing logic in the joint query scheme to implement the joint query.
[0073] In one feasible implementation, the joint query scheme can also be called a joint query plan. Sensitive and non-sensitive data are defined by each participating party. Taking a joint query between department A and department B as an example, as shown in Tables 1(a) and 1(b), Table 1(a) is the employee table owned by department A, and the data in Table 1(a) is the agreed-upon data for department A's joint query. Table 1(b) is the list of people nationwide who have received a certain vaccine owned by department B, and the data in Table 1(b) is the agreed-upon data for department B's joint query. For both departments A and B, ID card information can be considered sensitive data for all participating parties, while gender information can be considered non-sensitive data.
[0074]
[0075] Table 1(a)
[0076]
[0077] Table 1(b)
[0078] It should be noted that the joint query scheme is based on the technical concept of multi-party secure computation, which aims to break down data silos among parties to achieve data sharing, while ensuring that data from each party does not leave its local area, thereby reducing the security risks brought about by data jointness.
[0079] Step 1032: Based on the joint query scheme and query request, generate a secret sharing execution task.
[0080] The secret sharing execution task includes a second query condition generated based on the first query condition in the query request for a joint query, and constraints for encrypting and decrypting the execution statement of the secret sharing execution task based on the secret sharing algorithm to achieve the encrypted query.
[0081] In this embodiment, in response to a data query request from a participant in a joint query scheme, the data processing device obtains a first query condition from the query request. This first query condition is set by the requesting participant based on their own query needs. The data processing device then transforms the first query condition into a second query condition for querying a table structure that combines the data from all participants. Furthermore, it secretly shares permission information for executing tasks that carries the data required by the second query condition.
[0082] It should be noted that the secret sharing algorithms used include, but are not limited to, arithmetic sharing and Boolean sharing. In practical applications, multiple secret sharing algorithms, such as arithmetic sharing and Boolean sharing, can be combined to obtain the final secret sharing algorithm. For example, multi-party comparisons can be performed on Boolean circuits, and addition and multiplication can be performed on arithmetic circuits. It should be pointed out that arithmetic sharing decomposes and shares a number according to simple mathematical operations, resulting in low computational overhead; Boolean sharing involves taking the value range of elements in arithmetic sharing. Convert to The arithmetic calculation in arithmetic sharing is transformed into an XOR operation, resulting in low computational overhead. In other words, the secret sharing algorithm used in this application has the characteristic of low computational overhead. However, when related technologies fully adopt obfuscated circuits, the secure computation function involving multiple parties is compiled into the form of a Boolean circuit, and the truth table is encrypted and scrambled. This operation has a large computational overhead. Therefore, compared with the related technologies that fully adopt obfuscated circuits, the secret sharing algorithm used in this application has a lower computational load, thereby reducing the computational load of ciphertext lookup.
[0083] In other embodiments of this application, the step 104 above, which involves querying sensitive data based on secret sharing, can be achieved through methods such as... Figure 3 The steps shown are to be implemented as follows:
[0084] Step 1041: Segment and rewrite the secret sharing execution task to generate executable subtasks.
[0085] In this embodiment of the application, the example of a joint query between department A and department B is still used, referring to... Figure 4 As shown, the secret sharing execution task is split and rewritten based on the permission information of the data to be queried according to the second query condition carried in the secret sharing execution task. The multiple executable subtasks obtained after splitting and rewriting are equivalent to the secret sharing execution task. Here, equivalence means that the query results of the secret sharing executable task are consistent with the query results of the multiple executable subtasks after splitting.
[0086] In one feasible implementation, refer to Figure 4 and Figure 5 As shown, by generating an equivalent single directed acyclic graph (DAG) from the secret sharing execution task, and then dividing and rewriting this single DAG to obtain multiple DAG subtasks containing partial ciphertext execution and partial plaintext execution, the set of subtasks composed of ciphertext execution DAG subtasks can also be called the secret sharing DAG (SS-DAG) subgraph set, and the set of subtasks composed of plaintext execution DAG subtasks can also be called the plaintext DAG subgraph set. Each DAG subtask is an executable subtask.
[0087] It's important to note that since the data from each participant remains within their respective local environments, and the secret sharing execution task targets a combined query table derived from the combined data from all participants, the secret sharing execution task needs to be broken down into multiple executable subtasks. Each subtask can then be executed within the local environment of its corresponding data. This approach, by ensuring the query remains within the participant's local environment while still meeting the requirements of the combined query, reduces the security risks associated with data sharing.
[0088] Step 1042: Execute the executable subtask to query sensitive data and obtain query results.
[0089] In this embodiment, the data processing device executes the executable subtask according to the execution conditions of the executable subtask to obtain the query result. The execution conditions of the executable subtask include the query statement within the executable subtask and the constraints for executing the query.
[0090] As can be seen from the above, the data processing method provided in this application embodiment, by formulating a joint query scheme, enables each participating party to conduct joint queries in a manner that meets the constraints, without the data remaining in the local environment. This solves the problem of achieving data sharing through secure joint queries without the data remaining in the local environment. Instead of using computationally intensive algorithms such as obfuscated circuits for the entire query process, the method uses a secret sharing algorithm to perform partial encrypted data queries, thereby reducing the computational load of encrypted data queries.
[0091] In other embodiments of this application, step 1031 above generates a joint query scheme based on the data agreed upon by each participating party for joint querying, which can be achieved through methods such as... Figure 6 The steps shown are to be implemented as follows:
[0092] Step 201: Based on the data table structure information and the first data permission information agreed upon by each participating party, the data processing device determines the target information for joint query.
[0093] The target information includes the structure information of the data table determined by combining each piece of data and the first permission information.
[0094] In this embodiment, the data processing device determines the table structure of the data table used for joint query in the joint query scheme based on the data table structure of each participating party's data. The data table structure information includes the data table name, field information in the table, and relationship information between tables. The data table of the joint query scheme is referred to as the joint query data table below. The permission information of the joint query data table is determined based on the first permission information of the data. The first permission information includes role information and the permission information corresponding to the role. Participants are divided from the perspective of the query role to which they belong when querying the joint query data table. They can be divided into data owners and trusted data parties. The owner of the data corresponding to a field in the joint query data table is the owner of the data corresponding to that field. The owner has no restrictions on querying the data corresponding to the fields they own and can query in plaintext form in a local environment. For fields annotated with "trusted party" by the data owner, the participants annotated as trusted parties are the trusted parties of the data corresponding to that field and can query the authorized fields according to the query permissions granted by the data owner. Data corresponding to fields annotated with "trusted party" by the data owner is non-sensitive data, while data corresponding to fields not annotated with "trusted party" is sensitive data.
[0095] Step 202: The data processing device generates a joint query scheme based on the target information, processing logic, and constraints.
[0096] In this embodiment, a joint query scheme is generated based on the table structure and permission information of the joint query data table, the processing logic for generating the joint query task, and the constraints for the joint query. The joint query scheme can be installed in the local environment of each participating party. When a participating party issues a joint query request, its local data processing device responds to the query request based on the joint query scheme.
[0097] In other embodiments of this application, step 1032 above, generating a secret sharing execution task based on the joint query scheme and query request, can be achieved through methods such as... Figure 7 The steps shown are to be implemented as follows:
[0098] Step 301: The data processing device obtains the first query condition from the query request.
[0099] In this embodiment of the application, the first query condition in the query request is obtained. The first query condition is the query condition set by the party issuing the request according to its own query needs.
[0100] In one feasible implementation, the data is stored in the form of a two-dimensional table, and the query requests sent by the participants are obtained. The query conditions obtained from the query requests can be Structured Query Language (SQL) query conditions.
[0101] Step 302: The data processing device generates a second query condition for joint query based on the first query condition and the structure information of the data table in the target information.
[0102] The second query condition includes the query statement.
[0103] In this embodiment of the application, in response to a request for query data issued by a participant in the joint query scheme, the first query condition in the query request is obtained. The first query condition is a query condition set by the requesting participant according to its own query needs. The data processing device converts the first query condition into a second query condition for querying a table structure composed of data from each participant.
[0104] Step 303: The data processing device generates a secret sharing execution task based on the second query condition and the constraints in the joint query scheme.
[0105] In this embodiment, the data processing device determines the query scope of the joined query data table based on the second query condition as the query scope of the secret sharing execution task. The secret sharing execution task generated according to the constraints is executed in encrypted form after secret sharing (SS). The secret sharing execution task carries the permission information of the joined query data table.
[0106] In other embodiments of this application, step 1041 above, which involves splitting and rewriting the secret sharing execution task to generate executable subtasks, can be achieved through methods such as... Figure 8 The steps shown are to be implemented as follows:
[0107] Step 401: Based on the target information, the data processing device determines the second permission information for each query statement in the second query condition across the participants.
[0108] The first permission information includes the second permission information.
[0109] In this embodiment, the second query condition is generated based on the first query condition and is used to query the joint query data table determined by the data of each participating party. Based on the permission information of the joint query data table in the target information, the second permission information for each query statement in the second query condition is determined. The second permission information includes the role information of the data corresponding to each query statement and the permission information corresponding to the role. The role may include the data owner or a trusted party.
[0110] Step 402: The data processing device rewrites the secret sharing execution task based on the second permission information and constraints, and obtains the rewritten secret sharing execution task.
[0111] In this embodiment of the application, the owner and trusted party of the data queried by the secret sharing execution task are determined according to the role information in the second permission information. Then, according to the permission information and constraints of the owner and trusted party, the secret sharing execution task executed in full ciphertext is rewritten into a processed secret sharing execution task that includes partial ciphertext execution and partial plaintext execution.
[0112] Thus, by rewriting the fully encrypted secret sharing execution task into a partially encrypted and partially plaintext executed secret sharing execution task, the computational load during the query operation is reduced compared to a fully encrypted query.
[0113] In this embodiment of the application, the secret sharing execution task is also called the secret sharing (SS) execution plan. A single directed acyclic graph (DAG) with the equivalent full ciphertext execution is generated according to the SS execution plan. Then, the single DAG is rewritten according to the second permission information to obtain a processed single DAG containing part of ciphertext execution and part of plaintext execution.
[0114] In another feasible implementation, there are two participants, Department A and Department B. The data table structure information for Department A is 'a', and the data table structure information for Department B is 'b'. Department A wants to obtain information through a join query, and the determined second query condition is as follows:
[0115]
[0116] An SS plan is generated based on the second query conditions and the joint query scheme. Then, an equivalent single fully encrypted DAG, as shown in Figure 9(a), is generated based on the SS plan. The single fully encrypted DAG is processed according to the second permission information and constraints, and converted into a DAG with partial ciphertext and partial plaintext. The leaf nodes and root nodes in the single fully encrypted DAG are converted into DAGs executed in plaintext, and the parts involving execution conditions of multiple parties are converted into DAGs executed in ciphertext. The processed single DAG, including partial plaintext and partial ciphertext, is shown in Figure 9(b).
[0117] Step 403: The data processing device splits the rewritten secret sharing execution task into executable subtasks based on the second permission information.
[0118] Among them, executable subtasks include plaintext feasible subtasks and secret sharing executable subtasks.
[0119] In this embodiment of the application, the relationship of the data corresponding to each query condition in the rewritten secret sharing execution task is determined according to the role information in the second permission. The rewritten secret sharing execution task is then split into executable subtasks corresponding to the execution environments of each participant. The execution conditions that need to be executed in ciphertext and the execution conditions that need to be executed in plaintext in the processed secret sharing execution task are matched with the split executable subtasks. The executable subtasks are then split into plaintext feasibility subtasks and secret sharing executable subtasks. The query operation is performed in plaintext form for the plaintext feasibility subtasks and in ciphertext form for the secret sharing executable subtasks.
[0120] In one feasible implementation, the secret sharing execution task is also called the secret sharing (SS) execution plan. A single DAG with full ciphertext execution equivalent to the SS execution plan is generated. Then, the single DAG is rewritten according to the second permission information to obtain a processed single DAG containing part of ciphertext execution and part of plaintext execution. The processed single DAG is split into multiple DAG forms of executable subtasks containing plaintext executable subtasks and ciphertext executable subtasks. These executable subtasks can also be called executable DAG subgraphs.
[0121] Furthermore, the data processing device sends each executable subtask to the data processing device of the corresponding participant where the data is located.
[0122] In the embodiments of this application, the execution subtask is sent to the corresponding data processing device at each moment according to the data device of the participant to which the data queried by each executable subtask belongs.
[0123] In other embodiments of this application, step 1042 above, which executes an executable subtask to query sensitive data and obtain query results, can be achieved through methods such as... Figure 10 The steps shown are to be implemented as follows:
[0124] Step 501: For plaintext executable subtasks, the data processing device performs data queries in plaintext based on the third query condition of the plaintext executable subtask and the corresponding data, and obtains the first query result.
[0125] In this embodiment of the application, the data processing device queries the data stored in the local environment in plaintext form according to the third query condition in the plaintext executable subtask, and obtains the first query result.
[0126] Step 502: For the secret sharing executable subtask, the data processing device performs a data query in encrypted form based on the fourth query condition and the corresponding data of the secret sharing executable subtask, and obtains the second query result.
[0127] In this embodiment of the application, the data processing device queries the data stored in the local environment in encrypted form according to the fourth query condition in the encrypted executable subtask, and obtains the second query result.
[0128] Furthermore, the data processing device obtains the query result corresponding to the first query condition based on the first query result and / or the second query result executed by each executable subtask.
[0129] In this embodiment of the application, the data processing device merges the execution results of each executable subtask to obtain the query result corresponding to the first query condition in the query request issued by the user.
[0130] In a feasible scenario, taking the joint query by Department A and Department B to determine the number of men and women in Department A who have received a certain vaccine and return the result list to Department A as an example, in one feasible implementation, as shown in Tables 1(a) and 1(b), Table 1(a) is the employee table owned by Department A, and the data in Table 1(a) is the agreed data of Department A; Table 1(b) is the national list of people who have received a certain vaccine owned by Department B, and the data in Table 1(b) is the agreed data of Department B. Tables 1(a) and 1(b) are very private to Department A and Department B respectively, and cannot be jointly queried outside the local area. Moreover, the amount of data in the agreed data in Table 1(b) is very large, with more than one billion data records.
[0131] The technical solution described in this application specification enables joint privacy queries in big data scenarios, specifically dividing the query into two parts: plaintext query and secret-sharing query.
[0132] a) Based on the ID number, a join operation is performed using secret sharing. A join is a database query method used to connect two or more tables in a database. It should be noted that since the ID number spans both Table 1(a) and Table 1(b), and this attribute is sensitive for both tables, the data under this attribute is defined as sensitive data; therefore, secret sharing is used for encrypted querying.
[0133] b. After department A obtains the query results of the aforementioned join operation, it performs an aggregation operation on the gender attribute in Table 1(b) locally using a plaintext query method to retrieve the data. It should be noted that since the data in the gender attribute of Table 1(b) is local, this operation can be performed locally in department A using a plaintext query.
[0134] The data processing method provided in this application, by formulating a joint query scheme, enables each participating party to perform encrypted queries on the data of other participating parties in a manner that meets the constraints, without leaving their local environment, in order to obtain the required results. This solves the problem of using a secret sharing algorithm to perform partial encrypted data queries when data does not leave the local environment and secure joint queries are performed to achieve data sharing, instead of using computationally intensive algorithms such as obfuscated circuits for encrypted queries throughout the entire query process. Furthermore, the query operation is divided into encrypted queries and plaintext queries instead of weighted encrypted queries, thereby reducing the computational load of encrypted data queries.
[0135] Based on the foregoing embodiments, embodiments of this application provide a data processing apparatus that can be applied to... Figure 1 In the data processing method provided in the corresponding embodiment, refer to Figure 11 As shown, the data processing device 600 may include:
[0136] The acquisition unit 601 is used to respond to a query request; the query request is used to query data agreed upon by the participating parties for joint query.
[0137] Processing unit 602 is used to parse the query request to determine whether the query data includes sensitive data;
[0138] The acquisition unit 601 is used to acquire secret sharing to perform tasks if the queried data includes sensitive data.
[0139] Processing unit 602 is used to query sensitive data based on secret sharing to perform tasks;
[0140] Display unit 603 is used to display query results.
[0141] In other embodiments of this application, the acquisition unit 601 is further configured to perform the following steps:
[0142] Based on the data agreed upon by all participating parties for joint queries, a joint query scheme is generated; wherein, the joint query scheme is a scheme for querying data, including query constraints and processing logic for the task of generating joint queries;
[0143] Based on the joint query scheme and query request, a secret sharing execution task is generated; wherein, the secret sharing execution task includes a second query condition for joint query generated based on the first query condition in the query request, and a constraint condition for encrypting and decrypting the execution statement of the secret sharing execution task based on the secret sharing algorithm to realize the encrypted query.
[0144] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0145] The secret sharing execution task is split and rewritten to generate executable subtasks;
[0146] Execute an executable subtask to query sensitive data and obtain query results.
[0147] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0148] Based on the data table structure information and the first permission information of the data agreed upon by each participating party, the target information for joint query is determined; wherein, the target information includes the structure information and first permission information of the data table determined after combining each piece of data;
[0149] Based on the target information, processing logic, and constraints, a joint query scheme is generated.
[0150] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0151] Retrieve the first query condition from the query request;
[0152] Based on the first query conditions and the structural information of the data table in the target information, a second query condition for the joint query is generated; wherein, the second query condition includes a query statement;
[0153] Based on the second query condition and the constraints in the joint query scheme, a secret sharing execution task is generated.
[0154] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0155] Based on the target information, determine the second permission information for each query statement in the second query condition across the participants; wherein, the first permission information includes the second permission information;
[0156] Based on the second permission information and constraints, the secret sharing execution task is rewritten to obtain the rewritten secret sharing execution task.
[0157] Based on the second permission information, the rewritten secret sharing execution task is broken down into executable subtasks; among them, the executable subtasks include plaintext feasibility subtasks and secret sharing executable subtasks.
[0158] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0159] For plaintext executable subtasks, based on the third query condition of the plaintext executable subtask and the corresponding data, data is queried in plaintext to obtain the first query result;
[0160] For the secret-shared executable subtask, based on the fourth query condition of the secret-shared executable subtask and the corresponding data, the data is queried in encrypted form to obtain the second query result.
[0161] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0162] Each executable subtask is sent to the data processing device of the participating party where the corresponding data is located.
[0163] In other embodiments of this application, the processing unit 602 is further configured to perform the following steps:
[0164] Based on the first query result and / or the second query result executed by each executable subtask, the query result corresponding to the first query condition is obtained.
[0165] It should be noted that the interaction process between the units in the embodiments of this application can be referred to Figure 1 The implementation process of the data processing method provided in the corresponding embodiments will not be described in detail here.
[0166] The data processing apparatus provided in this application responds to a query request; the query request is used to query data agreed upon by the participating parties for joint querying; the query request is parsed to determine whether the query data includes sensitive data; if the query data includes sensitive data, a secret sharing execution task is obtained; the sensitive data is queried based on the secret sharing execution task, and the query results are displayed. In this way, it solves the problem of achieving data sharing through secure joint queries without the data leaving the local environment. By employing a secret sharing algorithm for partial encrypted data querying, rather than using computationally intensive algorithms such as obfuscated circuits for encrypted querying throughout the entire query process, the computational load for encrypted data querying is reduced.
[0167] Based on the foregoing embodiments, embodiments of this application provide a data processing device that can be applied to... Figure 1 In the data processing method provided in the corresponding embodiment, refer to Figure 12 As shown, the data processing device 700 includes: a processor 701, a memory 702, and a communication bus 703;
[0168] Communication bus 703 is used to realize the communication connection between processor 701 and memory 702;
[0169] The processor 701 executes the data processing program stored in the memory 702 to perform the following steps:
[0170] Responding to a query request; the query request is used to retrieve data agreed upon by the participating parties for joint queries;
[0171] Parse the query request to determine if the queried data includes sensitive data;
[0172] If the queried data includes sensitive data, obtain the secret and share it to execute the task;
[0173] Based on secret sharing, perform tasks to query sensitive data and display the query results.
[0174] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0175] Based on the data agreed upon by all participating parties for joint queries, a joint query scheme is generated; wherein, the joint query scheme is a scheme for querying data, including query constraints and processing logic for the task of generating joint queries;
[0176] Based on the joint query scheme and query request, a secret sharing execution task is generated; wherein, the secret sharing execution task includes a second query condition for joint query generated based on the first query condition in the query request, and a constraint condition for encrypting and decrypting the execution statement of the secret sharing execution task based on the secret sharing algorithm to realize the encrypted query.
[0177] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0178] The secret sharing execution task is split and rewritten to generate executable subtasks;
[0179] Execute an executable subtask to query sensitive data and obtain query results.
[0180] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0181] Based on the data table structure information and the first permission information of the data agreed upon by each participating party, the target information for joint query is determined; wherein, the target information includes the structure information and first permission information of the data table determined after combining each piece of data;
[0182] Based on the target information, processing logic, and constraints, a joint query scheme is generated.
[0183] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0184] Retrieve the first query condition from the query request;
[0185] Based on the first query conditions and the structural information of the data table in the target information, a second query condition for the joint query is generated; wherein, the second query condition includes a query statement;
[0186] Based on the second query condition and the constraints in the joint query scheme, a secret sharing execution task is generated.
[0187] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0188] Based on the target information, determine the second permission information for each query statement in the second query condition across the participants; wherein, the first permission information includes the second permission information;
[0189] Based on the second permission information and constraints, the secret sharing execution task is rewritten to obtain the rewritten secret sharing execution task.
[0190] Based on the second permission information, the rewritten secret sharing execution task is broken down into executable subtasks; among them, the executable subtasks include plaintext feasibility subtasks and secret sharing executable subtasks.
[0191] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0192] For plaintext executable subtasks, based on the third query condition of the plaintext executable subtask and the corresponding data, data is queried in plaintext to obtain the first query result;
[0193] For the secret-shared executable subtask, based on the fourth query condition of the secret-shared executable subtask and the corresponding data, the data is queried in encrypted form to obtain the second query result.
[0194] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0195] Each executable subtask is sent to the data processing device of the participating party where the corresponding data is located.
[0196] In other embodiments of this application, processor 701 is used to execute a data processing program in memory 702 to perform the following steps:
[0197] Based on the first query result and / or the second query result executed by each executable subtask, the query result corresponding to the first query condition is obtained.
[0198] It should be noted that a detailed description of the steps performed by the processor can be found in [reference needed]. Figure 1 The description of the data processing method provided in the corresponding embodiments will not be repeated here.
[0199] The data processing device provided in this application embodiment, by formulating a joint query scheme, enables each participating party to perform encrypted queries on the data of other participating parties in a manner that meets the constraints, without leaving the local environment with the data they possess, thereby obtaining the required results. This solves the problem of using a secret sharing algorithm to perform partial encrypted data queries when data does not leave the local environment and secure joint queries are performed to achieve data sharing, rather than using a computationally intensive algorithm such as a scrambling circuit for encrypted queries throughout the entire query process, thus reducing the computational load of encrypted data queries.
[0200] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement... Figure 1 The steps in the data processing method provided in the corresponding embodiment.
[0201] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0202] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0203] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0204] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0205] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data acquisition device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data acquisition device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0206] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data acquisition device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0207] These computer program instructions can also be loaded onto a computer or other programmable terminal, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0208] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A data processing method, characterized by, The method comprises: in response to a query request; the query request is used to query the data agreed by each participant for joint query; parsing the query request to determine whether the query data includes sensitive data; if the query data includes sensitive data, obtain a secret sharing execution task; wherein the secret sharing execution task includes an executable subtask, and the executable subtask includes a plaintext feasibility subtask and a secret sharing executable subtask; query the sensitive data based on the secret sharing execution task, and display the query result; wherein the plaintext feasibility subtask is to execute the query operation in plaintext form, and the secret sharing executable subtask is to execute the query operation in ciphertext form; wherein obtaining a secret sharing execution task comprises: generating a secret sharing execution task based on a joint query scheme and the query request; the secret sharing execution task includes a second query condition for joint query generated based on a first query condition in the query request, and a constraint condition for ciphertext query by encrypting and decrypting the execution statement of the secret sharing execution task based on a secret sharing algorithm; the first query condition is a query condition set by the requesting participant according to its own query needs, and the second query condition is the first query condition converted into a query condition for querying the table structure combined with the data of each participant.
2. The method of claim 1, wherein, The secret sharing execution task is obtained, comprising: generating a joint query scheme based on the data agreed by each participant for joint query; wherein the joint query scheme is a scheme for querying the data, including the constraint condition and the processing logic for generating the joint query task.
3. The method of claim 2, wherein, The secret sharing execution task is queried based on the sensitive data, comprising: splitting and rewriting the secret sharing execution task to generate an executable subtask; execute the executable subtask to query the sensitive data to obtain the query result.
4. The method of claim 3, wherein, The joint query scheme is generated based on the data agreed by each participant for joint query, comprising: based on the data table structure information of the data and the first permission information of the data agreed by each participant, determine the target information for joint query; wherein the target information includes the structure information of the data table determined after jointing each data and the first permission information; based on the target information, the processing logic and the constraint condition, generate the joint query scheme.
5. The method of claim 4, wherein, The secret sharing execution task is generated based on the joint query scheme and the query request, comprising: obtain the first query condition from the query request; generate the second query condition for joint query based on the first query condition and the structure information of the data table in the target information; wherein the second query condition includes a query statement; generate the secret sharing execution task based on the second query condition and the constraint condition in the joint query scheme.
6. The method of claim 4, wherein, The secret sharing execution task is split and rewritten to generate an executable subtask, comprising: Determine second permission information of each query statement in the second query condition of the participant based on the target information; wherein the first permission information comprises the second permission information; Rewrite the secret sharing execution task based on the second permission information and the constraint condition to obtain the rewritten secret sharing execution task; Split the rewritten secret sharing execution task based on the second permission information to obtain the executable subtask.
7. The method of claim 6, wherein, The execution of the executable subtask to query the sensitive data to obtain the query result comprises: For the plaintext executable subtask, based on the third query condition of the plaintext executable subtask and the corresponding data, the data query is performed in plaintext to obtain the first query result; For the secret sharing executable subtask, based on the fourth query condition of the secret sharing executable subtask and the corresponding data, the data query is performed in ciphertext to obtain the second query result.
8. The method of claim 3, wherein, Before the execution of the executable subtask to query the sensitive data to obtain the query result, it further comprises: Send each executable subtask to the data processing device of the participant where the corresponding data is located.
9. The method of claim 7, wherein, The method further comprises: Based on the first query result and / or the second query result executed by each executable subtask, obtain the query result corresponding to the first query condition.
10. A data processing apparatus, characterized by, The device comprises: An acquisition unit for responding to a query request; the query request is used to query the data agreed by each participant for joint query; A processing unit for parsing the query request to determine whether the query data includes sensitive data; The acquisition unit is also used to acquire a secret sharing execution task if the query data includes sensitive data; wherein the secret sharing execution task comprises an executable subtask, and the executable subtask comprises a plaintext executable subtask and a secret sharing executable subtask; The processing unit is also used to query the sensitive data based on the secret sharing execution task; wherein the plaintext executable subtask is executed in plaintext form to perform query operation, and the secret sharing executable subtask is executed in ciphertext form to perform query operation; A display unit for displaying the query result; The acquisition unit is also used to generate a secret sharing execution task based on a joint query scheme and the query request; the secret sharing execution task comprises a second query condition for joint query generated based on a first query condition in the query request, and a constraint condition for realizing ciphertext query by encrypting and decrypting the execution statement of the secret sharing execution task based on a secret sharing algorithm; the joint query scheme is a scheme for querying the data; the first query condition is a query condition set by the participant who issues the request according to its own query needs, and the second query condition is a query condition for querying a table structure combined with the data of each participant.
11. A data processing device, characterized by Comprise: A processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is configured to execute a data processing program in the memory to implement the steps of the data processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the data processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Query optimization method, device and system for multi-party security database
CN112860738A