Dynamic capacity hidden keyword ciphertext retrieval method and system based on bamboo filter

By adopting a dynamic capacity-hidden keyword encrypted retrieval method based on bamboo filters, the problems of privacy leakage and low retrieval efficiency of electronic medical record data stored in the cloud are solved, realizing efficient and secure keyword retrieval and updates in the cloud, and improving data processing efficiency and security.

CN121365425APending Publication Date: 2026-01-20NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511500137.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

The electronic medical record data stored in the cloud poses a risk of patient privacy leakage during the query and retrieval process, and traditional encryption technology requires full decryption for querying, resulting in low efficiency and failing to meet real-time requirements.

Method used

A dynamic capacity-hidden keyword encrypted retrieval method based on bamboo filters is adopted. By establishing a plaintext index and initializing the state storage structure, the keyword capacity is hidden using bamboo filters and the main storage structure is encrypted. This method supports efficient retrieval and updates without decrypting the data. The method combines pseudo-random functions and hash functions to achieve secure hiding of query results.

Benefits of technology

It enables efficient retrieval and updating of electronic medical record data on cloud servers, hides the number of query results, ensures data privacy, avoids leakage of patient information, and reduces data processing blocking time and communication overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365425A_ABST
    Figure CN121365425A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic capacity hidden keyword ciphertext retrieval method and system based on a bamboo filter, and belongs to the technical field of searchable encryption. The client generates a triple list according to each keyword of each file; initializing a state storage structure and a key; a main storage structure is initialized, specifically, a client side creates a bamboo filter, the bamboo filter comprises a plurality of logic segments, each logic segment is composed of a bucket array, the bucket array comprises a plurality of element buckets, each element bucket is composed of fingerprints and numerical values, the numerical values are composed of triples, and the triples are composed of triples; the client side calculates fingerprints, segment indexes and two possible bucket indexes according to the triple, the keyword capacity is hidden, and a main storage structure is encrypted; and carrying out capacity-hidden keyword search and capacity-hidden keyword fusion search update on the main storage structure. According to the method, the keyword capacity hiding in the query process and the forward and backward security of the updating process are realized, and the electronic case information can be effectively prevented from being stolen by lawbreakers.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of searchable encryption technology, in particular to a dynamic capacity hidden keyword ciphertext retrieval method and system based on a bamboo filter. BACKGROUND

[0002] The rapid development of cloud computing technology is driving the global data storage mode to migrate to the cloud, and more and more sensitive data is stored on cloud servers. However, the separation of data ownership and management rights leads to systematic security risks for users. Infrastructure vulnerabilities, configuration errors or internal personnel violations of cloud service providers can all cause large-scale data breaches. Although traditional encryption technology can guarantee the confidentiality of cloud data, it needs to be decrypted in its entirety before the query operation, which consumes a lot of time and fundamentally contradicts the real-time demand.

[0003] With the digital transformation of the medical industry, electronic case management has gradually become an indispensable part of medical services. Hospitals and medical institutions need to store and analyze patients' medical information while providing efficient diagnosis and treatment services. To meet this demand, more and more medical institutions choose to host electronic case data on cloud servers for access and processing anytime, anywhere. However, this approach also faces many challenges, especially in ensuring patient privacy and data security.

[0004] Electronic case data on cloud servers needs to be stored, managed and queried while ensuring privacy. Although existing encryption technology can protect data storage security, in the process of data query and retrieval, how to avoid leaking sensitive information of patients, hiding the number of query results (attackers may infer the query keyword through the number of query results), while providing update function, is still a problem to be solved. Traditional encryption methods often need to decrypt data before querying and analyzing, which not only increases the risk of data leakage, but also greatly reduces data processing efficiency.

[0005] Searchable encryption technology avoids the process of full decryption of cloud data by directly performing keyword search operations on encrypted data, greatly improving the efficiency of ciphertext retrieval and providing a breakthrough direction for the above-mentioned contradictions. SUMMARY

[0006] Invention purposes: in order to solve the contradiction between the risk of patient privacy leakage caused by cloud storage of electronic medical records and the demand of medical record retrieval and update, the application provides a dynamic capacity hidden keyword ciphertext retrieval method based on bamboo filter, which can support efficient retrieval of electronic medical record data without decrypting data in the cloud server, provide update function of case information, realize quantity hiding of query result, ensure data privacy and greatly improve the efficiency of data retrieval, and avoid exposure of personal medical information of patients.

[0007] Technical scheme: in order to achieve the above purpose, the technical scheme adopted by the application is: A dynamic capacity hidden keyword ciphertext retrieval method based on bamboo filter, comprising the following steps: Step S1, establishing plaintext index: the client generates a triple list according to each keyword of each file.

[0008] Step S2, initializing state storage structure and key.

[0009] Step S3, initializing main storage structure: the client creates a bamboo filter , the bamboo filter includes a plurality of logical segments, each logical segment is composed of a bucket array, the bucket array includes a plurality of element buckets, each element bucket is composed of a fingerprint and a value , the value is composed of a triple , is a keyword, represents a file number, represents a file in the key inner index of the triple list of the keyword . The client calculates the fingerprint , segment index and two possible bucket indexes and according to the triple , and adds the element triple in the triple list of the keyword to the bamboo filter .

[0010] Step S4, hiding the keyword capacity and encrypting the main storage structure, uploading the update cache array and the bamboo filter to the server.

[0011] Step S5, cache update operation.

[0012] Step S6: Search for hidden keywords in the main storage structure and server index information. For the client.

[0013] Step S7, Capacity-Hidden Keyword Fusion Search Update: Client updates index information Decrypt and merge the update; the server updates the cache array. Get keywords All unmerged update caches will update the data and the query results returned by the server. Keywords obtained through fusion Search results.

[0014] Preferred method: The method for initializing the main storage structure in step S3 includes the following steps: Step S31: The client sets the initial size and expansion parameters of the bamboo filter according to actual needs, creating an empty bamboo filter. As the main storage structure.

[0015] Step S32, Keywords List of triples The length is the capacity of the keyword. , Iterate through the list of triples containing all keys, calculate the number of keys corresponding to each capacity, and initialize... Array. Assign the maximum capacity of all keys to the array. :

[0016] in, An array representing the number of keys corresponding to the capacity. Indicates the capacity of the key.

[0017] Step S33, for each keyword List of triples Each triple in Perform the following steps: Step S331, the client uses a hash function Calculate keywords hash value Then Intra-key index Cascade .

[0018]

[0019]

[0020] in, denotes concatenation result, denotes hash function, denotes concatenation operation, denotes id in keyword .

[0021] Step S332, the client uses hash function to hash , to get , calculates the fingerprint , segment index and two possible bucket indexes and and :

[0022]

[0023]

[0024]

[0025]

[0026] wherein, denotes hash value calculated by hash function , denotes fingerprint, is the number of bits of bucket index, is the number of bits of segment index set at initialization, is the number of bits of fingerprint, denotes right shift operation, denotes XOR operation, denotes modulo operation, is the number of rounds of bamboo filter extension, is the initial number of segments set. Step S333, the client converts the triple into a string form, and assigns it to

[0027] , that is .

[0028] Step S334, the segment with index in is found, and it is judged whether there is an element with fingerprint in the buckets with indexes and , if there is, directly concatenate with the existing in each triple element, that is​ If it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket .

[0029] Preferred method: The method for hiding the key capacity and encrypting the main storage structure in step S4 includes the following steps: Step S41, for keywords triple list The length equals the keyword capacity ,Right now Iterate through all keywords, for each keyword... :Towards Fill One element: ,in The maximum capacity of all keywords obtained in step S3, Represents an empty value, for each of the fill elements. Perform the following steps: Step S411: Obtain fingerprint using steps S331-S333. Fill in the characters transformed from the triplet. Segment Index and two possible bucket indexes and . Step S412, search The index is The indices in the segments are respectively of Do the two buckets contain fingerprints? elements If it exists, terminate the operation and do not concatenate the fill element. Next. If it doesn't exist, then in The middle segment index is The bucket index is or Add fingerprints to the bucket The value is Element.

[0030] Step S42, for the bamboo filter Non-empty tuples in each bucket In its value Then splice one random number of length , Then use the key The concatenated is encrypted to generate .

[0031]

[0032] Step S43, the initialized and are sent to the server.

[0033] Preferably, the method for updating the cache in step S5 comprises the following steps: Step S51, the client concatenates the update operation to be performed on the key , the file number , and a random number of a certain length to obtain , encrypts by the key to obtain . .

[0034]

[0035] Wherein: op represents the update operation, and the characters represent adding elements and deleting elements, represents the plaintext of the value to be stored in , and represents the element to be stored in , and represents the encryption operation.

[0036] Step S52, the client uses the pseudo-random function to calculate the hash value of the key concatenated with its version number , queries to obtain the update number of the key , and then uses the pseudo-random function to calculate the hash value of , finally, sends and to the server and updates .

[0037]

[0038] ​​​​​

[0039]

[0040] in, middle: Storage keywords Update version number version , Storage keywords Number of unmerged updates , Represents the seed of the pseudo-random function. express index, Represents a pseudo-random function. Represents the seed of the pseudo-random function. Indicates keywords.

[0041] Step S53, the server uses a hash function. calculate The hash value will Store to The hash value in The position of the mapping .

[0042] Preferred method: The method for searching for hidden keywords in the main storage structure in step S6 includes the following steps: Step S61, the client needs to process the keywords. To perform a query, a hash function is first used. Calculate keywords hash value , Finally Send to the server.

[0043] Step S62, the server initializes a length of array This is used to store the query results. Then, The same as the numbers Cascade to obtain an array

[0044]

[0045] Traversing the array For arrays The first in Item element : Step S621: Using the method in step S332, calculate... Corresponding fingerprint Segment Index and two possible bucket indexes and .

[0046] Step S622, search Index is In the paragraph and Does the index exist in the two buckets? Elements of fingerprints If it exists, then add the array. The first in The item is assigned a value of , If it does not exist, add a null flag to the sequence array. middle, .

[0047] Step S63, the server will send the array The result is returned to the client, which then parses it according to step S7. The final query results are obtained.

[0048] Preferred method: The method for updating the keyword fusion search in step S7 with hidden capacity includes the following steps: Step S71, in step S6, the client sends a request to the server to query keywords. The server returned a response from... The query results consist of encrypted strings. During the parsing process, the client first uses the key. Will Decryption Decrypt and then remove. The random number at the end of each element. At this point, Each element in the string is either empty or a string composed of several triples.

[0049] Step S72, the client will send the array Decompose into target keywords file number array non-matching data array Initialize an empty array Extract array Each element contains keywords Parse the substring composed of triplets, extract the file number from the substring, and store it in an array. The initial length is... array traversal Each element, for The Middle Item element: Remove keywords the remaining part is assigned to the array the first item, if the remaining part is null, the first item is assigned to . Finally, the length of the array is recorded in the variable , which represents the capacity of the keyword q after the last update.

[0050] Step S73, the client determines whether there is an update cache: query the stored in the client , get the update number , of the keyword . If , it means that after the last query keyword , no update operation has occurred for . Skip the following process and end this step, the array is the parsing result. Otherwise, continue to execute the following steps: Step S74, the client initiates a request to query the update cache of the keyword EMM in u : use the pseudo-random function to hash the concatenated string of the keyword and its version number , and get the hash value , . Finally, send the hash value and to the server and adjust , .

[0051]

[0052]

[0053]

[0054] Step S75, the server queries the update cache of the keyword : the server initializes an empty array ups to temporarily store the update operations of the keyword . The server generates a hash sequence according to the hash value .

[0055]

[0056] Then, the hash sequence of all element mapping positions is saved to , and the hash sequence of the original elements of all element mapping positions is set to null. Finally, the array is returned to the client.

[0057]

[0058]

[0059] Step S76, the client decrypts and merges the update cache: the client uses the key to decrypt all elements in the array , . Each element in the array is parsed into an update pair ( ) in the form of . Then, for each update pair , the following operations are performed: If , it means that the element with the key and the file number needs to be deleted from the array . At this time, the client deletes the element from the array .

[0060] If , it means that the element with the key and the file number needs to be added to the array . At this time, the client adds the element to the array . After the client completes the above steps, the merged and updated array is returned to the user as the final query result, and the size of the array at this time is recorded in the variable , , which represents the capacity of the keyword q after this round of update.

[0061] Step S77, upload overflow elements: if is greater than the maximum capacity , the last - elements in the array are taken out to ensure that there are at most elements in the array . For each element taken out, perform the following operation: upload the overflow element to the server again in an updated manner with as the key, with as the update operation, with as the file number, in the manner as in step S5.

[0062] Step S78, fuse V and to generate array . After the processing in step S77, the length of array is . Initialize array of length . For the i-th element of : if , then form a triple (remembered as ) with as the key, with as the in-key index, and with the i-th element of array as the file number. Then, concatenate the triple with the i-th element of array in string form to obtain the i-th element of . if

[0063] , then directly assign the i-th element of to the i-th element of .

[0064] .

[0065] Step S79, concatenate a random number after each element of array , and then encrypt using the key .

[0066]

[0067] where is the bit length of the random number r.

[0068] Step S710, upload the fusion result to the main storage structure: iterate through each element in , and for the i-th element therein: with as the key, as the in-key index, ​​​​​​The in-key index is created, and the corresponding is calculated according to step S331 is sent to the server. The server calculates the calculation fingerprint , segment index and two possible bucket indexes and according to step S332. It is checked whether there is an element with the fingerprint or in the bucket with index in the segment with index in If there is, the value is modified to If there is not, the element is added to the bucket with index or in the segment with index in

[0069] Step S711, judgment and adjustment of capacity: adjust and according to :

[0070]

[0071] After adjusting : if is equal to 0, the maximum capacity is assigned to the index value of the non-0 element with the largest index value in If is greater than , the maximum capacity is assigned to .

[0072] Preferably, the method for establishing the plaintext index in step S1 is: the client assigns a unique file number to each file, extracts the keywords in all files, and generates a corresponding triple list w based on each keyword , wherein the triple in the triple list is , counter represents the in-key index of the file in the triple list of the keyword .

[0073] Preferably, the initialization of the state storage structure and key in step S2 includes: initializing the storage update version array. and update cache array And an array that records the number of keys corresponding to the capacity. Generate a symmetric encryption key Declare hash function and pseudo-random functions Configure pseudo-random functions seeds .

[0074] Another objective of this invention is to provide a dynamic capacity-hidden keyword encrypted retrieval system based on bamboo filters, comprising a client and a server, wherein: The client generates a list of triples for each keyword in each file. It initializes the state storage structure and keys. The client creates a bamboo filter. The bamboo filter It includes multiple logical segments, each consisting of a bucket array. The bucket array contains multiple element buckets, and each element bucket is represented by a fingerprint. f It consists of a value and a triplet. constitute, w As keywords, Indicates the file number. counter Represents a file In keywords The key-in-key index of the triple list. The client uses the triples... Fingerprint calculation Segment Index and two possible bucket indexes and Based on this, keywords List of triples Add the element triples to the bamboo filter In the middle, the key capacity is hidden and the main storage structure is encrypted, and the cache array will be updated. And bamboo filters Upload to server. Cache update operation. Enter search request, process it, and send it to server. Client checks index information. Decrypt and merge the update. Combine the updated data with the query results returned by the server. Keywords obtained through fusion Search results.

[0075] The server performs a keyword search on the main storage structure that hides the capacity, using the server's index information. For the client. The server updates the cache array. Get keywords All unmerged update caches are merged and updated by the client, and the server is updated using the merged data .

[0076] Another object of the present application is to provide an electronic device comprising at least one processor, at least one memory and a communication interface. The processor, memory and communication interface communicate with each other. The memory stores program instructions executable by the processor, and the processor invokes the program instructions to perform the dynamic capacity hiding keyword ciphertext retrieval method based on the bamboo filter.

[0077] Compared with the prior art, the present application has the following beneficial effects: 1. Simultaneous guarantee of capacity hiding and forward and backward security: the present application can realize dynamic capacity hiding, guarantee that the query operation does not leak the number of query results, and the update operation does not leak the number of update operations. In addition, the present scheme also guarantees forward security and type II backward security: the update operation will not be associated with the previously queried keywords. Only the addition time of the deleted keywords and the number of update operations are leaked. This greatly guarantees the security of the data stored in the server.

[0078] 2. Complete dynamic: compared with the existing capacity hiding ciphertext retrieval scheme, the present scheme supports the maximum number of indexes and the maximum capacity of the keywords to be dynamically changed, without the need for the client to participate in restructuring the encrypted index structure, downloading the encrypted index in the server, rebuilding and uploading to the server, thereby avoiding huge time and communication overhead.

[0079] 3. Short blocking time: thanks to the partial key linear hashing technology of the bamboo filter, in the present scheme, when the main storage structure elements are expanded to accommodate more elements or shrunk to save server space, only part of the elements of the main storage structure need to be rehashed, and the remaining elements do not need to be suspended for adjustment. The calculation pressure of the partial element hashing is much smaller than that of the whole main storage structure hashing operation. In addition, the size adjustment operation can be completed by the server alone, without additional communication overhead. The above two factors can greatly reduce the blocking time of the main storage structure size adjustment, optimizing the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0080] Figure 1 System model diagram Figure 2 Overall flowchart Figure 3 Process chart for adding non-padding triplets to the main storage structure Figure 4Capacity hidden keyword fusion search update flow process flow chart Figure 5 Bamboo filter structure diagram Figure 6 Main array change flow chart in example first fusion update flow Figure 7 Main array change flow chart in example second fusion update flow DETAILED DESCRIPTION

[0081] The present application will be further clarified by the following examples and figures, it should be understood that these examples are only used to illustrate the present application and not used to limit the scope of the present application, after reading the present application, the modification of various equivalent forms of the present application by those skilled in the art falls within the scope defined by the claims attached to the present application.

[0082] Example 1 In order to solve the contradiction between the risk of patient privacy leakage caused by cloud storage of electronic medical records and the demand for medical record retrieval and update, the present embodiment provides a dynamic capacity hidden keyword ciphertext retrieval method based on bamboo filter, mainly involving two key technologies: ciphertext multi-value mapping and bamboo filter. Encrypted multi-map (EMM) is an important technology in structured decryption, which supports private query and dynamic update without revealing plaintext information by encrypting the association between keywords and tags. The scheme proposed in the present application uses the association between keyword ciphertext and file number to realize retrieval of files by keywords in an encrypted state. Bamboo filter is a dynamic approximate member lookup structure used to quickly determine whether an element exists in a set. Bamboo filter supports element addition and deletion operations, and realizes low blocking dynamic expansion and contraction by rehashing only part of the elements in the filter. The scheme proposed in the present embodiment uses bamboo filter as the basic data structure, and modifies the storage of only fingerprints in each element of the original bamboo filter scheme to store fingerprints and file numbers, so that it can store encrypted multi-value mapping to realize searchable encryption. Thanks to the excellent size adjustment performance of bamboo filter, the scheme proposed in the present embodiment can realize dynamic searchable encryption at a small cost. As shown in Figure 1 、 2 , the specific steps include the following steps: The method for establishing plaintext index in step S1 is: the client assigns a unique file number to each file , extracts the keywords in all files , and generates a corresponding triple list based on each keyword w , wherein the triple in the triple list is , , counter representing the file In keywords The key-in-key index appearing in the list of triples. Keywords The capacity represents the number of keywords. The number of files, i.e. The length of the list.

[0083] Step S2: Initialize the state storage structure and key.

[0084] The initialization of the state storage structure and key includes: initializing the storage update version array. and update cache array And an array that records the number of keys corresponding to the capacity. Generate a symmetric encryption key Declare hash function and pseudo-random functions Configure pseudo-random functions seeds .

[0085] Step S3, Initialize the main storage structure: The client creates a bamboo filter. The bamboo filter It includes an overflow chain and multiple logical segments. Each logical segment consists of a bucket array, which contains multiple element buckets. Each element bucket is represented by a fingerprint. Sum of values Composition, numerical value By triplet The overflow chain is used to connect element buckets from different segments. Based on the list of triples... The length of the array is updated to correspond to the number of keys. Calculate the maximum capacity The client uses the triples... Fingerprint calculation Segment Index and two possible bucket indexes and Based on the calculated fingerprint Segment Index and two possible bucket indexes and Keywords List of triples Add the element triples to the bamboo filter middle.

[0086] Methods for initializing the main storage structure, such as Figure 3 As shown, it includes the following steps: Step S31: The client sets the initial size and expansion parameters of the bamboo filter according to actual needs, creating an empty bamboo filter. As the main storage structure.

[0087] Step S32, Keywords List of triples The length is the capacity of the keyword. , Iterate through the list of triples containing all keys, calculate the number of keys corresponding to each capacity, and initialize... Array. Assign the maximum capacity of all keys to the array. :

[0088] in, An array representing the number of keys corresponding to the capacity. Indicates the capacity of the key.

[0089] Step S33, for each keyword List of triples Each triple in Perform the following steps: Step S331, the client uses a hash function Calculate keywords hash value Then Intra-key index Cascade .

[0090]

[0091]

[0092] in, Indicates the cascade result. Represents a hash function. Indicates a cascading operation. express In keywords The index in.

[0093] Step S332, the client uses a hash function right Perform hashing to obtain ,pass Fingerprint calculation Segment Index and two possible bucket indexes and :

[0094]

[0095]

[0096]

[0097]

[0098] wherein, represents the hash value calculated by the hash function, represents the fingerprint, is the number of bits of the bucket index, is the number of bits of the segment index set at initialization, is the number of bits of the fingerprint, represents the right shift operation, represents the XOR operation, represents the modulo operation, is the number of rounds of the bamboo filter extension, is the initial number of segments set.

[0099] Step S333, the client converts the triple into a string form, and assigns it to , i.e. .

[0100] Step S334, according to the fingerprint , the segment index and the two possible bucket indexes and , the triple is added to the bamboo filter . Specifically, the segment (layer) with index is found in , and it is determined whether there is an element in the bucket with indexes and . If there is, directly concatenate with the existing in each triple element, i.e. . If not, add the element to the bucket with index or in the segment with index in .

[0101] The bamboo filter is a dynamic approximate membership lookup data structure, which is used to quickly determine whether an element belongs to a specific set. For example,​​Figure 5 As shown, the bamboo filter is a data storage structure composed of three layers of segments, buckets and entries. The entry is the basic unit of the bamboo filter, and each element stores its fingerprint in an entry. Multiple entries are combined into a bucket, which is the basic unit of hash mapping in the insertion, lookup and deletion processes. A series of continuous buckets form a segment, and a series of segments are combined into a bamboo filter. The bamboo filter realizes the adjustment of the size of the filter through the rehashing of the entries in a segment by the partial key linear hash and index shared fingerprint technology, so that it has the advantages of low blocking and server-independent filter size adjustment.

[0102] The ciphertext multi-value mapping maps the encrypted representation of each keyword to one or more corresponding file numbers, thereby enabling efficient retrieval of related files based on encrypted keywords without decrypting the data. The ciphertext multi-value mapping can effectively support multi-keyword queries, improve retrieval efficiency, and ensure data privacy and security, avoiding the leakage of any sensitive information about the file content or quantity during the query process.

[0103] In searchable encryption technology, the capacity of a keyword refers to the number of files containing the keyword, which is represented by the number of keyword mapping values in the established ciphertext multi-value mapping.

[0104] Dynamic retrieval result capacity hiding: In conventional searchable encryption schemes, the number of elements contained in the server's query results is the capacity of the query keyword. Attackers can use the capacity information of the keyword leaked during the query process to launch attacks. The capacity hiding technology can hide the capacity information of the keyword. The more common approach is to fill the query results of each keyword to the maximum value. In dynamic searchable encryption schemes, in order to ensure data security, in addition to ensuring that the query process does not leak the capacity information of the keyword, it is also necessary to ensure that the number of files involved in each update is not leaked.

[0105] Step S4, hide the capacity of the keyword and encrypt the main storage structure: the client fills the capacity of all keywords in the main storage structure to the maximum capacity , and encrypts the values in the main storage structure using the key . Finally, the update cache array and are uploaded to the server.

[0106] The method of hiding the capacity of the keyword and encrypting the main storage structure includes the following steps: Step S41, for the keyword , the length of the triple list is equal to the capacity of the keyword ​​ ,Right now Iterate through all keywords, for each keyword... :Towards Fill One element: ,in The maximum capacity of all keywords obtained in step S3, Represents an empty value, for each of the fill elements. Perform the following steps: Step S411: Obtain fingerprint using steps S331-S333. Fill in the characters transformed from the triplet. Segment Index and two possible bucket indexes and . Step S412, search The index is The indices in the segment (layer) are respectively of Do the two buckets contain fingerprints? elements If it exists, terminate the operation and do not concatenate the fill element. Next. If it doesn't exist, then in The middle segment index is The bucket index is or Add fingerprints to the bucket The value is Element.

[0107] Step S42, for the bamboo filter Non-empty tuples in each bucket In its value Then splice one random number of length , Then use the key spliced Encrypt and generate .

[0108]

[0109] Step S43, initialize the and Send to the server.

[0110] Step S5, Cache Update Operation: The client will update all keywords that need to be updated. hash value The encrypted update operation information is sent to the server, and the stored update version array stored on the client is modified. The server stores the updated information in the update cache array. In the middle, keywords to be targeted When the search occurs, the cache array will be updated. The cached data is updated and merged according to step S7.

[0111] The method for cache update operations includes the following steps: Step S51, the client will need to perform keyword analysis. Update operations performed Document Number And one random number of length By cascading, we can obtain Through the key encryption get .

[0112]

[0113] Where: op represents the specific update operation, represented by characters. This indicates adding and deleting elements. express The plaintext of the value that needs to be stored. express It needs to store elements. This indicates an encryption operation.

[0114] Step S52, the client uses Use a pseudo-random function as the seed. Calculate keywords Cascade its version number hash value Query Get keywords Number of updates , and then As a seed, use a pseudo-random function calculate hash value Finally, and Send to the server and update .

[0115]

[0116]

[0117]

[0118] wherein, wherein, the update version number of the storage key version the update version number of the storage key the number of unmerged updates denotes a pseudo-random function seed, denotes an index of, denotes a pseudo-random function, denotes a pseudo-random function seed, denotes a key.

[0119] Step S53, the server calculates the hash value of using a hash function

[0120] Step S6, capacity-hidden key search on the main storage structure: the client sends the hash value of the key

[0121] The method for capacity-hidden key search on the main storage structure comprises the following steps: Step S61, the client needs to perform a query operation on the key

[0122] Step S62, the server initializes an array with a length of

[0123]

[0124] ​​​​​​​​​​​​​​​​​​​​​​​​For arrays The first in Item element : Step S621: Using the method in step S332, calculate... Corresponding fingerprint Segment Index and two possible bucket indexes and .

[0125] Step S622, search Index is In the paragraph and Does the index exist in the two buckets? Elements of fingerprints If it exists, then add the array. The first in The item is assigned a value of , If it does not exist, add a null flag to the sequence array. middle, .

[0126] Step S63, the server will send the array The result is returned to the client, which then parses it according to step S7. The final query results are obtained.

[0127] Step S7, Hidden Keyword Fusion Search Update: Server-side updates storage structure Get keywords All unmerged update caches will update the data and the query results returned by the server. Keywords obtained through fusion The search results are merged and updated back to the main storage structure. of Individual and The relevant locations should be cleared last. Chinese keywords w Cache information, update the storage of updated version array .

[0128] Methods for updating search results by incorporating hidden keywords, such as... Figure 4 As shown, it includes the following steps: Step S71, in step S6, the client sends a request to the server to query keywords. The server returned a response from... The query results consist of encrypted strings. During the parsing process, the client first uses the key. Will Decryption Decrypt and then remove. The random number at the end of each element. At this point, Each element in the string is either empty or a string composed of several triples.

[0129] Step S72, the client will send the array Decompose into target keywords file number array non-matching data array Initialize an empty array Extract array Each element contains keywords Parse the substring composed of triplets, extract the file number from the substring, and store it in an array. The initial length is... array traversal Each element, for The Middle Item element: Remove keywords The triple substring, the remaining part is assigned to the array. The If the remaining part is empty, then The The item is assigned an empty value. Finally, the array is... The length is recorded in the variable middle, , This indicates the capacity of keyword q after the previous update.

[0130] Step S73, the client determines whether an update cache exists: query the cache stored on the client. Get keywords Number of updates , .like This indicates that the keywords were searched in the previous round. After that, there was no targeting An update operation has occurred. Skip subsequent processes and end this step; array This is the parsing result. Otherwise, continue with the following steps: Step S74: The client initiates a request to query keywords. exist EMM u Update cache in: As a seed, use a pseudo-random function Keywords Its version number hashing the concatenated string to obtain a hash value , . Finally, the hash value and are sent to the server, and , are adjusted.

[0131]

[0132]

[0133]

[0134] Step S75, the server queries the update cache of the keyword : the server initializes an empty array ups to temporarily store the update operations of the keyword . The server generates a hash sequence according to the hash value .

[0135]

[0136] Then, the elements in the hash sequence whose positions are mapped by all elements in are saved to , and the original elements in the hash sequence whose positions are mapped by all elements in are set to null. Finally, the array is returned to the client.

[0137]

[0138]

[0139] Step S76, the client decrypts and merges the update cache: the client uses the key to decrypt all elements in the array , . Each element in is parsed into an update pair ( . Then, for each update pair , the following operations are performed: If , it means that the element with the keyword and the file number needs to be deleted from . At this time, the client deletes the element from the array .

[0140] if This means that it is necessary to Add keywords as The document number is The elements. At this point, the client sends the array... Add elements After completing the above steps, the client will merge and update the array. The final query result is returned to the user, and at this time... The size is recorded in the variable middle, , Keywords indicating the latest update q The capacity.

[0141] Step S77, Upload the overflow element: If Greater than the maximum capacity Then first retrieve the array. Mid-back - Item elements to ensure array The most Each element is selected. Perform the following operations: Using keywords, For update operations, with Assign a file number, and following the method in step S5, upload the overflowing element back to the server in an updated manner.

[0142] Step S78, merging V and Generate array After step S77, the array The length is The initial length is... array .for The The item element is processed as follows: like , will be Using keywords, In-key index, in array The Middle The item elements are used as file numbers to form triples. (notation) Then, the triplet Same as array in string form No. Cascading of elements yields The Item element.

[0143]

[0144] like Then directly The Item element assigned to The Item element .

[0145] Step S79, in the array Each element is concatenated with a random number, and then the key is used. encryption.

[0146]

[0147] in Let r be the bit length of the random number.

[0148] Step S710, Upload the fusion result to the main storage structure: Traverse For each element in the list, for the first element... Item element: Use as keywords Create an intra-key index, and calculate the corresponding index according to step S331. ,Will as well as The fingerprint is sent to the server. The server calculates the fingerprint according to step S332. Segment Index and two possible bucket indexes and Search The index is The index in the segment is or Does the bucket contain fingerprints? elements If it exists, then set its value. Modified to If it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket .

[0149] Step S711, determine and adjust capacity: according to and Adjustment :

[0150]

[0151] Adjustment After: If If the value is 0, then the maximum capacity will be... Assigned value The index of the largest non-zero element in the index. If Greater than Then the maximum capacity Assigned value .

[0152] Example 2 To address the conflict between the risk of patient privacy breaches caused by cloud-based electronic medical records and the need for medical record retrieval and updates, this embodiment provides a dynamic capacity-hidden keyword encrypted retrieval system based on a bamboo filter, comprising a client and a server, wherein: The client generates a list of triples for each keyword in each file. It initializes the state storage structure and keys. The client creates a bamboo filter. The bamboo filter It includes multiple logical segments, each consisting of a bucket array. The bucket array contains multiple element buckets, and each element bucket is represented by a fingerprint. Sum of values Composition, numerical value By triplet constitute, w As keywords, Indicates the file number. Represents a file In keywords The key-in-key index of the triple list. The client uses the triples... Fingerprint calculation Segment Index and two possible bucket indexes and Based on this, keywords List of triples Add the element triples to the bamboo filter In the middle, the key capacity is hidden and the main storage structure is encrypted, and the cache array will be updated. And bamboo filters Upload to server. Cache update operation. Enter search request, process it, and send it to server. Client checks index information. Decrypt and merge the update. Combine the updated data with the query results returned by the server. Keywords obtained through fusion Search results.

[0153] The server performs a keyword search on the main storage structure that hides the capacity, using the server's index information. To the client. The server side updates the cache array Obtains the keyword All unmerged update caches, and updates the merged data to the server's .

[0154] In another embodiment, an electronic device is provided, comprising: at least one processor, at least one memory, and a communication interface. The processor, memory, and communication interface communicate with each other. The memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the dynamic capacity hiding keyword ciphertext retrieval method based on a bamboo filter.

[0155] Embodiment 3 The application is further described below in conjunction with examples At this time, the scenario is keyword ciphertext retrieval of electronic cases: initially provide 3 cases. Extract three target keywords in the cases: cough, fever, and amoxicillin. The cases contain keywords as shown in Table 1: Table 1 Case keyword inclusion

[0156] √ indicates inclusion of keyword The above cases are used as an initialization data set. After initialization, an update operation is performed, and a case containing the keyword 'amoxicillin' with the number is added to the main storage structure. Finally, the keyword "amoxicillin" is queried twice. During the query process, the keyword true capacity is hidden, as shown in Figure 6 and 7 , and the steps are as follows: Step 1, establish plaintext index: the client assigns file numbers to the cases , case 1~case 3 are assigned numbers ; extract the keywords in all files, and generate the corresponding triplet list based on each keyword w . Among them, represents the order of the file in the keyword triplet list (hereinafter referred to as: key internal index). The capacity of the keyword indicates the number of files containing the keyword , that is, the length of the list. After extraction, generate the of each keyword as follows: Table 2 Extracted keyword

[0157]

[0158] Step S2, initialize state storage structure and key: initialize storage update version array and update cache array and array recording the number of keys corresponding to the capacity . Generate symmetric encryption key , declare hash function and pseudo-random function and configure the seed of pseudo-random function .

[0159] Step S3, initialize main storage structure.

[0160] Step S31, the client sets the initial size and expansion parameters of the bamboo filter according to actual needs, creates an empty bamboo filter .

[0161] Step S32, the length of the triple list of key is the capacity of the key . Traverse all triple lists of keys, calculate the number of keys corresponding to each capacity, and initialize array; assign the maximum capacity of all keys to : The capacities of the keys "cough", "fever" and amoxicillin are 2, 1 and 2 respectively. After this step,

[0162] the elements stored in are 0, 1, 2 (the index starts from 0), and the maximum capacity is 2.

[0163] Step S33, for each element in the triple list of key , perform the following steps: Step S331, the client calculates the hash value of the key using the hash function , and then concatenates with the key index to get .

[0164]

[0165] Step S332, the client uses the hash function on​​ Perform hashing to obtain .pass Fingerprint calculation Segment Index and two possible bucket indexes and :

[0166]

[0167]

[0168]

[0169] in, The number of bits in the bucket index. The number of bits for the segment index as set during initialization. The number of digits in the fingerprint. The number of wheels to extend the bamboo filter, The initial number of segments is set.

[0170] Step S333: The client converts the triplet into a string and assigns it to... ,Right now .

[0171] Step S334, search The index is The segment, determine the index as and Does the bucket contain fingerprints? elements If it exists, then directly... With existing entries in each entry Cascade, i.e. .

[0172] If it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket .

[0173] In the example, assume the triplet same They have the same segment index, bucket index, and fingerprint. First, group the triples... Add to the main storage structure, add a triple to the main storage structure. At that time, directly put the triplet The converted string is the same as the triplet. The values ​​stored in the main storage structure are concatenated.

[0174] Step S4: Hide the key capacity and encrypt the main storage structure.

[0175] Step S41, for keywords triple list The length equals the keyword capacity .Right now Iterate through all keywords, for each keyword :Towards Fill One element: .in The maximum capacity of all keywords obtained in step S5, This represents a null value. For each of the fill elements... Perform the following steps (in this example, only the critical "heating" capacity is less than the maximum capacity, requiring a triplet to be filled). ): Step S411: Obtain fingerprint using steps S331 to S333. Fill in the triplet string Segment Index and two possible bucket indexes and .

[0176] Step S412, search The index is The indices in the segments are respectively of Do the two buckets contain fingerprints? elements If it exists, terminate the operation; do not append the fill element to it. After; if it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket .

[0177] Step S42, for the bamboo filter Non-empty tuples in each bucket In its value Post-assembly random number of length Then use the key. spliced Encrypt and generate .

[0178]

[0179] wherein is a random number of bit length.

[0180] Step S43, send the initialized and to the server.

[0181] Step S5, cache update operation.

[0182] Step S51, the client adds a case containing the keyword 'amoxicillin' with the number to the main storage structure. The client concatenates the add operation flag with the file number and a length random number ( ), gets , encrypts to get

[0183]

[0184] wherein the operation flag is assigned , indicating adding an element.

[0185] Step S52, the client uses the pseudo-random function to calculate the hash value of the keyword concatenated with its version number using as the seed. Query to obtain the update number of the keyword . Then use the pseudo-random function to calculate the hash value of using as the seed. Finally, send and to the server and update .

[0186]

[0187]

[0188]

[0189] In the above: store the keyword​ Update version number version , Storage keywords Number of unmerged updates cnt Because this is the first update operation, therefore... ={0,0}, after this step... ={0,1}.

[0190] Step S53, the server uses a hash function. calculate The hash value will Store to The hash value in The position of the mapping .

[0191] Step S6: Search for keywords hidden in the main storage structure.

[0192] Step S61, the client needs to process the keywords. To perform a query for ("amoxicillin"), a hash function is first used. Calculate keywords hash value Finally Send to the server.

[0193] Step S62, the server initializes a length of array This is used to store the query results. Then, The same as the numbers Cascade (in this example) ), to obtain an array

[0194]

[0195] Traversing the array For arrays The first in Item element : Step S621: Using the method in step S332, calculate... Corresponding fingerprint Segment Index and two possible bucket indexes and .

[0196] Step S622, search Index is In the paragraph and Does the index exist in the two buckets? Elements of fingerprints If it exists, then add the array. The first in The item is assigned a value of If it does not exist, add a null flag to the sequence array. middle .

[0197] Step S63, the server will send the array The result is returned to the client, which then parses it according to the subsequent steps. The final query results are obtained. Note that regardless of how many actual query results are generated for the specified keywords, the final returned array will always be the same. All contain Each element. This allows the true size of the keyword to be hidden.

[0198] Step S7: Capacity-hidden keyword fusion search update.

[0199] Step S71: In step S6, the client sends a request to the server to query keywords. The server returned a response from... The query results consist of encrypted strings. During the parsing process, the client first uses the key. Will Decryption Decrypt and then remove. The random number at the end of each element. At this point, Each element in the string is either empty or a string composed of several triples. The structure is shown in Figure 6.

[0200] Step S72, the client will send the array Decompose into target keywords file number array non-matching data array Initialize an empty array Extract array Each element contains keywords Parse the substring composed of triplets, extract the file number from the substring, and store it in an array. In the middle; the initial length is array traversal Each element, for The Middle Item element: Remove keywords The triple substring, the remaining part is assigned to the array. The Item (if the remaining part is null, also need to the first Item assignment to). Finally, the length of the array recorded in the variable , indicating the last round of updated keywords q capacity. After the decomposition of , see Figure 6. After the decomposition of .

[0201] Step S73, the client determines whether there is an update cache: query stored in the client , get the number of updates keyword . In the example, then indicates that after the last round of query keywords , there are updates for operation, continue to execute the subsequent steps.

[0202] Step S74, the client initiates a request to query the update cache of keyword in : using the pseudo-random function as a seed, hash the concatenated string of the keyword and its version number to get the hash value . Finally, send the hash value and to the server and adjust .

[0203]

[0204]

[0205]

[0206] Step S75, the server queries the update cache of keyword : the server initializes an empty array ups, which is used to temporarily store the update operation of keyword . The server generates a hash sequence according to the hash value .

[0207]

[0208] Then, save the elements in the hash sequence all elements in to , and adjust . Middle hash sequence Set the original element at each mapped position to null. Finally, set the array... Returned to the client.

[0209]

[0210]

[0211] Step S76, the client decrypts and merges the updated cache: the client uses the key. Will Decrypt all elements in the array .Will Each element in the parsing is updated as a binary tuple ( In this example, After decryption, only elements are present. . This means that it is necessary to Add keywords as The document number is The elements. At this point, the client sends the array... Add elements After completing the above steps, the client will merge and update the array. The final query result is returned to the user, and at this time... The size is recorded in the variable The middle part represents the keywords after this round of updates. q The capacity. After integration and update Figure 6.

[0212] Step S77, Upload the overflow element: Greater than the maximum capacity First, retrieve the array. Mid-back - Item elements to ensure array The most One element. In this example, the last element is retrieved. For each element retrieved Perform the following operations: Using keywords, For update operations, with Assign file numbers and, following steps S9-S11, upload the overflowed elements back to the server in an updated manner. Extract the array containing the overflowed elements. See Figure 6.

[0213] Step S78, merging V and Generate array : After step S21, array has length . Initialize array of length . For the th element (counting from 0) of : If , form the triple (key, in-key index, file number) with as the key, the th element of array as the in-key index, and the th element of array as the file number. Then concatenate the string form of the triple with the th element of array to get the th element of array .

[0214]

[0215] If , simply assign the th element of array to the th element of array . For the example, after this step, the structure of is shown in Fig. 6.

[0216] Step S79, concatenate a random number to each element of array , then encrypt using key .

[0217]

[0218] where is the bit length of the random number r.

[0219] Step S710, upload the fusion result to the main storage structure: iterate through each element of , for the th element of which: with as the key, as the in-key index, compute the corresponding according to step S5.1. Send and to the server. The server computes the fingerprint , segment index and two possible bucket indices and . Find the element with fingerprint in the bucket with index or in the segment with index in . If it exists, modify its value to . If it does not exist, add the element to the bucket with index , bucket index or in .

[0220] Step S711, judge and adjust the capacity: adjust and :

[0221]

[0222] After adjusting : if is equal to 0, assign the maximum capacity to the index value of the non-0 element with the largest index value in . If is greater than , assign the maximum capacity to . In this example, after completing this step .

[0223] Step S712, query the keyword “Amoxicillin” again, and the query result returned by the server will contain 3 elements. That is, the added file number is normally updated to the main storage structure. Refer to steps S62~S711.

[0224] For this query fusion process, the main array change process is as shown in FIG. 7.

[0225] ​The application supports dynamic updating operation of the electronic medical record library while realizing safe ciphertext retrieval. The technology proposed in the application is divided into four parts: initialization, cache updating, query and fusion updating. In the initialization part, the client creates and initializes the data structure required by the client and the server; the cache updating part is used for implementing the updating of the data cache to the updating cache array of the server; the query part is used for querying the index information of the file corresponding to the keyword; and the fusion updating part triggers after each query of the client with the updated cache of the keyword, and fuses the update of the query target keyword in the updating cache data structure into the main storage structure. The application realizes the keyword capacity hiding in the query process and the forward and backward security of the updating process, and can effectively prevent the electronic medical record information from being stolen by illegal persons.

[0226] The above only describes the preferred embodiments of the application, and it should be noted that those skilled in the art can make some improvements and refinements without departing from the principles of the application, and these improvements and refinements should also be considered as the protection scope of the application.

Claims

1. A dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter, characterized by, The method comprises the following steps: Step S1, establishing plaintext index: the client generates a triple list according to each keyword of each file; Step S2, initializing state storage structure and key; Step S3, Initialize the main storage structure: The client creates a bamboo filter. The bamboo filter It includes multiple logical segments, each consisting of a bucket array. The bucket array contains multiple element buckets, each element bucket being a fingerprint. Sum of values Composition, numerical value By triplet constitute, As keywords, Indicates the file number. Represents a file In keywords The key index of the triplet appearing in the list; the client uses the triplet as the key index. Fingerprint calculation Segment Index and two possible bucket indexes and Based on this, keywords List of triples Add the element triples to the bamboo filter middle; Step S4, hide the key capacity and encrypt the main storage structure, update the cache array and a bamboo filter upload to the server; Step S5, cache update operation; Step S6, key search on the main storage structure with capacity hidden, server index information to the client; Step S7, capacity hidden keyword fusion search update: client updates index information Decryption and fusion update, server side from update cache array Get keyword All un-fusion update cache, update data and server return query result Fusion keyword Search results, and refresh the local cache information, update server with fusion data.

2. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 1, characterized in that: The method for initializing the main storage structure in step S3 comprises the following steps: Step S31, the client sets the initial size and expansion parameters of the bamboo filter according to actual needs, and creates an empty bamboo filter As a main storage structure; Step S32, the keyword list of triples of the length is the capacity of the keyword , ; all the keyword triples list is traversed, the number of keywords corresponding to each capacity is calculated, and the array is initialized; the maximum capacity of all keywords is assigned to : wherein, an array representing the number of keywords corresponding to the capacity, represents the capacity of the keyword; Step S33, for each keyword of the triple list each triple , the following steps are performed: Step S331, the client uses a hash function Calculate keywords hash value Then Intra-key index Cascade ; wherein, denotes concatenation, denotes a hash function, denotes concatenation, denotes an index in the keyword tree. Step S332, the client uses a hash function right Perform hashing to obtain ,pass Fingerprint calculation Segment Index and two possible bucket indexes and : wherein, hashing function calculated hash value, denotes a fingerprint, is the number of bits of the bucket index, is the number of bits of the segment index set at initialization, is the number of bits of the fingerprint, denotes a right shift operation, denotes an XOR operation, denotes a modulo operation, is the number of rounds of the bamboo filter extension, is the initial number of segments set; Step S333, the client converts the triple into a string form, assigns it to , that is ; Step S334, search The index is The segment, determine the index as and Does the bucket contain fingerprints? elements If it exists, directly... With each triplet element, the existing Cascade, i.e. If it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket .

3. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 2, characterized in that: The method for hiding the keyword capacity and encrypting the main storage structure in step S4 comprises the following steps: The method for cache update operation in step S5 comprises the following steps: Step S41, for each key , the length of the list of triples is equal to the capacity of the key , i.e. ; for all the keys, for each key : fill in with elements: where is the maximum capacity of all the keys obtained in step S3, represents a null value, for each filled element , the following steps are performed:​ Step S411, using the steps of S331-S333, obtains the fingerprint , fill in the character of the triple conversion , segment index and two possible bucket indexes and ; Step S412, search The index is The indices in the segments are respectively of Do the two buckets contain fingerprints? elements If it exists, terminate the operation and do not concatenate the fill element. After; if it does not exist, then in The middle segment index is The bucket index is or Add fingerprints to the bucket The value is Element; Step S42, for the bamboo filter Non-empty tuples in each bucket In its value Then splice one random number of length , Then use the key spliced Encrypt and generate ; Step S43, the initialized and are sent to the server.

4. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 3, characterized in that: version Step S51, the client will need to the keyword Update operation , file number And a Length of random number Cascade, get , through the key Encryption Get ; wherein: op denotes an update operation, respectively indicated by the characters representing an addition element and a deletion element, representing the clear text of the value to be stored in representing the element to be stored in represents an encryption operation; Step S52, the client uses Use a pseudo-random function as the seed. Calculate keywords Cascade its version number hash value Query Get keywords Number of updates , and then As a seed, use a pseudo-random function calculate hash value Finally, and Send to the server and update ; wherein, in the middle: the update version number of the storage key , The method for keyword search on the capacity-hiding main storage structure in step S6 comprises the following steps: , the storage key the number of unmerged updates , denotes a pseudo-random function seed, denotes an index of, a pseudo-random function, denotes a pseudo-random function seed, denotes a key; Step S53, the server uses a hash function to calculate the hash value of , and stores the hash value to the position in the hash table that the hash value of is mapped to. .​​ 5. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 4, characterized in that: The method for capacity-hiding keyword fusion search update in step S7 comprises the following steps: Step S61, the client needs to query the keyword , first uses a hash function to calculate the hash value of the keyword , , , and finally sends to the server; Step S62, the server initializes a length of array This is used to store the query results; then, The same as the numbers Cascade to obtain an array Traverse the array For the th element in the array : Step S621, using the method in step S332, calculates out the corresponding fingerprint , segment index and two possible bucket indexes and ; Step S622, search Index is In the paragraph and Does the index exist in the two buckets? Elements of fingerprints If it exists, then add the array. The first in The item is assigned a value of , If it does not exist, add a null flag to the sequence array. middle, ; Step S63, the server returns the array to the client, which parses the array according to step S7 to obtain the final query result.

6. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 5, characterized in that: EMM Step S71, in step S6, the client initiates a request to the server, querying the keyword ; the server returns the query result composed of encrypted strings ; in the parsing process, the client first uses the key to decrypt ; after decryption, the random number at the end of each element in is removed; at this time, each element in is either a null value or a string composed of several triplets spliced together Step S72, the client will send the array Decompose into target keywords file number array non-matching data array Initialize an empty array Extract array Each element contains keywords Parse the substring composed of triplets, extract the file number from the substring, and store it in an array. In the middle; the initial length is array traversal Each element, for The Middle Item element: Remove keywords The triple substring, the remaining part is assigned to the array. The If the remaining part is empty, then The The item is assigned an empty value; finally, the array is... The length is recorded in the variable middle, , This indicates the capacity of keyword q after the previous update; Step S73, the client determines whether an update cache exists: query the cache stored on the client. Get keywords Number of updates , ;like This indicates that the keywords were searched in the previous round. After that, there was no targeting An update operation has occurred; skip subsequent processes and end this step, array This is the parsing result; otherwise, continue with the following steps: Step S74, the client initiates a request, inquires the keyword In counter u Update cache: take As a seed, use a pseudo-random function Hash the concatenated string of the keyword And its version number To get the hash value , Finally, send the hash value And To the server and adjust , ; Step S75, the server queries the keyword 's update cache: the server initializes an empty array ups for temporarily storing the keyword 's update operation; the server generates a hash sequence according to the hash value ; Then, the hash sequence in the middle The element of the element mapping position is saved to , and the hash sequence in the middle The original element of the element mapping position is set to null; finally, the array is returned to the client; Step S76, Client decrypts and merges update cache: Client uses key will be decrypted, all elements in the array, ; each element in the array is parsed into an update pair of the form (update, key); then for each update pair , the following is performed: , the following is performed: If , it means that the element whose key is and file number is needs to be deleted in ; at this time, the client deletes the element in the array ; If , it means that the element with the key and the file number needs to be added to the array ; at this time, the client adds the element to the array ; after the client completes the above steps, the array after the fusion update is returned to the user as the final query result, and the size of at this time is recorded in the variable , , , indicating the capacity of the keyword q after the update this round. Step S77, Upload the overflow element: If Greater than the maximum capacity Then first retrieve the array. Mid-back - Item elements to ensure array The most in Each element; for each element retrieved Perform the following operations: Using keywords, For update operations, with Assign a file number, and following the method in step S5, upload the overflowing element back to the server in an updated manner; Step S78, fusing V and Generating array After processing by step S77, array has length ; initialize array of length ; for the th element of : If , the key is , the key internal index is , the file number is the th element in the array , and the triple is (written as ); then, the th element of is obtained by concatenating the triple with the th element of the array ; If , then directly assign the element at the th position of to the element at the th position of ; and ; Step S79, concatenate a random number after each element of the array , and then encrypt using the key ; wherein is the bit length of the random number r; Step S710, Upload the fusion result to the main storage structure: Traverse For each element in the list, for the first element... Item element: Use as keywords Create an intra-key index, and calculate the corresponding index according to step S331. ,Will as well as The fingerprint is sent to the server; the server calculates the fingerprint according to step S332. Segment Index and two possible bucket indexes and Search The index is The index in the segment is or Does the bucket contain fingerprints? elements If it exists, then set its value. Modified to If it does not exist, then in The middle segment index is The bucket index is or Add elements to the bucket ; Step S711, judging and adjusting the capacity: according to and adjusting : adjustment if equal to 0, the maximum capacity is assigned to the index value of the non-0 element with the largest index value; if is greater than , the maximum capacity is assigned to .

7. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 6, characterized in that: The method for establishing the plaintext index in step S1 is as follows: the client assigns a unique file number to each file. Extract keywords from all files And based on each keyword w Generate the corresponding list of triples Among them, the triples in the triple list are , The system comprises a client and a server, wherein: Represents a file In keywords The key-in-key index that appears in the list of triples.

8. The dynamic capacity hidden keyword ciphertext retrieval method based on a bamboo filter according to claim 7, characterized in that: The initialization of the state storage structure and the key in step S2 includes: initializing a storage update version array and an update cache array and an array recording the number of keys corresponding to the capacity , generating a symmetric encryption key , declaring a hash function and a pseudo-random function and configuring the seed of the pseudo-random function .

9. A dynamic capacity hidden keyword ciphertext retrieval system based on a bamboo filter, characterized by: The system comprises: The client generates a list of triples for each keyword in each file; initializes the state storage structure and keys; and creates a bamboo filter. The bamboo filter It includes multiple logical segments, each consisting of a bucket array. The bucket array contains multiple element buckets, and each element bucket is represented by a fingerprint. Sum of values Composition, numerical value By triplet constitute, As keywords, Indicates the file number. Represents a file In keywords The key index of the triplet appearing in the list; the client uses the triplet as the key index. Fingerprint calculation Segment Index and two possible bucket indexes and Based on this, keywords List of triples Add the element triples to the bamboo filter In the middle; hide the key capacity and encrypt the main storage structure, and update the cache array. And bamboo filters Upload to server; cache update operation; input search request and send to server after processing; client access to index information. Decrypt and merge the updated data, and then update the server with the merged data. middle; The server performs a key search on the main storage structure with capacity hiding, the server index information The server end updates the cache array Obtains the key All unmerged update caches.

10. An electronic device, comprising: at least one processor, at least one memory and a communication interface; The processor, the memory and the communication interface communicate with each other; The memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the bamboo filter-based dynamic capacity-hiding keyword ciphertext retrieval method in any one of claims 1-8. ​