Method and device for connecting data table

By generating a one-time connection token, using punctureable pseudo-random functions and exclusive OR operations, the problem of abuse of authorization in the multi-key connection scheme is solved, and secure connection and leakage prevention of data tables are achieved.

CN120238314APending Publication Date: 2025-07-01ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510395355.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

Existing multi-key connection solutions cannot prevent the misuse or reselling of connection authorizations, resulting in the risk of reuse of connection authorizations for data owners and data breaches.

Method used

By generating a one-time connection token, using punctureable pseudo-random functions and exclusive OR operations, combining the plaintext attributes and random values ​​of the data table, the connection index is constructed and sent to the server, and the server verifies the uniqueness of the token to prevent reuse.

Benefits of technology

It effectively avoids the reuse and reselling of connection authorization, protects the data security of data owners, and prevents data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238314A_ABST
    Figure CN120238314A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and equipment for connecting data tables, and the method comprises the steps: a first party / second party obtains a local random value, constructs a quadratic curve according to the plaintext attribute in the local data table, determines a plurality of points from the quadratic curve, determines a local merged value according to the coordinates of the points, and stores the local merged value; inputting the local secret key and the local random value into an evaluation result of a preset evaluation function, carrying out XOR on the evaluation result and the local combined value to obtain a local encrypted value, and sending the local random value and the local encrypted value to a server; in response to a connection request of a second party, the first party obtains a first token and sends the first token to the second party according to a puncture function corresponding to the evaluation function and a secret key of the party; the second party obtains a second token according to the puncture function and the secret key of the second party and sends the first token and the second token to the server; and the server determines a connection result set of the first party data table and the second party data table according to the random value and the encrypted value of the first party, the first token, the random value and the encrypted value of the first party and the second token.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the technical field of databases, and in particular, relate to a method and device for connecting data tables. Background Art

[0002] A relational database is a database management system based on a relational model, which organizes and stores data in a two-dimensional table (Table) structure composed of rows and columns, and represents the relationship between data through the association relationship between tables. In a relational database, a join between tables is an operation that combines related data in two or more tables, with the aim of obtaining more complete and meaningful information from multiple tables. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and device for connecting data tables. In the scenario of performing a join operation on tables encrypted with different keys, the data owner can send a one-time authorized connection token according to the connection request of the data requester. The server can verify whether the connection authorization has not been used through the connection token provided by the data owner, thereby avoiding the reselling or abuse of the data owner's connection authorization caused by the repeated use of the same token, and solving the deficiencies of the prior art.

[0004] To achieve the above purpose, the first aspect of this specification provides a method for connecting data tables, including: the first party participating in the connection generates a first key and obtains a first random value, constructs a first quadratic curve according to the first attribute in plaintext of the first record in the first table, determines a first combined value according to the coordinates of multiple first points in the first quadratic curve, performs an exclusive OR operation on the evaluation result obtained by inputting the first key and the first random value into a preset evaluation function and the first combined value to obtain a first value, and sends the first random value and the first value to the server; the second party participating in the connection generates a second key and obtains a second random value, constructs a second quadratic curve according to the second attribute in plaintext of the second record in the second table, determines a second combined value according to the coordinates of multiple second points in the second quadratic curve, performs an exclusive OR operation on the evaluation result obtained by inputting the second key and the second random value into the evaluation function and the second combined value to obtain a second value; sends the second random value and the second value to the server; the first party obtains a first token according to the puncturing function corresponding to the evaluation function and the first key and sends it to the second party; the second party obtains a second token according to the puncturing function and the second key and sends the first token and the second token to the server; the server determines the connection result set of the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value, and the second token.

[0005] The second aspect of this specification provides a computing device, including: a processor; and a memory, where a program is stored. When the processor executes the executable code, the method described in the first aspect is implemented.

[0006] In the solution for connecting data tables provided in the embodiments of this specification, the first party participating in the connection can obtain its own random value, construct a quadratic curve according to the plaintext attributes in its own data table, and determine its own coordinate merging value according to the coordinates of multiple points in the quadratic curve. The evaluation result of inputting its own secret key and its own random value into a preset evaluation function is XORed with its own coordinate merging value to obtain its own encrypted value, and its own random value and its own encrypted value are sent to the server. Similarly, for example, the second party participating in the connection can obtain its own random value, construct a quadratic curve according to the plaintext attributes in its own data table, and obtain its own coordinate merging value according to the quadratic curve, and then obtain its own encrypted value, and send its own random value and its own encrypted value to the server. Then, the first party can, in response to the connection request of the second party, obtain a one-time first-party token according to the puncturing function corresponding to the evaluation function and its own secret key and send it to the second party; the second party can obtain a second-party token according to the puncturing function and its own secret key and send the first token and the second token to the server. Thereafter, the server can determine the connection result set of the first table and the second table according to the random value and encrypted value of the first party, the first-party token, the random value and encrypted value of the first party, and the second-party token. Through this method, in the scenario of connecting tables encrypted with different secret keys, the data owner can send a one-time authorized connection token according to the connection request of the data requester, and the server can verify whether the connection authorization has not been used through the connection token provided by the data owner, thereby avoiding the repeated use of the same token, and can solve the problem that the connection authorization of the data owner is resold or abused. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0008] Figure 1 Schematic diagram showing a multi-secret-key data table connection scheme;

[0009] Figure 2 Schematic diagram of a method for connecting data tables in an embodiment of this specification;

[0010] Figure 3 Flowchart of a method for connecting data tables in an embodiment of this specification;

[0011] Figure 4 It is a schematic diagram of a method for connecting data tables in another embodiment of this specification;

[0012] Figure 5 It is a schematic diagram for determining whether to perform a connection according to the corresponding record of a one-time token and data in an embodiment of this specification. Detailed implementation manners

[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all of them. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.

[0014] To more clearly elaborate on a method for connecting data tables provided in this specification, some core concepts related to this method will be briefly described first.

[0015] A relational database is a database management system based on the relational model. It organizes and stores data in a two-dimensional table structure composed of rows and columns, and reflects the relationships between data through the association relationships between tables. Table: It is the basic unit for data storage in a relational database, composed of rows (also called records) and columns (also called fields or attributes). For example, a "student" table may contain columns such as student ID, name, and class, and each row represents the information of a specific student. Row: Each row represents a unique entity instance and contains the values of the entity on various attributes. For example, in the "student" table, a certain row may record the information of a student with "student ID 001, name Zhang San, class 1". Column: Each column represents an attribute of the entity, and all rows have the same data type in the same column. For example, in the "class" column of the "student" table, all data are of text type.

[0016] Join. For relational databases, the join between tables is an operation that combines related data from two or more tables, with the aim of obtaining more complete information from multiple tables. For example, there are a student table and a course selection table in the database. The student table is used to store basic information of students, which includes two fields, such as student ID (StudentID) and student name (StudentName). The course selection table is used to store the course selection situations of students, which contains three fields, namely selection record ID (SelectionID), student ID (StudentID), and selected course name (CourseName). To find out which students have selected courses and the names of the courses they have selected, a join operation can be used to obtain relevant information from the student table and the course selection table. For example, a join operation is performed based on the student ID (StudentID) field that both tables include, resulting in a query result table. The query result table includes two fields, such as student name (StudentName) and selected course name (CourseName). Through this table, it can be determined which students have selected courses and the names of the courses they have selected.

[0017] Managed database encryption scheme. For users with limited local data processing capabilities, their data can be stored in a database server outside their own side. For example, it is stored on a database server controlled by a DBMS (Database Management System) service provider. Subsequently, users often query data through the server while maintaining the confidentiality of their sensitive data. Therefore, these users can encrypt the data before outputting it to a database server outside their own side, and this scheme is also called a managed database encryption scheme.

[0018] As mentioned above, in a relational database, scattered information in different data tables can be aggregated by using a join query. Specifically, through the join operation, two input records from two tables can be combined into an output record if and only if they share a common join attribute. In existing join schemes for encrypted databases, usually, after the server obtains an authorization token generated according to the user's key, it can perform an equi-join operation on two or more data tables in the encrypted database to obtain a join result. According to the different data sources, the encrypted database join scheme can also be divided into a single-key join scheme and a multi-key join scheme. The single-key join scheme only supports the equi-join operation between two data tables (from the same data owner) encrypted with the same key (or the same token generated according to the key). The multi-key join scheme supports the equi-join operation between two data tables (from different data owners) encrypted with different keys (or different tokens generated according to different keys).

[0019] However, the existing multi-key connection schemes also have the following problems, namely, the problem that connection authorization cannot be prevented from being abused or resold. Figure 1 A schematic diagram showing a multi-key data table connection scheme. In the scenario as Figure 1 shown: For example, Factory A encrypts the R & D cycle record table of its own products with its own key, and then uploads the encrypted data to the database server for storage. Research institution B stores in the database server a data table of the total sales cycles of various products on the market at all levels obtained through legal channels encrypted with its own key. Research institution B hopes to study the relationship between the R & D cycle and the total sales cycle of a specific product category. Therefore, it hopes to perform a connection between the R & D cycle record table and the total sales cycle table. Research institution B can pay a fee to Factory A, so that Factory A issues an authorization token to Research institution B with its own key, and then Research institution B forwards this authorization token to the database server, so that the database server can perform the connection of the two tables according to this authorization token.

[0020] However, the problems of this scheme are as follows: First, for example, the authorized Party B can initiate connection operations without restriction at any time after obtaining the authorized connection token, so that Party A, the data owner, cannot control the number of times its own data is queried, that is, it cannot prevent the abuse of connection authorization. Second, it is impossible to prevent Party B from reselling Party A's authorization token to other untrusted parties (such as third party C), so that other parties can, for example, cause the risk of leakage of Party A's data by querying and comparing valid data multiple times, while Party A, the data owner, has no idea that its authorization has been resold.

[0021] To solve the above problems. The embodiments of this specification provide a method for connecting data tables. Figure 2 It is a schematic diagram of a method for connecting data tables in an embodiment of this specification. As Figure 2 shown, for example, the first party participating in the connection can obtain its own connection index according to the plaintext attributes in its own data table, a preset evaluation function, its own key, and its own random value, and send it to the server. Similarly, for example, the second party participating in the connection can also obtain its own connection index according to the plaintext attributes in its own data table, a preset evaluation function, its own key, and its own random value, and send it to the server. Then, the first party can, in response to the connection request of the second party, obtain a one-time first party token according to the puncturing function corresponding to the evaluation function and its own key, and send it to the second party; the second party can then obtain a second party token according to this puncturing function and its own key, and send the first token and the second token to the server. The server can determine the connection result set of the first table and the second table according to the connection indexes of the first party and the second party, the first party token, and the second party token, and send the connection result set to the second party

[0022] The advantages of this method are as follows: The data authorizer can use a preset puncturable random function (i.e., the puncturing function) to generate a random one-time token. The data authorizee can send this token and its own token to the server, enabling the server to initiate a connection between different tables encrypted with different keys (coming from the data authorizer and the data authorizee respectively) based on this token. Since the tokens authorized by the data authorizer each time are different, the server can verify whether the token has been used based on this inconsistency, thereby avoiding the reuse of the same token, and can avoid the problem of the authorized token of the data authorizer being resold or misused, protecting the security of the data of the data authorizer.

[0023] Next, a method for connecting data tables provided in the embodiments of this specification will be further described. Figure 3 It is a flowchart of a method for connecting data tables in an embodiment of this specification. As Figure 3 shown, this method at least includes the following steps:

[0024] Step S301: The first party participating in the connection obtains a first random value, constructs a first quadratic curve according to the first attribute of the plaintext in the first record of the first table, determines a first combined value based on the coordinates of multiple first points in the first quadratic curve, performs an exclusive OR operation on the evaluation result obtained by inputting the first key and the first random value of this party into a preset evaluation function with the first combined value to obtain a first value, and sends the first random value and the first value to the server;

[0025] Step S303: The second party participating in the connection obtains a second random value, constructs a second quadratic curve according to the second attribute of the plaintext in the second record of the second table, determines a second combined value based on the coordinates of multiple second points in the second quadratic curve, performs an exclusive OR operation on the evaluation result obtained by inputting the second key and the second random value of this party into the evaluation function with the second combined value to obtain a second value; sends the second random value and the second value to the server;

[0026] Step S305: In response to the connection request of the second party, the first party obtains a first token according to the puncturing function corresponding to the evaluation function and the first key and sends it to the second party; the second party obtains a second token according to the puncturing function and the second key and sends the first token and the second token to the server;

[0027] Step S307: The server determines the connection result set of the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value, and the second token.

[0028] First, in step S301, the first party participating in the connection obtains a first random value and constructs a first quadratic curve according to the first attribute of the plaintext in the first record of the first table.

[0029] In different embodiments, the process of constructing the first conic according to the first attribute may vary. According to one embodiment, the first attribute of the plaintext in the first record of the first table can be mapped to multiple third points in a two-dimensional space, and the first conic is constructed based on the multiple third points; in a specific embodiment, the first attribute of the plaintext in the first record of the first table can be mapped to multiple first points in a two-dimensional space through multiple preset collision-resistant hash functions. In a specific embodiment, the second attribute of the plaintext in the second record of the second table can be mapped to multiple second points in a two-dimensional space through multiple preset collision-resistant hash functions.

[0030] In a specific example, for instance, the first party U1 locally stores the R table containing plaintext data, and U1 can encrypt the confidential attribute column A of the plaintext in the R table and then upload it. Specifically, for each record r in the R table i , according to the plaintext m of the A attribute of this record i , calculate three points P1, P2, and P3 in the two-dimensional space, whose coordinates are respectively (H1(m i ), H2(m i ))), (H3(m i ), H4(m i ))), (H5(m i ), H6(m i ))). Among them, H1 to H6 are preset collision-resistant hash functions. Furthermore, for example, the Lagrange interpolation formula can be used to construct a quadratic curve f(x) passing through P1, P2, and P3.

[0031] The evaluation function refers to the evaluation function contained in the Puncturable Pseudorandom Function (PPRF). A puncturable pseudorandom function is a pseudorandom function with puncturability. The difference between it and an ordinary pseudorandom function is that an ordinary pseudorandom function can output a corresponding pseudorandom value for each input value, while a puncturable pseudorandom function can output an output value with special properties for a specific input value, and for other input values, it is similar to an ordinary pseudorandom function and outputs the corresponding pseudorandom value. In one example, a puncturable pseudorandom function may include a key generation function F.KeyGen, a puncturing function F.Puncture, and an evaluation function F.Eval. Among them, the key generation function can be used to generate an initial key according to an input such as a security strength parameter. The puncturing function is used to generate a punctured key according to the initial key generated by the key generation function and a puncturing value. The evaluation function can determine whether the puncturing value corresponding to the punctured key is equal to the input value according to the input punctured key and input value. If the two are equal, it outputs a specific value (⊥); if the two are not equal, it outputs the pseudorandom number corresponding to the initial key and the input value. It can also output the pseudorandom number corresponding to the initial key and the input value according to the input initial key and input value.

[0032] Therefore, after obtaining the first quadratic curve, the first merging value can be determined according to the coordinates of multiple first points in the first quadratic curve. The evaluation result obtained by inputting the first key and the first random value of the local party into the preset evaluation function is XOR-operated with the first merging value to obtain the first value. In the example of determining the quadratic curve f(x) twice above, for example, two points can be randomly selected on the curve f(x), and their coordinates are (x1, y1) and (x2, y2) respectively. Then, the evaluation result obtained by inputting the first key and the first random value of the local party into the preset evaluation function is XOR-operated with the first merging value to obtain the first value. In a specific example, it can be expressed as Among them, is the first value, F.Eval() is the preset evaluation function, ⊕ is the XOR operation, K R is the local party's key (the first key, which can be generated by the key generation function F.KeyGen, for example), is the first random value. || is the merging operation, x1||x2||y1||y2 is the first merging value, and in a specific example, it can be obtained by concatenating the values of x1, x2, y1, and y2, for example.

[0033] After obtaining the first value, the first random value and the first value can be sent to the server. The server refers to a database server where multiple parties participating in the data table connection can save and obtain data. According to one embodiment, it can be a database server controlled by a DBMS (Database Management System) service provider. In different specific embodiments, the database server can be different specific types of servers, which are not limited in this specification. In a specific example, for instance, it can be one of a physical server, a logical server, or a cloud server.

[0034] Since the first random value and the first value are used to determine the connection result related to the first table in subsequent steps, the first random value and the first value can also be referred to as the connection index of the first record of the first table. According to one embodiment, the connection indexes of all records of the first table can form the connection index of the first table. According to a specific embodiment, after the first party generates the connection indexes of all records of the first table, the connection indexes of the first table can be sent to the server.

[0035] Then, in step S303, the second party participating in the connection can obtain a second random value, construct a second quadratic curve according to the second attribute in plaintext of the second record of the second table. Determine the second merge according to the coordinates of multiple second points in the second quadratic curve

[0036] Similar to the first party constructing the first quadratic curve, in a specific embodiment, the second party can map the second attribute in plaintext of the second record of the second table to multiple fourth points in a two-dimensional space, and construct a second quadratic curve according to the multiple fourth points.

[0037] In a specific example, for instance, the first party U2 locally stores the S table containing plaintext data, and U2 can encrypt the confidential attribute column B of the plaintext in the S table and then upload it. Specifically, for each record s in the S table i , according to the plaintext of the B attribute of this record calculate three points Q1, Q2, and Q3 located in a two-dimensional space, and their coordinates are respectively where H1 to H6 are preset collision-resistant hash functions. Furthermore, for example, a quadratic curve g(x) passing through Q1, Q2, and Q3 can be constructed using the Lagrange interpolation formula.

[0038] Therefore, after obtaining the second quadratic curve, the second combined value can be determined based on the coordinates of multiple second points in the second quadratic curve. The evaluation result obtained by inputting the second secret key and the second random value of the local party into the evaluation function is XOR-operated with the second combined value to obtain the second value. In the example of determining the quadratic curve g(x) above, for example, two points can be randomly selected on the curve g(x), and their coordinates are (x′1, y′1) and (x′2, y′2) respectively. Then, the evaluation result obtained by inputting the second secret key and the second random value of the local party into the preset evaluation function is XOR-operated with the second combined value to obtain the second value. In a specific example, this processing process can be expressed as where is the second value, F.Eval() is the preset evaluation function, ⊕ is the XOR operation, K S is the local secret key (the second secret key), is the second random value. || is the combination operation, x′1||x′2||y′1||y′2 is the second combined value, and in a specific example, it can be obtained by concatenating the values of x′1, x′2, y′1, and y′2, for example.

[0039] After obtaining the second value, the second random value and the second value can be sent to the server. Since the second random value and the second value are used to determine the connection result related to the second table in subsequent steps, the second random value and the second value can also be referred to as the connection index of the second record of the second table. According to one embodiment, the connection indexes of all records of the second table can form the connection index of the second table. According to a specific embodiment, after the second party generates the connection indexes of all records of the second table, the connection indexes of the second table can be sent to the server.

[0040] In step S305, in response to the connection request of the second party, the first party can obtain the first token according to the puncturing function corresponding to the evaluation function and the first secret key, and send it to the second party. After receiving the first token, the second party can also obtain the second token according to the puncturing function and the second secret key, and send the first token and the second token to the server, as Figure 4 shown.

[0041] According to one embodiment, the first party can apply the puncturing function to the first secret key according to the status information of each record in the first table to obtain the first token. In an example, it can be expressed as τ A = F.Punc(K R , st R ), where τ A is the first token, F.Punc is the puncturing function, K R is the first secret key, st RInclude the status information of each record in R. In one example, the status information of each record in R can be, for example, a value indicating whether each record in R is in an available state. Similarly, the second party can also apply the puncturing function to the second key according to the status information of each record in the second table to obtain a second token. In one example, it can be expressed as τ B = F.Punc(K S , st S ), where τ B is the second token, F.Punc is the puncturing function, K S is the first key, and st S includes the status information of each record in table S. In one example, the status information of each record in S can be, for example, a value indicating whether each record in S is in an available state.

[0042] Thereafter, in step S307, the server can determine the joined result set of the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value, and the second token. The joined result set can contain the matching rows (records) in the first table and the second table that meet the join condition that the first attribute and the second attribute are the same. In one implementation, it can be expressed as: where RS represents the joined result set, A represents the first attribute, B represents the second attribute, R represents the first table, S represents the second table, r represents the record in the first table, and s represents the record in the second table.

[0043] According to one implementation, the server can determine the coordinates of multiple first points according to the first random value, the first value, and the first token, and determine the coordinates of multiple second points according to the second random value, the second value, and the second token. Construct a third quadratic curve according to multiple first points and one second point, and construct a fourth quadratic curve according to multiple second points and one first point; determine whether the third record corresponding to the first record and the second record is included in the joined result set of the first table and the second table according to whether the third quadratic curve and the fourth quadratic curve coincide. In a specific implementation, the evaluation result obtained by applying the evaluation function to the first random value and the first token can be XORed with the first value to obtain a combined value corresponding to the coordinates of multiple first points, and the combined value can be divided to obtain the coordinate values of each first point.

[0044] In one example, for example, the first combined value can be determined according to the first random value, the first value, the first token, and a preset evaluation function. For example, it can be determined according to to obtain the first combined value x1||x2||y1||y2, where is the first value, F.Eval() is the preset evaluation function, ⊕ is the XOR operation, is the first random value (i.e., ), || is a merge operation. Furthermore, by splitting the first merge value x1||x2||y1||y2, the coordinates of, for example, two first points (x1, y1) and (x2, y2) are obtained. Similarly, the second merge value can also be determined according to the second random value, the second value, the second token, and a preset evaluation function, and can be expressed as, for example, according to to determine the second merge value x′1||x′2||y′1||y′2, where is the second value, F.Eval() is a preset evaluation function, ⊕ is an exclusive OR operation, is the second random value (i.e., ), || is a merge operation. Furthermore, by splitting the second merge value x′1||x′2||y′1||y′2, the coordinates of, for example, two second points (x′1, y′1) and (x′2, y′2) are obtained.

[0045] Next, a quadratic curve f′(x) passing through (x1, y1), (x2, y2), (x′1, y′1) can be constructed by the Lagrange interpolation formula, and a quadratic curve g′(x) passing through (x′1, y′1), (x′2, y′2), (x1, y1) can be constructed. Furthermore, it is determined whether the curves of f(x) and g(x) coincide. If the two coincide, the first record in the first table and the second record in the second table are matched, that is, the joined result set of the first table and the second table includes the third record corresponding to the first record and the second record; if the two do not coincide, the first record in the first table and the second record in the second table are not matched, that is, the joined result set of the first table and the second table does not include the third record corresponding to the first record and the second record.

[0046] According to one embodiment, after obtaining the joined result, the server can also record the corresponding relationship between the first token and the second token and the first join operation, and the corresponding relationship is used to determine not to perform other join operations on the data tables other than the first join operation through the first token and / or the second token. After the server performs the join operation on the first table and the second table according to τ A (the first token), τ B (the second token), the corresponding relationship between (τ A , τ B ) and the join operation on the first table and the second table can be recorded. Thereafter, if the second party or other parties request the server to perform a join operation on the data table including the first table through a token including τ A , after the server retrieves the existence of the corresponding relationship between τ A and the join operation on the first table and the second table (i.e., the join operation including the first table), it can reject the request according to τ APerform the join operation on the first table again. For example Figure 5 In the example shown, for example, the second party sends τ A , τ B to the database server, and the database server performs the join operation on the first table and the second table according to the tokens τ A , τ B . After performing the join operation on the first table and the second table, the correspondence between the local record (τ A , τ B ) and the join operation on the first table and the second table can be recorded locally. Thereafter, if the second party transfers the token τ A to a third party, for example, the third party requests the server to perform the join operation on the data table containing the first table through τ A and the token of the third party. After the server retrieves that the token τ A already exists locally and has been used for the join operation on the first table, it can reject the request for the join operation on the first table according to τ A .

[0047] After obtaining the join result, the server can also send the join result to the second party, as Figure 4 shown. Since the record numbers in the join result usually differ from the record numbers in the second table uploaded by the second party. Therefore, the second party usually does not know which record in the second party's uploaded data the record in the returned join result corresponds to, and the value of the second attribute in the returned join result is not a plaintext value but an encrypted value. Furthermore, the second party usually does not know the value of the encrypted attribute corresponding to the second attribute in the returned join result. Therefore, the second party can decrypt the encrypted attribute corresponding to the second attribute in the obtained join result. Specifically, in one embodiment, the second party can obtain a third random value, perform an exclusive OR operation on the evaluation result obtained by inputting the second key and the third random value into the evaluation function with the first attribute to obtain a third value, and the third value and the third random value are used to decrypt the encrypted attribute corresponding to the second attribute in the third record corresponding to the first record and the second record in the join result set. In a specific embodiment, when the second party sends the second value and the second random value to the server, it can send the third value and the third random value together with the second value and the second random value to the server. After the server determines the join result set through the second value and the second random value, if the join result set includes a third record corresponding to the first record and the second record, it can send the third value and the third random value back to the second party together with the third record in the join result set, so that the second party can decrypt the encrypted attribute corresponding to the second attribute in the third record through the third value and the third random value. In a specific example, it can be expressed as; Among them, is the plaintext value of the second attribute, B i,3is the third value, K R is the second-party key, B i,4 is the third random number, F.Eval is a preset evaluation function, and ⊕ is the exclusive OR operation. In this way, after obtaining the connection result set sent back by the server, according to the third value and the third random value, the plaintext value of the ciphertext attribute in the connection result set can be deduced in reverse.

[0048] Through the method for connecting data tables provided by the embodiments of this specification, each participating party (such as the first party and the second party) can upload the connection index of its own data table to the database server respectively. Furthermore, as the data authorizing party, the first party can respond to the request of the second party as the data authorized party, generate a one-time token using a preset puncturable random function, and the data authorized party can send the token and its own one-time token to the server, so that the server can initiate a connection to the data tables of both parties according to the connection indexes of the data tables of both parties and the one-time tokens of both parties, and send the connection result to the data authorized party. Since the tokens authorized by the data authorizing party each time are different, the server can verify whether the token has been used based on this inconsistency, thereby avoiding the reuse of the same token, and can avoid the problem of the authorized token of the data authorizing party being resold or misused, protecting the security of the data of the data authorizing party. And the connection indexes of the data tables of each participating party sent to the data server can be updated again according to a preset event, such as a change in the attribute data in its own data table or after a preset time interval, without the need to update each time a connection is responded to.

[0049] Another aspect of this specification provides a computing device, including: a processor; and a memory, where a program is stored, and when the processor executes the program, the above-mentioned method is implemented.

[0050] Another aspect of this specification provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed in a computer, the computer is made to execute the above-mentioned method.

[0051] Another aspect of this specification provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the above-mentioned method is implemented.

[0052] In the 1990s, it was obvious to distinguish whether an improvement to a technology was an improvement in hardware (e.g., improvement to circuit structures such as diodes, transistors, switches, etc.) or an improvement in software (improvement to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Almost all designers obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented with a hardware entity module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logical function is determined by a user's programming of the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL). There is not just one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.

[0053] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same function. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.

[0054] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude that with the development of future computer technologies, the computers implementing the functions of the above embodiments can be, for example, personal computers, laptop computers, in-vehicle human-machine interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or any combination of these devices.

[0055] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way among many execution orders of steps and does not represent the only execution order. When the actual device or terminal product is executed, it may be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in an environment of parallel processors or multi-threaded processing, or even in a distributed data processing environment). The term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, product or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or also includes elements inherent to such process, method, product or device. Without further limitation, there is no exclusion of additional identical or equivalent elements in the process, method, product or device comprising the said elements. For example, if terms such as first and second are used to denote names, they do not denote any particular order.

[0056] For convenience of description, when describing the above device, it is divided into various modules according to functions for separate description. Of course, when implementing one or more of this specification, the functions of each module can be implemented in the same or multiple software and / or hardware, or the modules implementing the same function can be realized by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0057] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general computer, a special computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0058] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 or blocks Figure 1 specified in one or more of the processes and / or blocks.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 or blocks Figure 1 specified in one or more of the processes and / or blocks.

[0060] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0061] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0062] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage, graphene storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0063] Those skilled in the art should understand that one or more embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0064] One or more embodiments of this specification can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0065] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. In the description of this specification, the description of reference terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0066] The above description is only for the embodiments of one or more embodiments of this specification and is not used to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within the scope of the claims.

Claims

1. A method for connecting data tables, comprising: The first party participating in the connection obtains a first random value, constructs a first quadratic curve according to the first attribute of the plain text in the first record of the first table, determines a first combined value according to the coordinates of multiple first points in the first quadratic curve, inputs the first key and the first random value of the party into a preset evaluation function to obtain an evaluation result, performs an XOR operation with the first combined value to obtain a first value, and sends the first random value and the first value to the server; The second party participating in the connection obtains a second random value, constructs a second quadratic curve according to the second attribute of the plain text in the second record of the second table, determines a second combined value according to the coordinates of multiple second points in the second quadratic curve, inputs the second key and the second random value of the party into the evaluation function to obtain an evaluation result, and performs an XOR operation with the second combined value to obtain a second value; sending the second random value and the second value to the server; In response to a connection request from the second party, the first party obtains a first token according to the puncture function corresponding to the evaluation function and the first key, and sends the first token to the second party; The second party obtains a second token according to the puncture function and the second key and sends the first token and the second token to the server; The server determines a connection result set of the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value, and the second token.

2. The method according to claim 1, wherein: Constructing a first quadratic curve according to a first attribute of the plain text in a first record of the first table, comprising: mapping the first attribute of the plain text in the first record of the first table to a plurality of third points in a two-dimensional space, and constructing the first quadratic curve according to the plurality of third points; Constructing a second quadratic curve according to the second attribute of the plain text in the second record of the second table includes: mapping the second attribute of the plain text in the second record of the second table to multiple fourth points in the two-dimensional space, and constructing the second quadratic curve according to the multiple fourth points.

3. The method according to claim 2, wherein: Mapping a first attribute of plain text in a first record of a first table to a plurality of first points in a two-dimensional space includes: mapping the first attribute of plain text in a first record of the first table to a plurality of first points in the two-dimensional space through a plurality of preset anti-collision hash functions.

4. The method according to claim 1, wherein: Applying a puncture function corresponding to the evaluation function to the first key to obtain a first token includes: applying the puncture function to the first key according to the state information of each record in the first table to obtain the first token; Applying the puncture function to the second key includes: applying the puncture function to the second key according to the state information of each record in the second table to obtain a second token.

5. The method according to claim 1, wherein: Determining a connection result set of the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value, and the second token includes: Determine the coordinates of multiple first points according to the first random value, the first value and the first token, and determine the coordinates of multiple second points according to the second random value, the second value and the second token; construct a third quadratic curve according to the multiple first points and one second point, and construct a quadratic fourth quadratic curve according to the multiple second points and one first point; determine whether the connection result set of the first table and the second table includes the third record corresponding to the first record and the second record according to whether the third quadratic curve coincides with the fourth quadratic curve.

6. The method according to claim 1, wherein: Determining coordinates of a plurality of first points according to the first random value, the first value, and the first token includes: An evaluation result obtained by applying the evaluation function to the first random value and the first token is XOR-ed with the first value to obtain a combined value corresponding to the coordinates of multiple first points, and the combined value is divided to obtain the coordinate value of each first point.

7. The method according to claim 1, wherein: The server determines a connection result set between the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value and the second token, including: the server determines a connection result set corresponding to the first connection operation for the first table and the second table according to the first random value, the first value, the first token, the second random value, the second value and the second token, and records the correspondence between the first token and the second token and the first connection operation, wherein the correspondence is used to determine whether to perform other connection operations on the data table other than the first connection operation performed by the first token and / or the second token.

8. The method according to claim 1, further comprising: The second party obtains a third random value, inputs the second key and the third random value into the evaluation function, obtains an evaluation result, performs an XOR operation with the first attribute, and obtains a third value. The third value and the third random value are used to decrypt the encrypted attribute corresponding to the second attribute contained in the third record corresponding to the first record and the second record in the connection result set.

9. The method according to claim 8, wherein: The third value and the third random value are used to decrypt the encrypted attribute corresponding to the second attribute contained in the third record corresponding to the first record and the second record in the connection result set, including: The second party obtains the encrypted attribute corresponding to the second attribute in the third record in the connection result set; The evaluation result obtained by inputting the second key and the third random value into the evaluation function is XOR-ed with the third value to obtain the first attribute of the plaintext.

10. A computer device comprising: processor; and a memory, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 9 is implemented.