A star-shaped oblivious key-value storage expansion optimization method and system

By performing subset mapping and encoding processing on the key-value pair set of OKVS, the problem of extended structure failure caused by multiple leaf OKVS encoding failures is solved, the encoding success rate is improved, the test cost is reduced, and a more ideal failure probability is achieved. Boundary reduction effect.

CN117436127BActive Publication Date: 2024-09-10SOUTHWESTERN UNIV OF FINANCE & ECONOMICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311526296.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-09-10
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

When the existing OKVS expansion scheme fails to encode two or more leaves of OKVS at the same time, it will cause the encoding of the extended OKVS structure to fail, reducing the effect of the upper bound of the failure probability, increasing the test cost of verifying the performance, and improving the efficiency of key-value pair encoding. Probability of failure.

Method used

By obtaining the set of key-value pairs composed of key keys and query values, mapping them to subsets using encoding parameters, counting and recording the number of encoding failures in each subset, and randomly assigning or encoding assignments to the central OKVS to build the final star The inadvertent key-value storage extension structure solves the problem of extension structure failure caused by multiple leaf OKVS encoding failures.

Benefits of technology

It significantly improves the effect of the extended structure in reducing the upper bound of failure probability, reduces the number of tests to verify the performance of the extended OKVS structure, improves the key-value pair encoding success rate, and reduces the test cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117436127B
    Figure CN117436127B
Patent Text Reader

Abstract

The present invention discloses a star-shaped oblivious key-value storage expansion optimization method and system, the method comprising obtaining a key-value pair set consisting of a key and a query value and a coding parameter, mapping the key-value pair set to a first number of subsets using the coding parameter; encoding each subset with a leaf oblivious key-value storage structure using the coding parameter, recording the encoding success or failure result and counting the number of leaf oblivious key-value storage structures that failed to be encoded; randomly assigning a central oblivious key-value storage structure or encoding and assigning a central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that failed to be encoded, and encoding and assigning a leaf oblivious key-value storage structure that was successfully encoded, to obtain a final star-shaped oblivious key-value storage expansion structure. The present invention can significantly improve the effect of reducing the upper limit of the failure probability of the expansion structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oblivious key-value storage, and in particular to a star-shaped oblivious key-value storage expansion optimization method and system. Background Art

[0002] OKVS (oblivious key-value store) refers to a data structure that can preserve the key-value mapping relationship without revealing the specific content of the key and value, that is, a key-value pair set {(k i ,v i ),i=1,2,……,n}, construct a mapping relationship f from key-value pairs to data structure S, so that f(S,k i )=v i . And for k_other that does not belong to the key-value pair set, f(S, k_other) can still be calculated, which is random and indistinguishable to the decoder. OKVS is a data structure concept for securely storing key-value pairs. This technology can hide other specific data content while querying a required value, so that the decoder cannot obtain other values ​​without other keys. Therefore, it has been often used in the scenario of privacy set intersection in recent years.

[0003] At present, some scholars have proposed that the difficulty of verifying the probability of OKVS coding failure lies in the fact that at this stage, the upper bound of the probability of OKVS coding failure can only be verified through experimental methods and experience. When the upper bound of the failure probability is small, a very high number of experiments will be required for verification, which is very expensive. In order to reduce the experimental cost, they proposed an extended construction method for OKVS, which uses the underlying OKVS structure with a larger upper bound of the failure probability to construct a new OKVS extended structure with a smaller upper bound of the failure probability, thereby reducing the number of experiments required to verify the failure probability.

[0004] Specifically, the existing scheme is based on the underlying OKVS of 3H-GCT and proposes a star-shaped expansion structure. Its main construction method is to use a main OKVS and q leaf OKVSs. First, all key-value pairs {(k i ,v i ), i=1,2,……,n} are all attempted to be encoded in the main OKVS, and then the key-value pairs are bucketed into q sets through a hash function. For each set, the leaf OKVS attempts to encode. One of the following three situations will occur: (1) All leaf OKVS encodings are successful; (2) Only one leaf OKVS encoding fails; (3) Two or more leaf OKVS encodings fail.

[0005] Existing solutions generally encode situations (1) and (2), but fail to process situation (3). The reason is that if two or more leaf OKVSs that fail to encode in situation (3) are encoded simultaneously, they will conflict with each other, resulting in the inability to obtain a data structure that satisfies all leaf OKVSs at the same time. Therefore, existing solutions usually directly consider situation (3) as an encoding failure.

[0006] The main problem with the above methods is that there is a possibility that two or more leaf OKVSs fail to encode at the same time, resulting in the possibility of failure in encoding the extended OKVS structure, which makes the effect of OKVS expansion in reducing the upper bound of the failure probability less than ideal, makes the experimental cost of verifying OKVS performance huge, and the possibility of failure in key-value pair encoding is also very high. Summary of the invention

[0007] In view of the above-mentioned deficiencies in the prior art, the present invention provides a star-shaped oblivious key-value storage expansion optimization method and system.

[0008] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0009] In a first aspect, the present invention proposes a star-shaped oblivious key-value storage expansion optimization method, comprising the following steps:

[0010] Obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter;

[0011] Encode each subset of the leaf oblivious key-value storage structure using the encoding parameters, record the encoding success or failure results and count the number of leaf oblivious key-value storage structures that failed to be encoded;

[0012] According to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, the central oblivious key-value storage structure is randomly assigned or encoded and assigned, and the leaf oblivious key-value storage structure that is successfully encoded is encoded and assigned to obtain the final star-shaped oblivious key-value storage extension structure.

[0013] In a second aspect, the present invention proposes a star-shaped oblivious key-value storage expansion optimization system, comprising:

[0014] A mapping module, used to obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter;

[0015] A pre-coding module, used for encoding each subset of the leaf oblivious key-value storage structure using the encoding parameters, recording the encoding success or failure result and counting the number of leaf oblivious key-value storage structures that failed to be encoded;

[0016] The encoding optimization module randomly assigns values ​​to the central oblivious key-value storage structure or encodes and assigns values ​​to the central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that fail to be encoded, and encodes and assigns values ​​to the leaf oblivious key-value storage structures that are successfully encoded, to obtain the final star-shaped oblivious key-value storage extension structure.

[0017] In a third aspect, the present invention proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned star-shaped oblivious key-value storage expansion optimization method when executing the computer program.

[0018] In a fourth aspect, the present invention proposes a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned star-shaped oblivious key-value storage expansion optimization method is implemented.

[0019] The present invention has the following beneficial effects:

[0020] The present invention randomly assigns values ​​to the central oblivious key-value storage structure or encodes and assigns values ​​to the central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, and encodes and assigns values ​​to the leaf oblivious key-value storage structures that succeed in encoding, to obtain a final star-shaped oblivious key-value storage extension structure, which solves the problem that the existing star-shaped OKVS extension scheme fails to encode two or more leaf OKVSs at the same time, leading to the failure of the extended OKVS encoding, and can significantly improve the effect of the extended structure on reducing the upper bound of the failure probability, thereby effectively reducing the number of experiments for verifying the performance of the extended OKVS structure, thereby reducing the experimental cost, and when encoding key-value pairs, can effectively improve the encoding success rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of a star-shaped oblivious key-value storage expansion optimization method in the present invention;

[0022] Figure 2 Schematic diagram of data interaction between the data party and the query party in the present invention. DETAILED DESCRIPTION

[0023] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0024] Example 1

[0025] This embodiment improves the star-shaped oblivious key-value storage extension structure and still uses 3H-GCT as the underlying OKVS. The OKVS includes an encoding part (Encode H ({k i ,v i})) and the decoding part (Decode H (S,k i )) is an OKVS scheme that uses three hash functions for mapping and encoding. Its characteristics are: (1) If S = Encode H ({k i ,v i}), then there is Decode H (S,k i )=v i (2) Whether the encoding is successful or not depends only on the hash function H and the key k used. i is related to the value v i Irrelevant; (3) For any random data structure S other ≠S, decoding is still possible, but Decode H (S other ,k i )≠v i .

[0026] For the convenience of explanation, this embodiment represents the bottom layer OKVS as (Encode H ,Decode H ), the OKVS expansion algorithm is expressed as in, is a single hash function for mapping the key into different first number subsets, each H j ,j=0,1…q represents a set of several hash functions, and represents the hash function parameters used by the i-th leaf OKVS code. In addition, the OKVS code failure is recorded as its code structure S=⊥, where ⊥ means stop.

[0027] like Figure 1 As shown, the present embodiment provides a star-shaped oblivious key-value storage expansion optimization method, comprising the following steps S1 to S3:

[0028] S1. Obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter;

[0029] In an optional embodiment of the present invention, the embodiment first obtains a key-value pair set consisting of a key and a query value and an encoding parameter through step S1. Specifically, the key-value pair set consisting of a key and a query value obtained in the embodiment is represented as {(ki ,v i ), i = 1, 2, ..., n}, denoted as A0; the encoding parameters obtained in this embodiment are expressed as

[0030] This embodiment then maps the key-value pair set to a first number of subsets using the encoding parameters, including the following steps S11 to S13:

[0031] S11, traverse each key-value pair in the key-value pair set;

[0032] S12, performing hash calculation on the key key in the current key-value pair using the hash function included in the encoding parameter;

[0033] S13. Construct a first number of subsets corresponding to the key-value pair set according to the calculated hash value.

[0034] Specifically, this embodiment traverses each key-value pair (k i ,v i ), using the hash function contained in the encoding parameter H For the current key-value pair (k i ,v i ) i Perform hash calculation to get the hash value Finally, according to the calculated hash value j, q subsets A1,…,A1 of the key-value pair set A0 are constructed. q ,satisfy

[0035] S2. Encode each subset of the leaf oblivious key-value storage structure using the encoding parameters, record the encoding success or failure results, and count the number of leaf oblivious key-value storage structures that failed to be encoded;

[0036] In an optional embodiment of the present invention, this embodiment uses the encoding parameters to encode each subset in a leaf oblivious key-value storage structure through step S2, including the following steps:

[0037] The leaf-oblivious key-value storage structure is encoded for each subset in the first number of subsets using a hash function included in the encoding parameters.

[0038] Then record the encoding success or failure results and count the number of leaf oblivious key-value storage structures that failed to be encoded.

[0039] Specifically, this embodiment attempts to perform leaf OKVS encoding on each subset and classifies the encoding results: for j=1,…,q, use the hash function sets H1,…,H q Try the underlying OKVS encoding operation The results of encoding success and failure are recorded, and the number of leaf OKVSs that failed encoding is counted.

[0040] S3. Randomly assign values ​​to the central oblivious key-value storage structure or encode and assign values ​​to the central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, and encode and assign values ​​to the leaf oblivious key-value storage structures that are successfully encoded to obtain the final star-shaped oblivious key-value storage extension structure.

[0041] In an optional embodiment of the present invention, this embodiment encodes the key-value pair set A0 according to the number of leaf oblivious key-value storage structures that fail to be encoded in step S3 to obtain the final star-shaped oblivious key-value storage extension structure.

[0042] In an optional embodiment of the present invention, when the number of leaf oblivious key-value storage structures that fail to be statistically encoded is determined to be 0, the central oblivious key-value storage structure is randomly assigned a value, and a decoded value of the key of each key-value pair in the key-value pair set under the central oblivious key-value storage structure is calculated;

[0043] Calculate a key-value pair set for assigning values ​​to a leaf oblivious key-value storage structure according to a query value in the first number of subsets and a decoded value of a key key of each key-value pair in the key-value pair set under the central oblivious key-value storage structure;

[0044] The leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used for assigning the leaf oblivious key-value storage structure, so as to obtain a final star-shaped oblivious key-value storage extension structure.

[0045] Specifically, this embodiment is for when the number of leaf OKVSs that failed to encode is 0, that is, all leaf OKVSs are successfully encoded. First, randomly assign values ​​to the central OKVS structure: for the central OKVS, assign its encoding structure to a random structure S0, and the key-value pair set A0 = {(k i ,v i ), i = 1, 2, ..., n} calculate the decoding value of all its keys under structure S0 is

[0046] Then calculate the key-value pair set for assigning values ​​to the leaf OKVS structure: For all leaf OKVS, i.e. j = 1, ..., q, first pass the set The key k in i and structure S0, calculate the value to be used for each leaf OKVS structure encoding Construct a new key-value pair set A j ′ ={(k i ,v i ′)|(k i ,v i )∈A k}.

[0047] Finally, the leaf OKVS structure is encoded and assigned: Due to the trial encoding stage, for all subsets A j Therefore, the success of the encoding by the underlying OKVS is only related to the key and the hash function used, and A j and a new key-value pair set A j ′ The key in the leaf OKVS and the hash function used in the leaf OKVS are the same, so the leaf OKVS structure can be assigned to

[0048] In an optional embodiment of the present invention, when the number of leaf oblivious key-value storage structures that fail to be statistically encoded is determined to be 1, the leaf oblivious key-value storage structure that fails to be encoded is randomly assigned a value, and the decoding values ​​of all key keys in the corresponding subset of the leaf oblivious key-value storage structure that fails to be encoded under the leaf oblivious key-value storage structure that fails to be encoded are calculated;

[0049] Calculate a set of key-value pairs for assigning a central oblivious key-value storage structure according to a query value in a subset corresponding to the leaf oblivious key-value storage structure that failed to be encoded and decoded values ​​of all keys in the subset corresponding to the leaf oblivious key-value storage structure that failed to be encoded under the leaf oblivious key-value storage structure that failed to be encoded;

[0050] Encoding and assigning a value to the central oblivious key-value storage structure according to the key-value pair set used for assigning a value to the central oblivious key-value storage structure, and calculating the decoded values ​​of all the keys in the key-value pair set used for assigning a value to the central oblivious key-value storage structure under the central oblivious key-value storage structure when the encoded value of the central oblivious key-value storage structure satisfies a set condition;

[0051] Calculate the key-value pair set for the successfully encoded leaf oblivious key-value storage structure assignment according to the query value in the corresponding subset of the successfully encoded leaf oblivious key-value storage structure and the decoded values ​​of all keys in the key-value pair set for the central oblivious key-value storage structure assignment under the central oblivious key-value storage structure;

[0052] The successfully encoded leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used to assign the successfully encoded leaf oblivious key-value storage structure to obtain a final star-shaped oblivious key-value storage extension structure.

[0053] Specifically, this embodiment is for when the number of leaf oblivious key-value storage structures that failed to encode is 1, that is, only one leaf OKVS encoding failed First, a leaf OKVS structure that failed to encode is randomly assigned a value: for the leaf OKVS that failed to encode, its encoding structure is assigned a random structure And calculate the corresponding set of OKVS for this leaf All keys in the structure The decoded value is

[0054] Then calculate the key-value pair set for assigning the central OKVS structure: For the key-value pair set A0 corresponding to the central OKVS = {(k i ,v i ), i = 1, 2, ..., n}, for the leaf OKVS, the subset of failed encoding attempts The corresponding key recalculates its corresponding query value, that is, For the leaf OKVS tries to encode the subset that succeeded Does not change the corresponding query value, that is, v i ′ =v i Finally, a new central OKVS key-value pair set is constructed.

[0055] Then encode and assign values ​​to the central OKVS structure: Use the new key-value pair set A ′ 0 Encode and assign values ​​to the central OKVS If S0 = ⊥, then end all steps, indicating that the encoding failed, and output S = ⊥. Otherwise, for all key keys k in the key-value pair set A′0 in the central OKVS i Calculate its decoded value under structure S0

[0056] Then calculate the key-value pair set for the remaining successfully encoded leaf OKVS structure assignments: For the remaining successfully encoded leaf OKVS, that is, j = {1,…,q}\j * , through the collection The key k in i and S0, calculate the value to be used for each leaf OKVS structure encoding Construct a new key-value pair set A″ j ={(k i ,v″ i )|(k i ,v i )∈A j}.

[0057] Finally, the remaining leaf OKVS structures are coded and assigned values: The leaf OKVS structure is successfully assigned values ​​through the coding algorithm.

[0058] In an optional embodiment of the present invention, when the embodiment determines that the number of leaf oblivious key-value storage structures that fail to be statistically encoded is at least 2, all leaf oblivious key-value storage structures that fail to be encoded are randomly assigned values, and the decoding values ​​of all key keys in the corresponding subsets of all leaf oblivious key-value storage structures that fail to be encoded under the leaf oblivious key-value storage structures that fail to be encoded are calculated;

[0059] Calculate a set of key-value pairs for assigning a central oblivious key-value storage structure according to query values ​​in the subsets corresponding to all leaf oblivious key-value storage structures that failed to encode and decoded values ​​of all keys in the subsets corresponding to all leaf oblivious key-value storage structures that failed to encode under the leaf oblivious key-value storage structures that failed to encode;

[0060] Encoding and assigning a value to the central oblivious key-value storage structure according to the key-value pair set used for assigning a value to the central oblivious key-value storage structure, and calculating the decoded values ​​of all the keys in the key-value pair set used for assigning a value to the central oblivious key-value storage structure under the central oblivious key-value storage structure when the encoded value of the central oblivious key-value storage structure satisfies a set condition;

[0061] Calculate the key-value pair set for the successfully encoded leaf oblivious key-value storage structure assignment according to the query value in the corresponding subset of the successfully encoded leaf oblivious key-value storage structure and the decoded values ​​of all keys in the key-value pair set for the central oblivious key-value storage structure assignment under the central oblivious key-value storage structure;

[0062] The successfully encoded leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used to assign the successfully encoded leaf oblivious key-value storage structure to obtain a final star-shaped oblivious key-value storage extension structure.

[0063] Specifically, this embodiment is for when the number of leaf oblivious key-value storage structures that fail to encode is at least 2, that is, when there are two or more leaf OKVS encoding failures. 2≤m≤q such that First, randomly assign values ​​to all leaf OKVS structures that failed to encode: For leaf OKVS that failed to encode, randomly assign values ​​to their OKVS data structures as follows: where j * ∈J * . Calculate the corresponding sets of these leaf OKVS All keys k i In structure The decoded value is

[0064] Then calculate the key-value pair set for assigning the central OKVS structure: For the key-value pair set A0 of the central OKVS, i ,vi ), i = 1, 2, ..., n}, for the leaf OKVS, try to encode the subset that failed calculate For the subset of leaf OKVS that attempts to encode successfully, the value corresponding to its key, i.e. v′, is not changed. i =v i Finally, a new central OKVS key-value pair set A′0={(k i ,v′ i )|i=1,…,n}.

[0065] Then encode and assign values ​​to the central OKVS structure: Use the new key-value pair set A′0 to encode and assign values ​​to the central OKVS If S0 = ⊥, then all steps are terminated, indicating that the encoding failed, and the output is S = ⊥. Otherwise, all key keys k in the key-value pair set A′0 in the central OKVS can be i Calculate its decoded value under structure S0

[0066] Then calculate the key-value pair set for the remaining successfully encoded leaf OKVS structure assignments: For the remaining successfully encoded leaf OKVS, that is, J = {1,…,q}\J * , through the collection The key k in i and S0, calculate Construct a new key-value pair set A j ″={(k i ,v i ″)|(k i ,v i )∈A j}.

[0067] Finally, the leaf OKVS structure encoding is successfully assigned a value: the leaf OKVS structure is successfully assigned a value through the encoding algorithm

[0068] This embodiment integrates and outputs a data structure S: the final output data structure is S=(S0, S1, ..., S q ).

[0069] In an optional embodiment of the present invention, after obtaining the star-shaped oblivious key-value storage extension structure through the above encoding process, this embodiment further includes a decoding process for the star-shaped oblivious key-value storage extension structure, which specifically includes the following steps:

[0070] Obtain an arbitrary key, perform hash calculation on the obtained key using the hash function included in the encoding parameter, and determine the leaf oblivious key value storage structure sequence number corresponding to the obtained key according to the calculated hash value;

[0071] The decoded value corresponding to the obtained key is calculated according to the decoded value of the obtained key under the leaf oblivious key-value storage structure with a determined sequence number and the decoded value under the center oblivious key-value storage structure.

[0072] Specifically, this embodiment aims at the star-shaped oblivious key-value storage extension structure. First, the hash function set in the encoding process needs to be deconstructed as follows: The data structure S is decomposed into S = (S0, S1, ..., S q ).

[0073] Then get any key k i , using the hash function contained in the encoding parameters For the obtained key k i Perform hash calculation and determine the key k obtained based on the calculated hash value i The corresponding leaf oblivious key-value storage structure number

[0074] Finally, the output key k can be calculated i The corresponding decoded value is

[0075]

[0076] In the art, the existing star OKVS extension method supports the case where 0 or 1 leaf OKVS encoding fails. For the bottom OKVS with a failure probability of ε (ε is generally a positive number close to 0, such as 2 -20 ), the failure probability of extending OKVS can be reduced to The star-shaped oblivious key-value storage expansion optimization method provided by the present invention can support the situation where at most all q leaf OKVS fail. Its main advantage is that the extended structure will fail to encode only when all q leaf OKVS and the central OKVS fail to encode at the same time. That is, for the underlying OKVS with a failure probability of ε, the failure probability of the extended OKVS is reduced to ε. q+1 The experimental cost of the underlying OKVS can be effectively reduced, and the probability of successful expansion of the OKVS encoding is greatly improved.

[0077] This method can be applied in many practical scenarios. An example is given below (this example is mainly used to illustrate the specific use process of this method, and simple numbers are used as an example for the convenience of explanation).

[0078] Institutions such as banks and credit companies that mainly engage in lending business will investigate borrowers after each loan application to avoid moral hazard. In the context of joint risk control, necessary sharing of lending data between institutions will help reduce the occurrence of defaults. One of the methods of investigating assets and liabilities is for the lender to inquire about the amount of loans that the borrower currently has in other banks and lending companies. In this case, directly allowing the lender to inquire about the lending data may result in the risk of exposing other customer data. Using the OKVS protocol for data storage and query can effectively reduce the risk of data leakage. The query and use of privacy data is completed without the original privacy data leaving the domain and being invisible, so as to achieve the protection and security of privacy data.

[0079] The querying party has received a loan application from customer 5 (in this example, customer number "5" is a simple number. In practice, it may be a unique complex number such as an ID number, card number, password, etc.) and has applied to a data party such as a bank or lending company to inquire about the loan amount of the customer. The data party holds the loan data of customers 1, 2, 3, 4, 5, and 6, and represents each customer's data as (customer number, loan amount). For example, the data set of the data party is A0 = {(1,8), (2,9), (3,7), (4,5), (5,9), (6,4)}.

[0080] The data side uses 3H-GCT as the underlying OKVS, uses 2 leaf oblivious key-value storages, and determines the hash function parameters for the first number subset mapping as (Assuming the value range is {1,2}), the central oblivious key-value storage hash function parameter is (Assume the value range is {1,2,3,4,5}), the parameters of the leaf careless key-value storage hash function are (Assume the range is {1,2,3,4}).

[0081] The data interaction between the data party and the query party is as follows Figure 2 As shown in the figure, the specific data interaction process is as follows:

[0082] The first step is to use subset mapping hash function parameters Calculate the customer number and get the following result:

[0083]

[0084] The above results can divide A0 into subset A1 = {(1,8), (4,5), (6,4)} and subset A2 = {(2,9), (3,7), (5,9)}.

[0085] The second step is to perform precoding in subsets A1 and A2 using the 3H-GCT encoding method. Calculate the hash function value corresponding to the customer number in subset A1. Assume that the result is as follows:

[0086]

[0087] Next, assuming that the coding structure S1 = (a, b, c, d), the relationship between the components of the coding structure S1 and the loan amount corresponding to the customer is obtained according to the above table. For example, customer 1 corresponds to the 1st, 2nd, and 3rd components of S1, and its loan amount is 8, so let a+b+c = 8. Similarly, b+d+a = 5 and c+a+d = 4 can be obtained. It can be seen that the system of equations composed of the above equations has no positive integer solution, so it can be concluded that the coding attempt of S1 failed.

[0088] Similarly, Calculate the hash function value corresponding to the customer number in subset A2. Assume that the result is as follows:

[0089]

[0090] Assume S2 = (a, b, c, d). Similarly, we can see that the corresponding system of equations has no positive integer solution, so it can be concluded that the encoding attempt of S2 failed.

[0091] At this point, the precoding of the two leaf oblivious key-value stores fails, so it is necessary to randomly assign S1 and S2. Assuming S1 = (1, 1, 0, 1) and S2 = (0, 2, 1, 1), the corresponding decoded value of each customer in the central oblivious key-value store can be calculated as follows:

[0092] Client 1: v1 ′ =8-(1+1+0)=6, Client 2: v2 ′ =9-(2+1+1)=5

[0093] Client 3: v3 ′ =7-(2+1+0)=4, Client 4: v4 ′ =5-(1+1+1)=2

[0094] Client 5: v5 ′ =9-(2+1+1)=5, client 6: v6 ′ =4-(1+0+1)=2

[0095] From the above, we can get the set of central oblivious key-value storage encoding as A0 ′ ={(1,6),(2,5),(3,4),(4,2),(5,5),(6,2)}, and then use Calculate the customer number and assume the following result:

[0096]

[0097]

[0098] Assume S0 = (a, b, c, d, e), and according to the above table, we can get the relationship between the components of the coding structure S0 and the loan amount corresponding to the customer, and get the equation system:

[0099]

[0100] It can be obtained that its coding structure is S0=(1,1,0,4,3).

[0101] The data party can then The data structure S = (S0, S1, S2) = (1, 1, 0, 4, 3, 1, 1, 0, 1, 0, 2, 1, 1) is sent to the inquiring party.

[0102] The purpose of the query party is to query the loan data corresponding to customer 5. First, the query party It is determined that the first quantity subset to which it belongs is A2.

[0103] Let S(k) be the kth component of the coding structure S. According to the decoding rule of 3H-GCT:

[0104]

[0105] Decoding can be done in the following ways:

[0106]

[0107] That is, the number of loans that customer 5 already has is 9.

[0108] Example 2

[0109] This embodiment further provides a star-shaped oblivious key-value storage expansion optimization method based on the first embodiment, including:

[0110] A mapping module, used to obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter;

[0111] A pre-coding module, used for encoding each subset of the leaf oblivious key-value storage structure using the encoding parameters, recording the encoding success or failure result and counting the number of leaf oblivious key-value storage structures that failed to be encoded;

[0112] The encoding optimization module randomly assigns values ​​to the central oblivious key-value storage structure or encodes and assigns values ​​to the central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that fail to be encoded, and encodes and assigns values ​​to the leaf oblivious key-value storage structures that are successfully encoded, to obtain the final star-shaped oblivious key-value storage extension structure.

[0113] Example 3

[0114] Based on a star-shaped oblivious key-value storage expansion optimization method provided in Example 1, this embodiment further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the star-shaped oblivious key-value storage expansion optimization method provided in Example 1 is implemented.

[0115] Example 4

[0116] This embodiment is based on a star-shaped oblivious key-value storage expansion optimization method provided in Embodiment 1, and further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements a star-shaped oblivious key-value storage expansion optimization method provided in Embodiment 1.

[0117] The present invention is described with reference to 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 process and / or block in the flowchart and / or block diagram, as well as the combination of processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0120] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

[0121] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A star-shaped oblivious key-value storage expansion optimization method, characterized in that: The following steps are involved: Obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter; Encode each subset of the leaf oblivious key-value storage structure using the encoding parameters, record the encoding success or failure results and count the number of leaf oblivious key-value storage structures that failed to be encoded; According to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, the central oblivious key-value storage structure is randomly assigned or the central oblivious key-value storage structure is encoded and assigned, and the leaf oblivious key-value storage structure that is successfully encoded is encoded to obtain the final star-shaped oblivious key-value storage extension structure, including the following steps: When it is determined that the number of leaf oblivious key-value storage structures that fail to be statistically encoded is at least 2, randomly assign values ​​to all leaf oblivious key-value storage structures that fail to be encoded, and calculate the decoding values ​​of all keys in the corresponding subsets of all leaf oblivious key-value storage structures that fail to be encoded under the leaf oblivious key-value storage structures that fail to be encoded; Calculate a set of key-value pairs for assigning a central oblivious key-value storage structure according to query values ​​in the subsets corresponding to all leaf oblivious key-value storage structures that failed to encode and decoded values ​​of all keys in the subsets corresponding to all leaf oblivious key-value storage structures that failed to encode under the leaf oblivious key-value storage structures that failed to encode; Encoding and assigning a value to the central oblivious key-value storage structure according to the key-value pair set used for assigning a value to the central oblivious key-value storage structure, and calculating the decoded values ​​of all the keys in the key-value pair set used for assigning a value to the central oblivious key-value storage structure under the central oblivious key-value storage structure when the encoded value of the central oblivious key-value storage structure satisfies a set condition; Calculate the key-value pair set for the successfully encoded leaf oblivious key-value storage structure assignment according to the query value in the corresponding subset of the successfully encoded leaf oblivious key-value storage structure and the decoded values ​​of all keys in the key-value pair set for the central oblivious key-value storage structure assignment under the central oblivious key-value storage structure; The successfully encoded leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used to assign the successfully encoded leaf oblivious key-value storage structure to obtain a final star-shaped oblivious key-value storage extension structure.

2. A star-shaped oblivious key-value storage expansion optimization method according to claim 1, characterized in that: Mapping the key-value pair set to a first number of subsets using encoding parameters comprises the following steps: Traverse each key-value pair in the key-value pair collection; Perform hash calculation on the key in the current key-value pair using the hash function contained in the encoding parameter; Construct a first number of subsets corresponding to the key-value pair set according to the calculated hash value.

3. A star-shaped oblivious key-value storage expansion optimization method according to claim 1, characterized in that: Encoding each subset into a leaf oblivious key-value storage structure using the encoding parameters includes the following steps: The leaf-oblivious key-value storage structure is encoded for each subset in the first number of subsets using a hash function included in the encoding parameters.

4. A star-shaped oblivious key-value storage expansion optimization method according to claim 1, characterized in that: According to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, the central oblivious key-value storage structure is randomly assigned or the central oblivious key-value storage structure is encoded and assigned, and the leaf oblivious key-value storage structure that is successfully encoded is encoded to obtain the final star-shaped oblivious key-value storage extension structure, including the following steps: When it is determined that the number of leaf oblivious key-value storage structures that fail to perform statistical encoding is 0, a central oblivious key-value storage structure is randomly assigned a value, and a decoded value of the key of each key-value pair in the key-value pair set under the central oblivious key-value storage structure is calculated; Calculate a key-value pair set for assigning values ​​to a leaf oblivious key-value storage structure according to a query value in the first number of subsets and a decoded value of a key key of each key-value pair in the key-value pair set under the central oblivious key-value storage structure; The leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used for assigning the leaf oblivious key-value storage structure, so as to obtain a final star-shaped oblivious key-value storage extension structure.

5. The star-shaped oblivious key-value storage expansion optimization method according to claim 1, characterized in that: According to the number of leaf oblivious key-value storage structures that fail to be statistically encoded, the central oblivious key-value storage structure is randomly assigned or the central oblivious key-value storage structure is encoded and assigned, and the leaf oblivious key-value storage structure that is successfully encoded is encoded to obtain the final star-shaped oblivious key-value storage extension structure, including the following steps: When it is determined that the number of leaf oblivious key-value storage structures that fail to be statistically encoded is 1, a random value is assigned to the leaf oblivious key-value storage structure that fails to be encoded, and the decoding values ​​of all keys in the corresponding subset of the leaf oblivious key-value storage structure that fails to be encoded under the leaf oblivious key-value storage structure that fails to be encoded are calculated; Calculate a set of key-value pairs for assigning a central oblivious key-value storage structure according to a query value in a subset corresponding to the leaf oblivious key-value storage structure that failed to be encoded and decoded values ​​of all keys in the subset corresponding to the leaf oblivious key-value storage structure that failed to be encoded under the leaf oblivious key-value storage structure that failed to be encoded; Encoding and assigning a value to the central oblivious key-value storage structure according to the key-value pair set used for assigning a value to the central oblivious key-value storage structure, and calculating the decoded values ​​of all the keys in the key-value pair set used for assigning a value to the central oblivious key-value storage structure under the central oblivious key-value storage structure when the encoded value of the central oblivious key-value storage structure satisfies a set condition; Calculate the key-value pair set for the successfully encoded leaf oblivious key-value storage structure assignment according to the query value in the corresponding subset of the successfully encoded leaf oblivious key-value storage structure and the decoded values ​​of all keys in the key-value pair set for the central oblivious key-value storage structure assignment under the central oblivious key-value storage structure; The successfully encoded leaf oblivious key-value storage structure is encoded and assigned according to the key-value pair set used to assign the successfully encoded leaf oblivious key-value storage structure to obtain a final star-shaped oblivious key-value storage extension structure.

6. A star-shaped oblivious key-value storage expansion optimization method according to claim 1, characterized in that: The following steps are also included: Obtain an arbitrary key, perform hash calculation on the obtained key using the hash function included in the encoding parameter, and determine the leaf oblivious key value storage structure sequence number corresponding to the obtained key according to the calculated hash value; The decoded value corresponding to the obtained key is calculated according to the decoded value of the obtained key under the leaf oblivious key-value storage structure with a determined sequence number and the decoded value under the center oblivious key-value storage structure.

7. A star-shaped oblivious key-value storage expansion optimization system using the star-shaped oblivious key-value storage expansion optimization method of claim 1, characterized in that: include: A mapping module, used to obtain a key-value pair set consisting of a key and a query value and an encoding parameter, and map the key-value pair set to a first number of subsets using the encoding parameter; A pre-coding module, used for encoding each subset of the leaf oblivious key-value storage structure using the encoding parameters, recording the encoding success or failure result and counting the number of leaf oblivious key-value storage structures that failed to be encoded; The encoding optimization module randomly assigns values ​​to the central oblivious key-value storage structure or encodes and assigns values ​​to the central oblivious key-value storage structure according to the number of leaf oblivious key-value storage structures that fail to be encoded, and encodes and assigns values ​​to the leaf oblivious key-value storage structures that are successfully encoded, to obtain the final star-shaped oblivious key-value storage extension structure.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the star-shaped oblivious key-value storage expansion optimization method described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the star-shaped oblivious key-value storage expansion optimization method described in any one of claims 1 to 6 is implemented.