A layer-based method and system for unintentional batch data insertion

By using the HT-ORAM method, the client allocates leaf nodes for key-value pairs, calculates the insertion requirement space, determines the target layer, and simulates the insertion result in the buffer. This solves the problem of low efficiency in batch insertion using PATH ORAM, and achieves efficient batch data insertion and data security protection.

CN118760399BActive Publication Date: 2025-10-31CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410891983.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2025-10-31
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

The existing PATH ORAM is inefficient when inserting data in batches, resulting in a poor user experience and failing to meet actual data processing needs.

Method used

The layer-based high-throughput eviction algorithm (HT-ORAM) is adopted. The client receives batch data insertion requests, allocates leaf nodes to each key-value pair, calculates the insertion requirement space through the buffer and layer space record table, determines the target layer, downloads all triples of the target layer and the preceding triples on the binary tree, simulates the insertion results in the buffer, and finally interacts with the cloud to realize batch data insertion.

Benefits of technology

It enables rapid insertion of batch data, improves insertion efficiency, reduces the number of interactions between the cloud and the client, protects data privacy, and ensures data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760399B_ABST
    Figure CN118760399B_ABST
Patent Text Reader

Abstract

This disclosure provides a layer-based method and system for unintentional batch data insertion, relating to the field of information security technology. The specific implementation of the method includes: receiving a first data insertion request comprising multiple first key-value pairs; allocating first leaf nodes to the first key-value pairs to form a first request triplet; calculating the insertion requirement space through a buffer and a layer space record table; selecting a target layer that satisfies the insertion requirement space; reading the upper triplet above the target layer; using the upper triplet, the remaining triplet in the buffer, and the first request triplet to form a first triplet to be inserted; modeling a temporary layer of the target layer in the buffer; simulating the insertion result of the first triplet to be inserted using the temporary layer; and inserting the first triplet to be inserted into the target layer of a binary tree according to the insertion result. This implementation can achieve rapid batch data insertion, improve batch data insertion efficiency, reduce the time and cost of two-way interaction, and protect data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information security technology, and in particular to a layer-based method and system for unintentional batch data insertion, which can be applied to secure cloud computing networks. Background Technology

[0002] An Oblivious Random Access Machine (ORAM) is a communication protocol between users and the cloud that implements key-value storage of data while protecting user access patterns. "Oblivious" refers to the absence of access characteristics and data leakage. It assumes the user is trustworthy, the cloud is untrustworthy, and the cloud can correctly execute the user's specified operations. Classic ORAMs, such as PATH ORAM, can perform sublinear time data read and write operations without access patterns. The user inputs the required key, and the ORAM quickly retrieves the corresponding value. ORAM typically protects user access patterns and accessed content by continuously changing the storage address of accessed data, constantly shuffling and re-encrypting it. PATH ORAM typically consists of three parts: a full binary tree stored in the cloud, a buffer (stash) stored on the user's end, and a position map. A full binary tree in the cloud is used to store the shuffled and encrypted data blocks; a buffer on the client side is used to store temporary data blocks; and a location mapping table is used to store the position of each data block after shuffling and encryption, with each position corresponding to a leaf node in the cloud binary tree. As blocks are accessed and remapped, the location mapping table changes accordingly.

[0003] The existing PATH ORAM uses the following method for batch data insertion: It receives data insertion requests from users via the client, each request containing multiple data items to be inserted. First, the data items are sequentially placed into a stash buffer. Then, a suitable location is found, and finally, each data item is written back to the cloud. Each time a data item is written back, interaction occurs between the user's stash buffer and the cloud. Therefore, because each data insertion requires interaction with the stash buffer and the remote server, the efficiency of data insertion is low under conditions of rapidly increasing data volume, resulting in a poor user experience and failing to meet actual data processing needs. Summary of the Invention

[0004] In view of this, embodiments of the present disclosure provide a layer-based unintentional batch data insertion method and system, which can solve the problem of low efficiency of inserting data one by one, resulting in poor user experience and inability to meet actual data processing needs.

[0005] To achieve the above objectives, according to one aspect of this disclosure, a layer-based unintentional batch data insertion method is provided, the method being applied to a client, the client including a buffer and a layer space record table, the method comprising:

[0006] Receive a first data insertion request including multiple first key-value pairs, allocate a first leaf node to each of the multiple first key-value pairs to form multiple first request triples, and store the multiple first request triples in the buffer;

[0007] The insertion requirement space is calculated using the buffer and the layer space record table, and a target layer that satisfies the insertion requirement space is selected from the binary tree in the cloud based on the insertion requirement space.

[0008] Read all upper triplets of the target layer and all layers before it in the binary tree, allocate a second leaf node to the upper triplet and update the node number of the upper triplet, and use the updated upper triplet, the remaining triplet of the buffer and the first request triplet to form a plurality of first triplets to be inserted.

[0009] A temporary layer of the target layer is modeled in the buffer, and the insertion results of multiple first triplets to be inserted are simulated using the temporary layer;

[0010] Based on the insertion result, the first triplet to be inserted is inserted into the target layer of the binary tree.

[0011] According to another aspect of this disclosure, a layer-based high-throughput eviction algorithm—unintentional random access machine—is provided, the layer-based high-throughput eviction algorithm—unintentional random access machine including a client and a cloud, the client being used to execute the layer-based unintentional data processing method.

[0012] One or more technical solutions provided in this application embodiment utilize HT-ORAM. The client receives batch data insertion requests, allocates leaf nodes to each key-value pair, and stores the requested triplet in a buffer. Then, based on the remaining triplets in the buffer, the requested triplets, and the available space in each layer of the layer space record table, the target layer that meets the insertion requirements is determined layer by layer. After determining the target layer, all the upper triplets before the target layer in the binary tree are read down and combined with the remaining triplets and the requested triplets to form the triplet to be inserted. The insertion results of each triplet to be inserted in the target layer are simulated in the buffer. Finally, the successfully inserted target triplet is encrypted and sent to the cloud along with the insertion result. The cloud then performs the batch data insertion, enabling rapid batch data insertion and improving its efficiency. The cloud and client only need two interactions to insert batch data, eliminating the need for individual data interactions. For batch data in large data files, HT-ORAM can significantly reduce the time and cost of interaction between the two ends, while simultaneously protecting data privacy and ensuring data security. Attached Figure Description

[0013] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0014] Figure 1 A flowchart of a layer-based unintentional batch data insertion method according to an exemplary embodiment of the present disclosure is shown;

[0015] Figure 2 A schematic diagram of an HT-ORAM according to an exemplary embodiment of the present disclosure is shown;

[0016] Figure 3 A schematic diagram of a layer space record table according to an exemplary embodiment of the present disclosure is shown;

[0017] Figure 4 A flowchart illustrating a method for adding a position table according to an exemplary embodiment of the present disclosure is shown;

[0018] Figure 5 A schematic diagram of a location table according to an exemplary embodiment of the present disclosure is shown;

[0019] Figure 6 A flowchart illustrating a method for determining a target layer according to an exemplary embodiment of the present disclosure is shown;

[0020] Figure 7(a) shows a flowchart of a method for reading the upper triplet according to an exemplary embodiment of the present disclosure;

[0021] Figure 7(b) shows a schematic diagram of the target layer according to an exemplary embodiment of the present disclosure;

[0022] Figure 7(c) shows a schematic diagram of a path according to an exemplary embodiment of the present disclosure;

[0023] Figure 8 A flowchart of a layer-based unintentional batch data update method according to an exemplary embodiment of the present disclosure is shown;

[0024] Figure 9 A flowchart of a layer-based unintentional single data insertion method according to an exemplary embodiment of the present disclosure is shown;

[0025] Figure 10(a) shows a flowchart of a layer-based inadvertent data reading method according to an exemplary embodiment of the present disclosure;

[0026] Figure 10(b) shows a schematic diagram of target data according to an exemplary embodiment of the present disclosure;

[0027] Figure 10(c) shows a schematic diagram of the target data write-back location according to an exemplary embodiment of the present disclosure;

[0028] Figure 11 A schematic block diagram of a layer-based unintentional bulk data insertion apparatus according to an exemplary embodiment of the present disclosure is shown;

[0029] Figure 12 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0031] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0032] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "in embodiments of this disclosure" means "at least one embodiment"; the term "another exemplary embodiment" means "at least one additional embodiment". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., mentioned in this disclosure are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0033] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0035] HT-ORAM: Layer-Based high throughput eviction algorithm—Oblivious Random Access Machine. "H" and "T" correspond to "High" and "Throughput" in "Layer-Based high throughput eviction algorithm," respectively, indicating high throughput.

[0036] The present disclosure is described below with reference to the accompanying drawings.

[0037] Figure 1 A flowchart of a layer-based unintentional batch data insertion method according to an exemplary embodiment of the present disclosure is shown, such as... Figure 1 As shown, the layer-based unintentional batch data insertion method disclosed herein includes the following steps:

[0038] In this embodiment of the disclosure, the layer-based unintentional batch data insertion method is executed by a "layer-based high-throughput eviction algorithm—unintentional random access machine (hereinafter referred to as "HT-ORAM")", such as... Figure 2 As shown, the HT-ORAM disclosed herein includes a cloud (also known as Cloud) and a client (also known as User). The client includes a buffer (also known as stash), a position table (also known as Position Map), and a layer space record table (also known as MetaData).

[0039] Furthermore, such as Figure 2 As shown, the cloud uses a binary tree to store data. The binary tree in the cloud is a full binary tree, and its height L can be selectively set according to actual data storage requirements. The binary tree of height L has (L-1) levels, namely level 0, level 1, ..., level (L-1), with the number of nodes in level i being 2. i Accordingly, layer 0 includes 2 0 = 1 node, the first layer includes 2 1 = 2 nodes, the second layer includes 2 2 = 4 nodes, ..., the (L-1)th layer includes 2 L There are several nodes; the number of data items that each node can store, z, can be selectively set based on factors such as actual transmission bandwidth and data processing time complexity. For example, ... Figure 2 The full binary tree shown has a height L = 4 and includes levels 0, 1, 2 and 3. Level 0 has 1 node, level 1 has 2 nodes, level 2 has 4 nodes and level 3 has 8 nodes. Each node can store 4 data items.

[0040] It should be noted that, unlike traditional key-value pair data storage, the HT-ORAM disclosed herein stores data in the form of triples [key, value, leaf]. The amount of data that each node can store is the number of triples that each node can store. Among them, (1) the key of the triple is the storage key, and the data type of the attribute value of the storage key is text type, which can be numbers, letters, etc., as long as it can uniquely identify the corresponding value; for example, the key can be "0", "1", "2", etc., or the key can also be "apple", "orange", "banana", etc.; (2) the value of the triple is the stored data, and the data type can be selectively set as needed; (3) the leaf of the triple is the leaf node number of the binary tree, which represents the storage location of the triple, and can be numbered sequentially from 0 according to the number of leaf nodes; for example, such as Figure 2 The full binary tree of depth L=4 shown includes 8 leaf nodes. The 8 leaf nodes are at level 4. The 8 leaf nodes are numbered starting from 0, and the 8 leaf nodes are numbered as 0, 1, 2, 3, 4, 5, 6, and 7 respectively.

[0041] like Figure 2 As shown, the client's buffer is used to store triples to be inserted or updated, triples downloaded from the cloud, and triples left over from historical processing. The leftover triples may be triples from failed historical insertions or updates. The client's layer space record table records the available storage space for each layer of the binary tree in the cloud, such as... Figure 3 As shown, the layer space record table includes the layer number i and the available space MetaData[i] for each layer, i = 0, 1, 2, ..., L-1.

[0042] Furthermore, the layer-based unintentional batch data insertion method disclosed herein is executed by the HT-ORAM client.

[0043] Step 101: Receive a first data insertion request including multiple first key-value pairs, assign a first leaf node to each of the multiple first key-value pairs to form multiple first request triples, and store the multiple first request triples in the buffer.

[0044] In this embodiment of the disclosure, the client receives a data insertion request for batch data initiated by the user. The batch data is presented in the form of first key-value pairs, each of which includes a first key. f and the first data value f That is, the key-value pair is [key] f value f Accordingly, the key-value pairs of the batch data to be inserted can be represented as [key] f1 value f1 ], [key f2 value f2 ],......,[key fn value fn ].

[0045] Furthermore, after receiving the batch data, the client will process each first key-value pair [key] separately. f value f Assign the first leaf node. f This forms the first request triplet. The first leaf node is... f The allocation method can be selectively set as needed. Since the depth of the binary tree is usually selected to meet the needs of batch data insertion, the first leaf node can be randomly matched for the binary tree. f That is, the first leaf node f The allocation method is random allocation; correspondingly, the client assigns each first key-value pair [key] to a specific value. f value f Randomly select the first leaf node. f To form multiple first request triples [key] f1 value f1 leaf f1 ]、[key f2 value f2leaf f2 ]、……、[key fn value fn leaf fn ], and store multiple first request triples into a buffer.

[0046] Furthermore, after forming the first request triple, the client adds the location information of the first request triple to the location table, such as... Figure 4 As shown, the method for adding a location table in this disclosure includes the following steps:

[0047] Step 401: Obtain the first key of multiple first request triples.

[0048] Step 402: Add the first key and the node number of the corresponding first leaf node to the position table.

[0049] In the embodiments disclosed herein, such as Figure 5 As shown, the location table stores the correspondence between each key and the corresponding leaf node's node number. Since key encoding methods vary, to facilitate quick and accurate location of the storage location corresponding to each key later, this disclosed location table performs hash processing on each key before storing the correspondence between the key and node number. Key hashing unifies the keys, converting keys of arbitrary size into fixed-size hash values, thereby improving lookup speed. Later query, read, and modify operations can quickly and accurately locate the node number corresponding to each key, determining the storage path for each key, avoiding the time-consuming and inefficient lookup using key codes directly. The hash processing can be implemented using a hash function, for example, in a C++ environment, through the hash function within `unordered_map`.

[0050] Furthermore, the client will assign each first key... f and the corresponding first leaf node f Node number [key] f1 leaf f1 ]、[key f2 leaf f2 ]、……、[key fn leaf fn Add to the location table.

[0051] In this embodiment of the disclosure, by adding a location table using the location table addition method of the disclosure, after allocating a first leaf node for the inserted first key-value pair, the node number of the first key and the corresponding first leaf node is added to the location table, thereby realizing the location storage of the first request triplet. Subsequently, the triplet can be quickly located based on the location table, improving the data processing speed.

[0052] Step 102: Calculate the insertion requirement space using the buffer and the layer space record table, and select the target layer that satisfies the insertion requirement space from the binary tree in the cloud according to the insertion requirement space.

[0053] Because traditional ORAMs tend to accumulate more and more data as the data volume increases during data insertion, resulting in a "top-heavy" phenomenon where the upper layers are nearly saturated and the lower layers are relatively empty, this disclosure aims to avoid a severe top-heavy arrangement of the binary tree's data and improve subsequent data insertion efficiency. In this embodiment, the HT-ORAM of this disclosure selects the target layer during each batch data insertion, downloads all the triples previously stored on the target layer of the binary tree, and re-inserts them into the binary tree along with the triples in the buffer. In this way, the layers above the target layer are cleared, allowing for the insertion of as much data as possible and freeing up upper space for subsequent data insertion, thereby improving data insertion efficiency. At the same time, the above operation is repeated every time batch data is inserted to free up space above the target layer. For example, the target layer for the first insertion is the 12th layer, and the first 11 layers are cleared. The target layer for the second insertion is the 9th layer, and the first 8 layers are cleared. This process is repeated to avoid problems such as "traditional insertion being top-heavy, which requires subsequent data insertion to constantly search for space, resulting in low insertion efficiency; or repeated insertion conflicts causing data to be left behind, making data unable to be stored effectively, resulting in chaotic management and low processing efficiency". This can effectively improve the efficiency of batch data insertion.

[0054] Furthermore, the client calculates the insertion requirement space and determines the target layer based on the upper triples above the target layer, the triples left over from historical processing in the buffer, and the sum of multiple first request triples corresponding to the data insertion request. Figure 6 As shown, the method for determining the target layer in this disclosure includes the following steps:

[0055] Step 601: Calculate the sum of the number of remaining triples and the number of first request triples in the buffer to obtain the used space of the buffer.

[0056] In this embodiment of the disclosure, after storing multiple first request triples into a buffer, the client calculates the sum of the number of legacy triples to be inserted into the buffer and the number of first request triples to obtain the used space |stash| of the buffer.

[0057] Step 602: Read the available space of each layer of the binary tree from the layer space record table, and determine layer by layer whether the available space of each layer is greater than or equal to the sum of the used space of the buffer and the cumulative used space of each layer of the binary tree, until the target layer is determined.

[0058] Step 6021: Select the current layer.

[0059] In this embodiment of the disclosure, for a batch data insertion request, in order to ensure the insertion success rate, during the initial judgment, the layer with a later depth can be selected as the current layer m.

[0060] Step 6022: Read the available space of each layer from the root to the current layer from the layer space record table, and calculate the cumulative used space before the current layer using the available space of each layer before the current layer.

[0061] In this embodiment of the disclosure, from such Figure 3 The client's layer space record table reads the available space of each layer in the binary tree from the root to the current layer in the cloud, which is used to calculate the cumulative used space before the current layer. Specifically, for each layer before the current layer, the maximum space available for data storage in each layer is first calculated based on the number of nodes and the amount of data each node can store; then, the difference between the maximum space and the available space in each layer is calculated to obtain the used space of each layer; finally, the used spaces of each layer are summed to obtain the cumulative used space before the current layer. Specifically, taking layer m-1 as an example:

[0062] The number of nodes in the (m-1)th layer is 2. m-1 If each node can store z numbers of data, then the maximum space of the (m-1)th layer is z·2. m-1 ;

[0063] As can be seen from the layer space record table, the available space of the (m-1)th layer is MetaData[m-1];

[0064] Calculate the maximum space z·2 of the (m-1)th layer m-1 The difference between the available space MetaData[m-1] and the available space is used to obtain the used space Y[m-1] = z·2 at the (m-1)th level. m-1 -MetaData[m-1];

[0065] Calculate the sum of the used space of each layer before the current layer m, and obtain the cumulative used space before the current layer m: Y[m] = Y[m-1] + Y[m-2] + ... + Y[0].

[0066] Step 6023: Calculate the product of the cumulative used space before the current layer, the sum of the used space of the buffer, and the reserve coefficient, as the insertion requirement space.

[0067] In this embodiment, the client can determine the total number of legacy triples in the buffer, the first request triples of the data insertion request, and the upper triples already stored before the current layer by calculating the sum of the accumulated used space before the current layer and the used space of the buffer. To ensure the success rate of batch data insertion and avoid insertion conflicts, this disclosure reserves spare space for batch data insertion. The insertion requirement space is determined to be a multiple of the sum of the accumulated used space before the current layer and the used space of the buffer, in order to reduce the probability of insertion conflicts and ensure successful data insertion as much as possible. Accordingly, the insertion requirement space D = s·(|stash|+Y[m]). The multiple is determined by the spare coefficient s, which can be selectively set as needed, for example, s = 5.

[0068] Step 6024: Determine whether the available space of the current layer is greater than or equal to the insertion requirement space. If yes, proceed to step 6025; otherwise, proceed to step 6026.

[0069] In this embodiment of the disclosure, the available space of the current layer m read from the layer space record table is compared with the insertion requirement space to determine whether the available space of the current layer m meets the insertion requirement space.

[0070] Step 6025: Determine the current layer as the target layer.

[0071] In this embodiment of the disclosure, if the available space of the current layer m is greater than or equal to the insertion requirement space, the current layer m is taken as the target layer.

[0072] Step 6026: Update the current layer to the next layer of the current layer, then proceed to step 6022.

[0073] In this embodiment of the disclosure, if the available space of the current layer m is less than the space required for insertion, the next layer of the current layer is judged, and the layer number m of the current layer is updated to m = m + 1 accordingly.

[0074] In this embodiment of the invention, by using the insertion requirement space calculation method disclosed herein, the appropriate insertion requirement space is determined after expanding the spare space by utilizing historical legacy, data insertion requests, and the total number of upper triples before the current layer of the cloud binary tree. The target layer to be inserted is selected to meet the data insertion requirements. In the subsequent actual insertion process, the success rate of batch data insertion can be improved, and the occurrence of binary tree insertion conflicts, top-heavy situations, etc. can be avoided, so that the data is effectively stored and the efficient management and processing of cloud binary trees and buffer data can be achieved.

[0075] It should be noted that if, after checking each level, the available space at each level of the binary tree is insufficient to meet the requirement of greater than or equal to the space required for insertion, it indicates that the cloud tree storage space is insufficient, and the result of the data insertion request is determined to be insertion failure.

[0076] Step 103: Read all the upper triples of the target layer and all layers before it in the binary tree, allocate a second leaf node to the upper triples and update the node number of the upper triples, and use the updated upper triples, the remaining triples in the buffer and the first requested triples to form a plurality of first triples to be inserted.

[0077] In this embodiment of the invention, since the HT-ORAM of this disclosure downloads all the upper triples of the target layer and all layers preceding it during each batch data insertion and re-inserts them into the binary tree along with the triples in the buffer, after determining the target layer, the client initiates a data read request to the cloud to read the upper triples of the target layer and all layers preceding it. It should be noted that the layers preceding the target layer do not include the target layer itself, and will not be specifically described further below.

[0078] Furthermore, since the client has high trustworthiness and data security is guaranteed, while the cloud has low trustworthiness, to protect data privacy and prevent security risks from data leakage, the client encrypts the triples before sending them to cloud storage when inserting data into the cloud. Therefore, when the client reads data from the cloud, it needs to decrypt the data to obtain the decrypted triples. Correspondingly, when reading all the upper triples of the target layer and all layers before it in the binary tree, the client needs to read all the data before the target layer from the cloud, and then decrypt all the data before the target layer to obtain the upper triples of the target layer and all layers before it, as shown in Figure 7. The method for reading upper triples disclosed in this invention includes the following steps:

[0079] Step 701: Send the layer number of the target layer or the node numbers of all nodes in the target layer to the cloud.

[0080] In this embodiment of the invention, the client sends the target layer number m to the cloud. After receiving the target layer number m, the cloud reads all the data of layer m and each layer before it (including layer m, layer m-1, layer m-2, ..., layer 0) and returns it to the client. For example, as shown in Figure 7(b), the target layer m is the 4th layer, and the black blocks in the figure represent the locations where data is stored. All the data in layers 1-4 is read.

[0081] Alternatively, the client can treat each node in the target layer as a leaf node, that is, use the node numbers of each node in the target layer as leaves, and send all node numbers of the target layer to the cloud. Then, after receiving all the node numbers of the target layer, the cloud reads all the data under the paths corresponding to the leaves where each node in the target layer is a leaf node; that is, the cloud reads all the data from level m and up and returns it to the client. It should be noted that for a binary tree, each leaf corresponds to a path P, and path P consists of the node numbers of each node traversed from the root of the binary tree to the leaf. For example, as shown... Figure 2 In the binary tree of depth L=4 shown, the paths P corresponding to the 8 leaf nodes of the 4th level are as follows: leaf=0, P is [0,0,0,0]; leaf=1, P is [0,0,0,1]; leaf=2, P is [0,0,1,2]; leaf=3, P is [0,0,1,3]; leaf=4, P is [0,1,2,4]; leaf=5, P is [0,1,2,5]; leaf=6, P is [0,1,3,6]; leaf=7, P... For example, as shown in Figure 7(b), the target layer m is the 4th layer. All node numbers 0-7 of the target layer are sent to the cloud. The cloud reads all data under the paths [0,0,0,0], [0,0,0,1], [0,0,1,2], [0,0,1,3], [0,1,2,4], [0,1,2,5], [0,1,3,6], and [0,1,3,7]. The gray block in Figure 7(c) is an example of the path P[0,1,2,4].

[0082] Step 702: Receive all data from the target layer and all preceding layers returned by the cloud.

[0083] In this embodiment of the disclosure, the client receives all data from the target layer m and all layers preceding it, returned by the cloud.

[0084] Step 703: Decrypt all data of the target layer and all layers before it to obtain multiple upper triplets.

[0085] In this embodiment of the invention, the client's encryption and decryption process employs a random symmetric encryption algorithm. The encryption key and decryption key are the same, collectively referred to as the symmetric key. The symmetric key can be generated using a suitable key generation algorithm based on actual encryption and decryption requirements. Furthermore, the composition of the symmetric key can be selectively set according to the key generation algorithm or actual encryption and decryption needs; for example, the symmetric key can be composed of any combination of numbers, letters, etc.

[0086] Furthermore, the client uses a symmetric key to decrypt all data in the target layer and all layers preceding it, obtaining all upper triples of the target layer and all layers preceding it.

[0087] In this embodiment of the disclosure, the client initiates a read request to the cloud using the upper triplet reading method of this disclosure. The cloud reads all data of the target layer and all layers before it and returns it to the client. The client then decrypts the data to obtain the upper triplet. This method can protect data privacy, facilitate the redistribution of subsequent triplets and the insertion of batch data, improve the success rate and efficiency of data insertion, reduce data legacy, balance the binary tree storage, and improve data management efficiency.

[0088] Furthermore, after obtaining the upper triplet, the client reassigns a second leaf node (leaf) to the upper triplet. s And update the node number of the upper triplet to the node number of the second leaf node. s This yields the updated upper triplet, including the second key, the second data, and the node number of the second leaf node, i.e., [key] s1 value s1 leaf s1 ]、[key s2 value s2 leaf s2 ]、……、[key sn value sn leaf sn The updated upper triplet is then stored in the buffer. Thus, the updated upper triplet, the legacy triplet in the buffer, and the first requested triplet are combined to obtain multiple first triplets to be inserted. The allocation of the second leaf node is random; for example, it can be randomly selected and allocated to each upper triplet based on the depth L of the cloud binary tree. Furthermore, the node number of the updated upper triplet is the same as the node number of the second leaf node. s Next, update the location table, specifically:

[0089] In the location table, find the second key of each of the updated upper triplets, and modify the node number corresponding to the second key to the node number of the corresponding second leaf node.

[0090] Step 104: Model a temporary layer of the target layer in the buffer, and use the temporary layer to simulate the insertion results of multiple first triplets to be inserted.

[0091] In this embodiment of the invention, the client uses a temporary layer g, which is a mapping of the target layer m in the buffer and has the same structure as the target layer m, to simulate the insertion results of multiple first triplets to be inserted in the target layer m. Specifically:

[0092] Based on the node number of each first triplet to be inserted, each first triplet to be inserted is evicted to a temporary layer g. The evicting process must satisfy the following rules: Every first triplet to be inserted is stored in the node number of its corresponding leaf node. If a node in temporary layer g is full during the evicting process, any subsequent insertion at that node will fail, and the corresponding first triplet to be inserted will be stored as a legacy triplet back in the buffer. Thus, by simulating temporary layer g, the insertion result of the first triplet to be inserted can be determined. After the actual insertion, even if an attacker learns that the cloud has operated on the target layer, they cannot accurately locate the specific data position. Furthermore, subsequent data readings are performed along paths, and the data read is not necessarily from the target layer; attackers also cannot pinpoint the specific location of the actually read data, thereby ensuring data security and a very high level of data privacy.

[0093] Step 105: Based on the insertion result, insert the first triplet to be inserted into the target layer of the binary tree.

[0094] In this embodiment of the invention, step 105 includes steps 1051 and 1052, specifically:

[0095] Step 1051: Based on the insertion result, the client determines the target insertion triplet from the first triplet to be inserted, encrypts the target insertion triplet, and obtains multiple encrypted target insertion triplets.

[0096] In this embodiment of the invention, the client takes the first triplet to be inserted that was successfully expelled as the target triplet based on the insertion result of the temporary layer g, and uses a symmetric key to symmetrically encrypt the target triplet to obtain the encrypted target triplet.

[0097] Furthermore, the client fills the empty positions in the insertion result with empty elements. Correspondingly, when inserting a triplet into the encrypted target, the empty elements are also encrypted, resulting in encrypted empty elements. Thus, by filling the empty positions, the result presented to the outside world is the complete filling of the target layer and the binary tree preceding it, preventing attackers from knowing the actual filling position of the inserted triplet, thereby protecting data privacy and ensuring data security. The empty elements can be selectively set by the client as needed, for example, an empty element of 999999.

[0098] Step 1052: Send the encrypted target insertion triplet and the insertion result to the cloud, so that the cloud inserts multiple encrypted target insertion triplets into the target layer of the binary tree according to the insertion result.

[0099] In this embodiment, the insertion result includes the insertion positions of each successfully expelled target insertion triplet, with the insertion positions represented by the node numbers of the target layer m. The client generates a first cloud insertion request using the symmetrically encrypted target insertion triplets and the insertion result, and sends the first cloud insertion request to the cloud, so that the cloud inserts multiple symmetrically encrypted target insertion triplets into the target layer of the binary tree according to the insertion positions.

[0100] Furthermore, the client uses the encrypted empty element, the encrypted target insertion triplet, and the insertion result to generate a first cloud insertion request, which is then sent to the cloud. This causes the cloud to insert multiple symmetrically encrypted target insertion triplets and empty elements into the target layer of the binary tree according to their insertion positions.

[0101] Furthermore, after sending the first cloud insertion request, the client updates the available space of each layer in the layer space record table. Since all layers before the target layer m have been read, the available space of all layers before the target layer m is the maximum space z·2. i The available space of the target layer m is the available space after the simulation of the temporary layer g, that is, the remaining space of the temporary layer g after removing the target insertion triplet.

[0102] It should be noted that the layers before the target layer m can also be filled with encrypted empty elements. Thus, what is presented to the outside world is the full filling of the target layer m and all layers before it in the binary tree, making it impossible for outsiders to know the actual data filling position, thereby protecting data privacy.

[0103] In this embodiment of the disclosure, the layer-based unintentional batch data insertion method can achieve rapid batch data insertion and improve the efficiency of batch data insertion. The cloud and the client only need two interactions to insert batch data, without the need for individual data interactions. For batch data of large data files, HT-ORAM can greatly reduce the time and cost of interaction between the two ends and the insertion cost, while protecting data privacy and ensuring data security.

[0104] In this embodiment of the invention, when dealing with a scenario where there is a need to update batch data in a cloud-based binary tree, it is necessary to find the corresponding node number, download all data for the corresponding path from the cloud, update it, and then insert it back into the cloud. Accordingly, such as... Figure 8 As shown, the layer-based unintentional batch data update method disclosed herein includes the following steps:

[0105] Step 801: Receive a data update request consisting of multiple third key and third data pairs.

[0106] In this embodiment of the invention, the client receives a data update request for batch data initiated by the user. The batch data includes multiple third key-value pairs, and each third key-value pair includes a third key. t and the third data value to be updated t ', that is, the third key-value pair is [key t value t '], correspondingly, the third key-value pair of the batch data to be updated can be represented as [key] t1 value t1 '], [key t2 value t2 '], ..., [key tn value tn ').

[0107] Step 802: Based on the third key, find the node number of the third leaf node corresponding to the third data in the location table.

[0108] In this embodiment of the disclosure, the client uses the key t Find the node number of the third leaf node corresponding to value' in the position table. t For example, leaf t =1, 2, 4, 5.

[0109] Step 803: Send the node number of the third leaf node to the cloud.

[0110] In this embodiment of the invention, the client assigns the node number leaf of the third leaf node. t =1, 2, 4, 5 are sent to the cloud, and the cloud receives the leaf t Then, read the leaf. t Return all data in the paths corresponding to 1, 2, 4, and 5 to the client.

[0111] Furthermore, the cloud determines the leaf t After setting the numbers to 1, 2, 4, and 5, according to the leaf node in the binary tree... t The correspondence between paths, reading leaf t =All triples under the paths belonging to 1, 2, 4, 5. Correspondingly, the cloud determines the leaf. t After setting the input to 1, 2, 4, 5, return all data on the paths [0,0,0,1], [0,0,1,2], [0,1,2,4], and [0,1,2,5] to the client.

[0112] Step 804: Receive all data of the path to which the third leaf node belongs, returned by the cloud.

[0113] Step 805: Decrypt all data in the path to which the third leaf node belongs to obtain multiple triples to be updated.

[0114] In this embodiment of the invention, the client uses the encryption / decryption key to decrypt all data in the path to which the third leaf node belongs, obtaining multiple triples [key] to be updated. t1 value t1 leaf t1 ], [key t2 value t2 leaf t2 ],......,[key tn value tn leaf tn ].

[0115] Step 806: Based on the third key, replace the stored data in the triplet to be updated with the third data to obtain multiple triplets under update.

[0116] In this embodiment of the disclosure, for the same key t The client uses value t Replace the value in the triple to be updated t Multiple updated triples [key] were obtained t1 value t1 ', leaf t1 ], [key t2 value t2 ', leaf t2 ],......,[key tn value tn ', leaf tn ].

[0117] Step 807: Reassign the fourth leaf node to each of the updated triples, combine the third key, the corresponding third data, and the node number of the corresponding fourth leaf node into an updated triple, and insert the updated triple into the binary tree in the cloud.

[0118] In this embodiment of the invention, the client reallocates a fourth leaf node (leaf) for the triplet in the update after replacing the stored data. fr The updated triplet [key] is obtained, consisting of the third key, the third data, and the node number of the reassigned fourth leaf node. t1 value t1', leaf fr1 ], [key t2 value t2 ', leaf fr2 ],......,[key tn value tn ', leaf frn ].

[0119] Furthermore, after reallocating the fourth leaf node, the client updates the location table, using the leaf node for the same key. fr Replace leaf in the position table t .

[0120] Furthermore, the layer-based unintentional batch data insertion method disclosed herein is used to insert each updated triplet into a binary tree in the cloud.

[0121] In this embodiment of the disclosure, the layer-based unintentional batch data update method can achieve rapid batch data updates and improve batch data update efficiency. The cloud and the client only need two interactions to achieve batch data updates, without the need for individual data interactions. For batch data of large data files, HT-ORAM can greatly reduce the time and insertion cost of dual-end interaction, while protecting data privacy and ensuring data security.

[0122] In this embodiment of the disclosure, for data insertion requests that include only a single key-value pair, such as... Figure 9 As shown, the layer-based unintentional single data insertion method of this disclosure includes the following steps:

[0123] Step 901: Receive a data insertion request including a fourth key-value pair; wherein the fourth key-value pair includes a fourth key and a fourth data.

[0124] In this embodiment of the invention, the client receives a data update request for a single piece of data initiated by the user. The single piece of data includes a fourth key-value pair, which includes a fourth key. fr and the fourth data value fr That is, the fourth key-value pair is [key] fr value fr ].

[0125] Step 902: Assign a fifth leaf node to the single key-value pair to form a second request triplet.

[0126] In this embodiment of the disclosure, the client randomly assigns a fifth leaf node (leaf) to a single key-value pair. fi The second request triple [key] is formed. fr valuefr leaf fi ].

[0127] Furthermore, the fourth key fr The fifth leaf node is stored in the location table.

[0128] Step 903: Send the node number of the fifth leaf node to the cloud.

[0129] In this embodiment of the invention, the client assigns the node number leaf of the fifth leaf node. fi Send to the cloud, the cloud receives leaf fi Then, read the leaf. t Return all data for the specified path to the client.

[0130] Step 904: Receive all data of the path to which the fifth leaf node belongs, returned from the cloud, decrypt all data of the path to which the fifth leaf node belongs, and obtain the triplet on the path to which the fifth leaf node belongs.

[0131] In this embodiment, after the client decrypts all the data of the path to the fifth leaf node, it updates the available space of each layer on the path to the fifth leaf node, and reduces the available space of each layer that intersects with the path to the fifth leaf node by z. Step 905: Count the number of empty elements on the path to the fifth leaf node, and select a target legacy triplet from the buffer that satisfies the number of empty elements on the path to the fifth leaf node.

[0132] In this embodiment of the disclosure, the maximum number of target legacy triples to be selected is determined based on the number of empty elements after decryption of the path to which the fifth leaf node belongs. The client can select at least one target legacy triple that is less than or equal to the maximum number of target legacy triples.

[0133] Step 906: Combine the target legacy triplet, the second request triplet, and the triplet on the path to the fifth leaf node to form a second triplet to be inserted, and insert the second triplet to be inserted into the path to the fifth leaf node in the binary tree.

[0134] In this embodiment of the invention, the client selects the target legacy triplet from the buffer, the second request triplet of the data insertion request, and the triplet read from the path of the fifth leaf node to form a second triplet to be inserted, and sends it to the cloud. The cloud then randomly inserts each of the second triplets to be inserted into the path of the fifth leaf node. Since the data reading and insertion involves reading and inserting all the data along the entire path, and the insertion and reading positions are randomly shuffled, the specific location of the data cannot be located from the outside world. Therefore, data privacy can be protected and data security can be ensured.

[0135] Alternatively, the client can choose not to select the target legacy triplet, but instead use the second requested triplet and the triplet read from the path to the fifth leaf node to form the second triplet to be inserted. This can be selectively set according to the actual data management situation. That is, the client can omit step 905 and change step 906 to "form the second requested triplet and the triplet on the path to the fifth leaf node to form the second triplet to be inserted, and insert the second triplet to be inserted into the path to the fifth leaf node in the binary tree".

[0136] Furthermore, the client fills the empty positions in the path belonging to the fifth leaf node, excluding the second triplet to be inserted, with empty elements. As mentioned above, the empty elements are encrypted, and the encrypted empty elements are inserted together with the second triplet to be inserted into the path belonging to the fifth leaf node in the binary tree.

[0137] Furthermore, if the available space of any node in the path belonging to the fifth leaf node changes, the client updates the available space of each layer in the layer space record table, increasing the available space of each layer that intersects with the path belonging to the fifth leaf node by z.

[0138] In the embodiments of this disclosure, the layer-based unintentional single data insertion method can protect data privacy, improve the processing efficiency of legacy data without increasing the cost of interaction between the two ends, and ensure data security.

[0139] In this embodiment of the disclosure, for a user-initiated data read request, as shown in Figure 10(a), the layer-based unintentional data read method of this disclosure includes the following steps:

[0140] Step 1001: Receive a data read request initiated by the user; wherein the data read request includes a fifth key.

[0141] In this embodiment of the disclosure, the fifth key is represented as key. fi .

[0142] Step 1002: Use the fifth key to look up the position table and obtain the node number of the sixth leaf node corresponding to the fifth key.

[0143] In this embodiment of the disclosure, the client utilizes the key fi Look up the location table to get the key. fi The corresponding sixth leaf node's node number leaf si For example, such as Figure 2 In the binary tree of depth L=4 shown, the node number of the sixth leaf node is leaf. si =6.

[0144] Step 1003: Send the node number of the sixth leaf node to the cloud.

[0145] Step 1004: Receive all data under the path to which the sixth leaf node belongs, returned by the cloud.

[0146] In this embodiment of the disclosure, the cloud reads all data under the path to which the sixth leaf node belongs and returns it to the client. For example, the cloud reads all data under the path P[0,1,2,4] to which the sixth leaf node belongs and sends it to the client.

[0147] Step 1005: Decrypt all data under the path to which the sixth leaf node belongs, obtain the triplet under the path to which the sixth leaf node belongs, and store it in the buffer.

[0148] In this embodiment of the disclosure, the client interacts with leaf. si Decrypt all data under the corresponding path to obtain the triple [key] of the path belonging to the sixth leaf node. si1 value si1 leaf si ], [key t2 value si2 leaf si ],......,[key sin value sin leaf si And store it in the buffer.

[0149] Step 1006: Based on the fifth key, match the fifth data from the triples under the path of the sixth leaf node, and display the fifth data to the user.

[0150] In this embodiment of the disclosure, the client retrieves the triple [key] from the path belonging to the sixth leaf node. si1 value si1 leaf si ], [key si2 value si2 leaf si ],......,[key sin value sin leaf si Search for keys in the search bar. fi key si* , key si* corresponding value si* The fifth data value was determined to be the match. fi =value si*For example, as shown in Figure 10(b), the target data corresponding to the fifth key (i.e., the fifth data) is shown as the black block in the figure. The client will use the key from the triplet under the path of the decrypted sixth leaf node. fi Matched value fi And send it to the user or show it to the user.

[0151] Step 1007: A seventh leaf node is reassigned to the fifth key. The target write-back node for the updated triple corresponding to the fifth key is determined to be the intersection of the paths belonging to the seventh leaf node and the sixth leaf node; wherein the seventh leaf node is different from the sixth leaf node. In this embodiment, the client is the key. fi Reassign the seventh leaf node se The seventh leaf node se Different from the sixth leaf node leaf si The leaf node, that is, the leaf se ≠leaf si Accordingly, the updated fifth key fi The corresponding triple is [key] fi value fi leaf se ].

[0152] Furthermore, based on the intersection of the paths belonging to the seventh leaf node and the sixth leaf node, the updated fifth key is determined. fi The corresponding triple [key] fi value fi leaf se The write-back position, that is, the intersection of the path to the seventh leaf node and the path to the sixth leaf node, is the updated fifth key. fi The corresponding triple [key] fi value fi leaf se The goal is to write back the node. For example, as shown in Figure 10(c), the sixth leaf node is... si The path is represented by a dotted line, and the seventh leaf node is leaf. se The path is represented by a double-dotted line, and the target write-back node is the intersection of the single-dotted line and the double-dotted line, which is represented by a diagonal line block in the diagram.

[0153] Furthermore, the client updates the location table, modifying the node number corresponding to the fifth key in the location table to the node number of the seventh leaf node.

[0154] Step 1008: Rewrite the updated triplet corresponding to the fifth key and the remaining triplets under the path of the sixth leaf node (excluding the triplet corresponding to the fifth key) into the binary tree in the cloud.

[0155] In this embodiment, all other triples under the path of the sixth leaf node, except for the triple corresponding to the fifth key, remain unchanged and are sent to the cloud along with the updated triple of the fifth key. The cloud then inserts the updated triple into the path of the sixth leaf node in the binary tree. Since the triple corresponding to the fifth key, although changed to the seventh leaf node, still belongs to the path of the sixth leaf node, the cloud can determine the insertion position of the updated triple based on the intersection of the paths of the sixth and seventh leaf nodes. The remaining triples can be inserted randomly. By reallocating leaf nodes to the target data while keeping the other triples unchanged, the triple corresponding to the data read request is re-inserted into the cloud. Externally, it still appears as a write-back using the original path, but the target data has changed its path. Subsequent readings rely on the new path. Therefore, attackers cannot locate the target data, thus protecting data privacy and preventing data leakage.

[0156] Alternatively, the client can select the target legacy triple and insert it along with the updated triples into the path of the seventh leaf node.

[0157] Furthermore, the client fills the empty positions in the path belonging to the sixth node with empty elements, and sends the encrypted empty elements, along with the updated triplet corresponding to the fifth key and the remaining triplets in the path belonging to the sixth leaf node (excluding the triplet corresponding to the fifth key), to the cloud for insertion into the binary tree.

[0158] Furthermore, if the available space of each node in the path to the sixth leaf node changes, the client updates the corresponding available space in the layer space record table.

[0159] In the embodiments of this disclosure, the layer-based unintentional data reading method of this disclosure can protect data privacy and ensure data security.

[0160] Furthermore, for updating a single key-value pair, the steps are similar to the layer-based unintentional data reading method for a single key-value pair disclosed herein, except that the replacement of the data to be updated in the data update request is added between steps 1006 and 1007, which will not be described in detail here.

[0161] Figure 11 This is a schematic diagram of the main modules of a layer-based unintentional batch data insertion device according to an embodiment of the present disclosure, such as... Figure 11As shown, the layer-based unintentional batch data insertion device 1100 of this disclosure is applied to a client of HT-ORAM. The client includes a buffer and a layer space record table. The layer-based unintentional batch data insertion device 1100 of this disclosure includes:

[0162] The allocation module 1101 is used to receive a first data insertion request including multiple first key-value pairs, allocate a first leaf node to each of the multiple first key-value pairs to form multiple first request triples, and store the multiple first request triples in the buffer.

[0163] The data processing module 1102 is used to calculate the insertion requirement space through the buffer and the layer space record table, and select the target layer that meets the insertion requirement space from the binary tree in the cloud according to the insertion requirement space.

[0164] The reading and combining module 1103 is used to read all the upper triplets of the target layer and all layers before it in the binary tree, allocate a second leaf node to the upper triplet and update the node number of the upper triplet, and use the updated upper triplet, the remaining triplet of the buffer and the first request triplet to form a plurality of first triplets to be inserted.

[0165] The simulation module 1104 is used to model a temporary layer of the target layer in the buffer and use the temporary layer to simulate the insertion results of multiple first triplets to be inserted.

[0166] The insertion module 1105 is used to insert the first triplet to be inserted into the target layer of the binary tree according to the insertion result.

[0167] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.

[0168] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0169] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0170] refer to Figure 12The present invention describes a structural block diagram of an electronic device 1200 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0171] like Figure 12 As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of the device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0172] Multiple components in electronic device 1200 are connected to I / O interface 1205, including: input unit 1206, output unit 1207, storage unit 1208, and communication unit 1209. Input unit 1206 can be any type of device capable of inputting information to electronic device 1200. Input unit 1206 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1207 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1208 may include, but is not limited to, disk and optical disk. Communication unit 1209 allows electronic device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0173] The computing unit 1201 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above. For example, in some embodiments, Figure 1 , Figure 4 , Figures 6 to 1 The method 0 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 1200 via ROM 1202 and / or communication unit 1209. In some embodiments, computing unit 1201 can be configured to execute by any other suitable means (e.g., by means of firmware). Figure 1 , Figure 4 , Figures 6 to 1 The method of 0.

[0174] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0175] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0176] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0177] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0178] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0179] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. A layer-based method for unintentional batch data insertion, characterized in that, The method is applied to a client, the client including a buffer and a layer space record table, the method comprising: Receive a first data insertion request including multiple first key-value pairs, allocate a first leaf node to each of the multiple first key-value pairs to form multiple first request triples, and store the multiple first request triples in the buffer; The insertion requirement space is calculated using the buffer and the layer space record table, and a target layer that satisfies the insertion requirement space is selected from the binary tree in the cloud based on the insertion requirement space. Read all upper triplets of the target layer and all layers before it in the binary tree, allocate a second leaf node to the upper triplet and update the node number of the upper triplet, and use the updated upper triplet, the remaining triplet of the buffer and the first request triplet to form a plurality of first triplets to be inserted. A temporary layer of the target layer is modeled in the buffer, and the insertion results of multiple first triplets to be inserted are simulated using the temporary layer; Based on the insertion result, the first triplet to be inserted is inserted into the target layer of the binary tree.

2. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, The step of calculating the insertion demand space using the buffer and the layer space record table, and selecting the target layer that satisfies the insertion demand space from the binary tree in the cloud, includes: The sum of the number of remaining triples and requested triples in the buffer is calculated to obtain the used space of the buffer; The available space of each layer of the binary tree is read from the layer space record table, and the available space of each layer is determined layer by layer to see if it is greater than or equal to the sum of the used space of the buffer and the cumulative used space of each layer of the binary tree, until the target layer is determined.

3. The layer-based unintentional batch data insertion method as described in claim 2, characterized in that, The step of reading the available space of each layer of the binary tree from the layer space record table, and determining layer by layer whether the available space of each layer is greater than or equal to the sum of the used space of the buffer and the cumulative used space of each layer of the binary tree, until the target layer is determined, includes: Select the current layer, read the available space of each layer from the root to the current layer from the layer space record table, and calculate the cumulative used space before the current layer using the available space of each layer before the current layer. The product of the accumulated used space before the current layer, the sum of the used space in the buffer, and the reserve coefficient is used as the insertion requirement space; Determine whether the available space of the current layer is greater than or equal to the insertion requirement space; If the available space of the current layer is greater than or equal to the insertion requirement space, the current layer is determined as the target layer.

4. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, The step of reading all upper triples of the target layer and all preceding layers in the binary tree includes: Send the layer number of the target layer or the node numbers of all nodes in the target layer to the cloud; Receive all data returned from the cloud for the target layer and all layers preceding it; Decrypt all data in the target layer and all layers preceding it to obtain multiple upper triplets.

5. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, The process of using the upper triplet preceding the target layer, the legacy triplet of the buffer, and the first requested triplet to form multiple first triplets to be inserted includes: Randomly assign a second leaf node to each of the upper triplets, and update the node number of the upper triplet to the node number of the second leaf node to obtain the updated upper triplet. Store the updated upper triplet in the buffer. Multiple first triplets to be inserted are formed by the updated upper triplet, the legacy triplet in the buffer, and the first requested triplet.

6. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, After assigning first leaf nodes to the plurality of first key-value pairs, the method further includes: Add the first key and the corresponding first leaf node number to the position table; or, After updating the node number of the upper triplet, the method further includes: In the position table, find the second key of the updated upper triplet, and modify the node number corresponding to the second key to the node number of the corresponding second leaf node.

7. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, The step of inserting the triplet to be inserted into the target layer of the binary tree according to the insertion result includes: Based on the insertion result, the client determines the target insertion triplet from the first triplet to be inserted, encrypts the target insertion triplet, and obtains multiple encrypted target insertion triplets. The encrypted target insertion triplet and the insertion result are sent to the cloud, so that the cloud inserts multiple encrypted target insertion triplets into the target layer of the binary tree according to the insertion result.

8. The layer-based unintentional batch data insertion method as described in claim 6, characterized in that, Also includes: The available space of each layer before the target layer in the updated layer space record table is modified to the corresponding maximum space, and the available space of the target layer is the available space of the temporary layer.

9. The layer-based unintentional batch data insertion method as described in claim 1, characterized in that, Also includes: Receive data update requests that consist of multiple third key-value pairs, each consisting of a third key and third data. Based on the third key, the node number of the third leaf node corresponding to the third data is found in the location table, and the node number of the third leaf node is sent to the cloud. Decrypt all the data of the path to the third leaf node returned by the cloud to obtain multiple triples to be updated; Based on the third key, the stored data in the triplet to be updated is replaced with the third data to obtain multiple triplets in the update process; The fourth leaf node is reassigned to each of the triples in the update, and the third key, the corresponding third data, and the node number of the corresponding fourth leaf node are combined into an updated triple. The updated triple is then inserted into the binary tree in the cloud.

10. A layer-based unintentional batch data insertion system, characterized in that, The layer-based unintentional batch data insertion system includes a client and a cloud, wherein the client is used to execute the layer-based unintentional batch data insertion method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Security data retrieval method based on oblivious ciphertext inverted index

    CN113722366A

  • ORAM data reliable storage method and system in heterogeneous cloud storage environment

    CN117555486A