Filtering matrix keyword retrieval method and device, equipment and medium

By establishing a binary fusion filter structure in the database and generating a filtering matrix, and utilizing encrypted parameter sets and homomorphic inner product mechanisms, the keyword retrieval delay problem in the fintech and healthcare fields was solved, achieving an efficient and secure query process.

CN121145240APending Publication Date: 2025-12-16PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511381635.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing database queries in the fintech and healthcare sectors, keyword-based retrieval methods cannot achieve high efficiency while maintaining privacy protection. This results in excessive computational and communication overhead, high query latency, and difficulty in meeting the requirement of second-level response, especially on resource-constrained terminal devices.

Method used

A binary fusion filter structure is established, database data item information is written into the filter structure, a filter matrix is ​​generated and an encrypted parameter set is generated, an index vector is constructed through the hash position set to generate an encrypted query vector and query status information, and the server performs homomorphic inner product processing based on the filter matrix and the encrypted query vector to generate encrypted response data and perform reconstruction operation.

Benefits of technology

It achieves reduced computing and communication overhead while maintaining privacy, improves query efficiency, meets the second-level response requirements of the fintech and healthcare fields, and is compatible with resource-constrained terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145240A_ABST
    Figure CN121145240A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information encryption and decryption, can be applied to business scenes such as financial science and technology and medical health, and discloses a filter matrix keyword retrieval method, device and equipment and a medium. Receiving a query keyword and generating a hash position set, constructing an index vector and generating an encrypted query vector and query state information, executing homomorphic inner product processing by the server based on the filter matrix and the encrypted query vector to generate encrypted response data, and reconstructing and generating a query result based on the query state information. According to the method, encryption query and result reconstruction are achieved through the binary fusion filter and the homomorphic inner product mechanism, query content leakage is avoided, calculation and communication overhead is reduced through matrix processing, the keyword retrieval function is kept, meanwhile, the efficiency is close to index type PIR, and the private information retrieval practicability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information encryption and decryption, and in particular to a filtering matrix keyword search method, device, equipment and storage medium. BACKGROUND

[0002] In the field of financial technology business, database queries usually involve massive user records, transaction records and risk assessment indicators. Traditional private information retrieval methods are mostly based on index positioning to achieve user privacy protection, which can theoretically guarantee query security, but are limited to accessing data by fixed position. When facing actual business needs, keyword-based retrieval is often required, such as locating certain transaction labels, contract terms or risk control rules by keywords. The existing technology maps keywords to multiple indexes and runs multiple sub-protocols, which not only brings a fold increase in computing and communication overhead, but also significantly increases system response delay. In the financial field, especially in high-frequency transaction risk control with second-level response requirements, such delay will directly affect the timeliness of risk disposal. At the same time, traditional methods have a significant burden on server computing and bandwidth consumption, increasing the cloud running cost of financial institutions and reducing the feasibility.

[0003] In the field of medical health business, the database is also mainly composed of structured electronic medical records, examination reports and medication records, and the core query requirement is often based on keywords such as drug names, pathological characteristics or diagnosis labels. The existing private information retrieval technology still relies on converting keywords into multiple array indexes for retrieval when processing such keyword queries, which results in the need to initiate a much higher number of sub-queries for a single query. As a result, the response speed of the medical database is significantly reduced, and medical personnel and intelligent auxiliary diagnosis and treatment systems cannot obtain results in a short time, directly affecting the efficiency of clinical decision-making. At the same time, the solution of storing a large number of mapping relationships to support keyword search also puts too high a requirement on the storage capacity of terminal devices, making it difficult to adapt to resource-constrained medical scenarios such as mobile medical terminals or edge collection devices. SUMMARY

[0004] The main purpose of the present application is to provide a filtering matrix keyword search method, device, equipment and storage medium, which aims to solve the technical problem that the existing search method cannot efficiently support keyword-based search while maintaining privacy protection, resulting in excessive computing and communication overhead and high query delay.

[0005] To achieve the above purpose, the present application provides a filtering matrix keyword search method, comprising:

[0006] establishing a binary fusion filter structure, and writing data item information of the database into the binary fusion filter structure;

[0007] generate a filter matrix based on the binary fusion filter structure, and generate an encryption parameter set based on the filter matrix;

[0008] receive a query keyword, process the query keyword using a hash function, and generate a hash position set;

[0009] construct an index vector based on the hash position set, perform encryption processing on the index vector based on the encryption parameter set, and generate an encrypted query vector and query state information;

[0010] perform homomorphic inner product processing based on the filter matrix and the encrypted query vector through a server, and generate encrypted response data;

[0011] perform reconstruction operations on the encrypted response data based on the query state information, and generate a query result.

[0012] Further, to achieve the above object, the present application provides a filter matrix keyword retrieval device, comprising:

[0013] a filter construction module configured to establish a binary fusion filter structure and write data item information of a database into the binary fusion filter structure;

[0014] a parameter generation module configured to generate a filter matrix based on the binary fusion filter structure, and generate an encryption parameter set based on the filter matrix;

[0015] a keyword analysis module configured to receive a query keyword, process the query keyword using a hash function, and generate a hash position set;

[0016] a query encryption module configured to construct an index vector based on the hash position set, perform encryption processing on the index vector based on the encryption parameter set, and generate an encrypted query vector and query state information;

[0017] a homomorphic calculation module configured to perform homomorphic inner product processing based on the filter matrix and the encrypted query vector through a server, and generate encrypted response data;

[0018] a result reconstruction module configured to perform reconstruction operations on the encrypted response data based on the query state information, and generate a query result.

[0019] Further, to achieve the above object, the present application also provides a computer device, which comprises a memory, a processor, and a filter matrix keyword retrieval program stored in the memory and executable on the processor, and the filter matrix keyword retrieval program, when executed by the processor, implements the steps of the filter matrix keyword retrieval method as described above.

[0020] Further, to achieve the above object, the present application also provides a computer readable storage medium, wherein the storage medium stores a filter matrix keyword search program, and the filter matrix keyword search program, when executed by a processor, implements the steps of the filter matrix keyword search method.

[0021] Beneficial effects: The present application relates to the technical field of information encryption and decryption, and can be applied to business scenarios such as financial technology and medical health. The present application discloses a filter matrix keyword search method, device, equipment and medium, which comprises the following steps: establishing a binary fusion filter structure and writing database data item information, generating a filter matrix and an encryption parameter set based on the binary fusion filter structure, receiving a query keyword and generating a hash position set, constructing an index vector based on the hash position set and generating an encrypted query vector and query state information using the encryption parameter set, performing homomorphic inner product processing based on the filter matrix and the encrypted query vector to generate encrypted response data through a server, and performing a reconstruction operation on the encrypted response data based on the query state information to generate a query result. The present application establishes a binary fusion filter structure between database data items and query keywords, realizes a processing mode of mapping keywords into a matrix form, and supports encrypted query and result reconstruction using an encryption parameter set and a homomorphic inner product mechanism on this basis. The entire process maintains an encrypted state, and the query content is not exposed. At the same time, the high-efficiency calculation of the matrix and the inner product reduces the calculation and communication overhead. BRIEF DESCRIPTION OF DRAWINGS

[0022] The present application will be further described below with reference to the drawings and embodiments. In the drawings:

[0023] Figure 1 FIG. 1 is a schematic diagram of an application environment of a filter matrix keyword search method according to an embodiment of the present application;

[0024] Figure 2 FIG. 2 is a schematic diagram of a flow of the filter matrix keyword search method according to an embodiment of the present application;

[0025] Figure 3 FIG. 3 is a schematic diagram of functional modules of a filter matrix keyword search device according to a preferred embodiment of the present application;

[0026] Figure 4 FIG. 4 is a schematic diagram of a structure of a computer device according to an embodiment of the present application;

[0027] Figure 5 FIG. 5 is another schematic diagram of a structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and are not intended to limit the present application.

[0029] The filtering matrix keyword retrieval method provided in this invention can be applied to, for example... Figure 1 In this application environment, the user terminal communicates with the server via a network. The server can establish a binary fusion filter structure on the user terminal and write database data item information. Based on the binary fusion filter structure, it generates a filter matrix and an encryption parameter set, receives query keywords and generates a hash position set, constructs an index vector based on the hash position set, and uses the encryption parameter set to generate an encrypted query vector and query status information. The server then performs homomorphic inner product processing based on the filter matrix and the encrypted query vector to generate encrypted response data. Based on the query status information, it performs a reconstruction operation on the encrypted response data to generate query results. This invention establishes a binary fusion filter structure between database data items and query keywords, realizing a processing method that maps keywords to matrix form. Based on this, it uses an encryption parameter set and homomorphic inner product mechanism to support encrypted queries and result reconstruction. The entire process maintains an encrypted state, the query content is not exposed, and the efficient calculation of the matrix and inner product reduces computational and communication overhead. The user terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.

[0030] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the keyword retrieval method for a filtering matrix provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0031] like Figure 2 As shown, the filter matrix keyword retrieval method proposed in this invention includes the following steps:

[0032] S10, Establish a binary fusion filter structure and write the data item information from the database into the binary fusion filter structure;

[0033] In this embodiment, establishing a binary fusion filter structure is the initial step in achieving privacy protection for keyword retrieval, requiring the database data item information to be converted into a form suitable for the binary fusion filter. The binary fusion filter is an extension of a probabilistic data structure that combines fingerprint and association value information with the traditional Bloom filter, achieving a balance between space efficiency and search efficiency. The creation of this structure first involves parameter setting, including the target capacity, the expected number of entries to be written, and the acceptable false positive rate threshold. The false positive rate threshold determines the number of hash functions and the size of the bit array; this parameter directly affects the guarantee of query accuracy after writing. During the setting process, the optimal number of hash functions can be derived through formula, and the storage unit structure can be further adjusted to ensure a reasonable error limit is maintained for data item information of different sizes.

[0034] Database data items typically include keyword fields and associated value fields. The keyword field is the key entry point for retrieval, while the associated value field corresponds to the actual data to be returned. In the processing, the keyword field is first input into a family of hash functions. Each hash function generates a hash fingerprint value, which is usually stored in binary form, and its length can be adjusted by parameters to suit different application scenarios. The associated value field is then concatenated with the generated hash fingerprint to form the storage unit of the binary fusion filter. The concatenation operation can use bit-level concatenation or encoded concatenation, so that a single storage unit contains both fingerprint information for fast verification and reconstructable value information.

[0035] The write process requires determining the location of the storage unit within the binary fusion filter structure using a hash function mapping. Specifically, this involves selecting the corresponding storage slot from multiple calculated hash locations and storing the concatenated storage unit there. If a storage unit already exists at the target location during the write process, collision issues can be resolved through chaining, replacement strategies, or multi-way hash relocation to maintain structural consistency and queryability.

[0036] The logic of the entire process is as follows: First, the data item information in the database is extracted and divided into keyword fields and associated value fields. Then, a hash fingerprint is generated for the keyword fields, which is then concatenated with the associated value fields to form a storage unit. Finally, the storage location is determined and written into the binary fusion filter structure. Through this chain of operations, the original database structure is mapped into a highly efficient and cryptographically processable data structure, laying the foundation for subsequent encrypted queries and homomorphic processing.

[0037] In practical implementation, the parameter settings of the binary fusion filter can be adjusted according to the application environment. For example, in scenarios with small data volumes but high query accuracy requirements, the hash fingerprint length can be increased to reduce the false positive rate. In environments with large data volumes but high error tolerance, the fingerprint length can be appropriately shortened to reduce storage overhead. When writing to storage units, different collision resolution strategies can be adopted. One approach is to use chaining, storing multiple storage units sequentially in the same slot; another approach is to use rehashing, recalculating the new hash position for collision entries and writing them.

[0038] The choice of hash function can vary depending on the production environment. For environments with frequent data updates, double hashing can be used to reduce computational overhead; for scenarios requiring high security, cryptographically based hash functions can be chosen to enhance resistance to attacks. Write operations can also introduce batch write mode, which converts multiple data items and writes them to the structure all at once, thereby reducing the redundant overhead of memory switching and hash calculations.

[0039] Example Explanation: In the fintech business, when it is necessary to perform keyword-level searches on customer transaction records, the transaction description field can be used as the keyword field, and sensitive values ​​such as transaction amount and transaction time can be used as the association value field. After hash fingerprint generation and concatenation, the data is written into a binary fusion filter to ensure that the specific keywords are not exposed during the query, while still completing the matching under encrypted conditions.

[0040] In the healthcare business, when keyword searches are required on electronic medical record data, the name of the diagnosis entry can be used as the keyword field, and the corresponding examination values ​​or medication records of the patient can be used as the association value field. By establishing a binary fusion filter and writing it into the database, keyword retrieval under encrypted conditions can be achieved, thereby avoiding the leakage of medical record content while retaining efficient access to medical data.

[0041] This embodiment establishes a binary fusion filter structure and writes it into the database data item information, achieving a tight binding between keywords and associated values ​​while ensuring storage efficiency. This processing method transforms the original database into a structure that is easy to encrypt, enabling subsequent keyword retrieval to maintain high efficiency while protecting privacy.

[0042] S20, Generate a filtering matrix based on the binary fusion filter structure, and generate an encryption parameter set based on the filtering matrix;

[0043] In this embodiment, the process of generating a filter matrix based on the binary fusion filter structure is essentially a further transformation of the binary fusion filter storage units already written in the previous step into a two-dimensional matrix representation capable of linear algebraic processing. The binary fusion filter storage unit contains a value data portion and a hash fingerprint portion. The value data portion is used to recover the original associated values ​​during subsequent reconstruction, while the hash fingerprint portion is used for position verification. First, all storage units in the binary fusion filter structure need to be obtained, and their internal data parsed one by one. The value data and hash fingerprint are separated and sent to different processing paths respectively.

[0044] When processing the value data, a fixed-length partitioning operation is required to divide it into multiple data blocks of equal length. This ensures that the dimensions of different storage units remain consistent during matrix construction. The partitioned data blocks are arranged according to the logical order of the original data items in the database. Each data item corresponds to a set of row vectors, and all row vectors are combined to form the filtering matrix. Each row of the filtering matrix corresponds to a data item, containing the sequence of partitioned value data blocks. The column dimension of the matrix is ​​determined by the partition length and the number of storage units.

[0045] After the matrix is ​​constructed, a set of encryption parameters needs to be generated. First, the row and column dimension parameters of the matrix are extracted to define the plaintext space size of the encryption system. Next, a security level parameter is selected from the learning error problem model; this parameter controls the length of the public and private keys, the noise distribution range, and the modulus selection. Based on the security level parameter, the public and private key components are obtained through a key generation algorithm. These components must satisfy a specific linear algebraic relationship to ensure the correctness of subsequent encryption and decryption. Finally, the row and column dimension parameters, the public and private key components are integrated to form the encryption parameter set, which will be used multiple times during the encryption of the index vector and the decryption of the response data.

[0046] This chain of operations transforms the unstructured storage cells of the binary fusion filter into an encrypted linear representation, while simultaneously generating the set of parameters required for encryption, thus ensuring that subsequent homomorphic inner products and reconstructions are mathematically guaranteed.

[0047] In practice, the length of the data block can be adjusted according to the target application. For example, in environments requiring higher precision, a smaller data block length can be used to increase the column dimensions of the matrix, thereby achieving higher value reconstruction accuracy; in environments sensitive to storage overhead, a larger data block length can be used to reduce the column dimensions and compress the matrix size. The matrix storage method can also be varied; it can be stored directly as a dense matrix for fast computation, or a sparse matrix can be used to reduce storage space and computational costs.

[0048] When generating the set of encrypted parameters, different noise distributions can be selected to meet different security requirements. For example, in financial data retrieval scenarios, a discrete Gaussian distribution can be used to generate noise to meet higher resistance to attacks; in medical data scenarios, a uniformly distributed noise distribution can be selected to reduce computational complexity. Row and column dimension parameters can also be adaptively expanded under different applications. For example, when dealing with large-scale medical image data, column dimensions can be increased to adapt to large field data; when dealing with high-frequency small field data of financial transactions, column dimensions can be kept small to speed up processing.

[0049] This embodiment transforms the binary fusion filter structure into a filtering matrix and generates a set of encryption parameters, enabling the conversion of unstructured database storage into a linear algebra-processable structure while providing a complete environment for encryption operation parameters. This process ensures the mathematical consistency of data in subsequent homomorphic operations and provides parameter support for secure encryption and privacy protection.

[0050] S30, Receive query keywords, process the query keywords using a hash function, and generate a hash position set;

[0051] In this embodiment, receiving query keywords is the starting point of the entire retrieval process, and it is necessary to ensure that the input data meets the system's predefined requirements in terms of structure and format. Query keywords typically originate from user input or API calls from upper-layer applications and may contain characters, numbers, or mixed encodings. Upon receiving the keywords, the system needs to perform input validation to determine whether they conform to the preset encoding format and length requirements, thereby preventing invalid or malicious input from entering the processing stage.

[0052] After successful verification, the hashing stage begins. A hash function is a mathematical function that maps an input of arbitrary length to an output of fixed length. Here, it is used to map query keywords to an integer space to generate a set of positions. To ensure the stability and security of the results, the hash function used should possess collision resistance and uniform distribution characteristics. The implementation requires loading a predefined set of hash function parameters, which may include the seed value, modulo radix, output length, etc., to ensure that the hash result covers the entire position space of the binary fusion filter.

[0053] When keywords are input into a hash function, an initial hash value is first obtained, which is the result of calculating the input content as a single whole. To expand the location coverage and improve search accuracy, the initial hash value needs to be further divided into multiple hash segments of equal length. Each hash segment represents a sub-part of the keyword mapping space. Subsequently, these hash segments are converted into integer position values. This conversion is generally achieved through modulo operations or number base conversion to ensure that the resulting values ​​can directly correspond to position indices in a matrix or vector.

[0054] Finally, all integer position values ​​are combined to form a hash position set, which contains the mapping positions of the keywords in the binary fusion filter. This hash position set will be directly referenced in the subsequent index vector construction, so numerical precision and storage consistency must be maintained during generation.

[0055] During implementation, the choice of hash function can be adjusted according to the application scenario. In financial data environments with high security requirements, hash functions based on SHA or Blake series can be used to enhance collision resistance; in medical retrieval scenarios with high computational performance requirements, lightweight hash functions, such as MurmurHash, can be selected to reduce computational latency.

[0056] The hash segment segmentation strategy can be diversified. It can be divided evenly according to a fixed number of bits, or the segmentation ratio can be dynamically allocated according to different keyword lengths. For example, when processing financial account identifiers, a fixed-length segmentation can be used to ensure that all identifiers can be mapped to a unified space; when processing medical and health records, since keywords may contain long strings of encoding, a dynamic segmentation method can be used to balance the distribution of the mapping space.

[0057] Integer position values ​​can be generated directly by modulo operation, which is suitable for environments requiring uniform mapping; or they can be generated by weighted combination of hash segments, which is suitable for environments requiring higher randomness.

[0058] This embodiment receives query keywords and uses a hash function to generate a hash position set, effectively mapping raw textual or coded keywords into a structured position index, enabling direct interface with the binary fusion filter. This ensures flexibility in keyword input while improving retrieval accuracy and collision resistance through multi-segment hashing and position mapping, thus providing a stable and reliable input for subsequent index vector construction.

[0059] S40, construct an index vector based on the hash position set, perform encryption processing on the index vector based on the encryption parameter set, and generate an encrypted query vector and query status information;

[0060] In this embodiment, constructing the index vector requires using a set of hash positions as a basis to convert the mapping positions of keywords in the binary fusion filter into sparse vector representations. First, two types of values ​​need to be defined: the first value is usually set to 1 to represent the position mapped to the keyword; the second value is usually set to 0 to represent other unmapped positions. These two values ​​are the basic parameters for constructing the index vector.

[0061] In practice, the row dimension parameter needs to be extracted from the encryption parameter set. This parameter determines the length of the index vector. Next, an initial vector with the same length as the row dimension parameter is created, and all its elements are set to the second value, generating an all-zero vector as the initial state. Subsequently, the system iterates through the hash position set, setting the element corresponding to the hash position in the initial vector to the first value, forming a sparse vector, i.e., the index vector, where the first value is only present at the target position.

[0062] The constructed index vector needs further protection through an encryption process. At this point, the public key component is extracted from the encryption parameter set, and a random noise vector is generated. This random noise vector provides additional security in subsequent encryption operations, giving the encryption result semantic security. The index vector, along with the public key component and the random noise vector, is combined to perform the encryption operation, yielding the initial encrypted data.

[0063] To meet the structural requirements of different systems in data transmission or storage, additional parameters can be introduced on top of the initial encrypted data. An encrypted query vector is generated by combining the initial encrypted data and the additional parameters, and this vector serves as the input for server-side computation. Simultaneously, a private key component is extracted from the set of encrypted parameters and integrated with a random noise vector to generate query status information. This query status information is stored by the client and used for decryption and reconstruction operations after the server returns encrypted response data.

[0064] During implementation, the definitions of the first and second values ​​can be flexibly adjusted. For example, in financial data retrieval, the first value can be set to a positive integer and the second value to zero to ensure that the vector has good discriminative power; in healthcare scenarios, Boolean flags can be used, setting the first value to logical true and the second value to logical false, thus ensuring compatibility with upstream data management systems.

[0065] The selection of row dimension parameters can also vary. If the data volume to be processed is large, the vector length can be extended by increasing the row dimension to accommodate more hash positions; if the data volume is limited, the row dimension can be reduced to decrease the amount of encryption computation.

[0066] Encryption methods can be adjusted based on security and performance requirements. For financial transaction environments, encryption algorithms based on the learning error problem can be used to ensure high security strength; for healthcare applications, lightweight encryption algorithms can be selected, reducing the computational burden by decreasing the size of the noise vector and optimizing the generation of public key components, thus adapting to resource-constrained terminal devices.

[0067] This embodiment constructs an index vector based on a hash position set and performs encryption processing in conjunction with a set of encryption parameters. This enables a mapping from plaintext keywords to encrypted query vectors, preventing the server from knowing the specific query content. The sparsity of the index vector reduces the complexity of the encryption operation, while the combination of a random noise vector and the public key component ensures the unpredictability of the encryption result. The final generated encrypted query vector can be directly transmitted to the server, while the query status information is saved by the client for subsequent decryption and reconstruction, thus achieving efficient retrieval while ensuring privacy and security.

[0068] S50, the server performs homomorphic inner product processing on the filter matrix and the encrypted query vector to generate encrypted response data;

[0069] In this embodiment, the goal of homomorphic inner product processing is to enable the server to calculate the filter matrix and encrypted query vector without decrypting the query content, thereby generating encrypted response data. First, the server needs to receive the filter matrix and encrypted query vector, which constitute the input to the homomorphic operation. The filter matrix consists of multiple row vectors, each corresponding to the encoded form of a data item. The encrypted query vector is the ciphertext representation of the user's query keywords.

[0070] During processing, the server divides the filter matrix into multiple row vectors, and each row vector is homomorphically multiplied by the encrypted query vector. Homomorphic scalar multiplication leverages the homomorphic property of multiplication in encryption systems, weighting each element of the row vector with the corresponding component in the encrypted query vector to obtain the encrypted product. This process does not expose the plaintext content; all results remain in the ciphertext domain.

[0071] After performing homomorphic scalar multiplication on all row vectors, multiple homomorphic product results are obtained. Subsequently, the server performs a homomorphic accumulation operation in the ciphertext field, adding these product results one by one to obtain the initial aggregate result. The accumulation operation utilizes the additive homomorphic property of the encryption system to complete the aggregation without decryption.

[0072] Noise is introduced during homomorphic scalar multiplication and homomorphic accumulation. Instead of generating additional noise, the server retains the naturally occurring homomorphic noise component. This noise component ensures the security of the encrypted result, preventing the encrypted response data from revealing the original content. Finally, a modulo reduction operation is performed on the initial aggregation result containing noise, limiting the numerical range to the modulus defined by the encryption system, guaranteeing the correctness and decryptability of the calculation result. The modulo-reduced result is then encapsulated as encrypted response data and returned to the client.

[0073] In implementation, matrix row partitioning can be varied. It can be processed row-by-row sequentially, or a batch processing approach can be used to allocate multiple row vectors at once to improve computational efficiency. For large-scale transaction databases in financial applications, a distributed computing approach can be adopted, distributing different matrix row vectors across multiple computing nodes to perform homomorphic scalar multiplication and accumulation in parallel, thereby reducing overall latency. In healthcare applications, where the data size may be relatively small, a single-server row-by-row computation approach can be used to avoid communication and coordination overhead.

[0074] Regarding noise handling, the frequency and method of modular reduction can be adjusted according to different security level parameters. In financial scenarios with high security requirements, a larger modulus range can be selected to ensure that noise will not affect the correctness of decryption in a short period of time; in medical scenarios with higher real-time requirements, a more compact modulus range can be selected to shorten the computation time required for modular reduction.

[0075] The implementation methods for homomorphic scalar multiplication and homomorphic accumulation can also be modified. Homomorphism can be achieved using encryption algorithms based on the learning error problem; alternatively, stronger fully homomorphic encryption algorithms can be employed to support more complex operations. Different algorithms present a trade-off between security and performance, and the choice must be made based on the use case.

[0076] This embodiment generates encrypted response data without revealing the query content or database data by performing homomorphic inner product processing based on the filter matrix and the encrypted query vector. Homomorphic multiplication of the row vector and the encrypted query vector ensures that keyword matching operations are completed within the ciphertext domain. The accumulation operation aggregates the results into a complete response, while noise components and modulo reduction guarantee the security and decryptability of the results. This approach balances security and efficiency, allowing the client to securely obtain query results while the server remains unaware of the query keywords and intermediate calculation results.

[0077] S60, based on the query status information, perform a reconstruction operation on the encrypted response data to generate query results.

[0078] In this embodiment, the goal of the reconstruction operation is to transform the encrypted response data returned by the server into a plaintext query result while ensuring that the client's privacy is not compromised. When the client receives input, it needs to obtain both the query status information and the encrypted response data simultaneously. The query status information contains the private key component required for decryption and the random noise vector generated when generating the encrypted query vector; these data are essential for subsequent decryption and correction processes.

[0079] First, the client extracts the private key component and the random noise vector from the query status information. The private key component is the decryption key assigned to the user during the design of the encryption system, used to decrypt the encrypted response data. The random noise vector is perturbation data introduced during the encryption process; it must be correctly applied in the decryption phase to eliminate noise interference and restore the accurate result.

[0080] Subsequently, the client uses the private key component to decrypt the encrypted response data, obtaining the initial decrypted data. Because random noise is introduced during encryption, the initial decrypted data typically contains errors, and using it directly would lead to incorrect results. To ensure correctness, the client uses a random noise vector to perform noise cancellation on the initial decrypted data, correcting any offsets in the encryption process.

[0081] After noise correction, the client decompresses the decryption result. The purpose of decompression is to restore the structure compressed during the initial storage unit assembly, allowing the data to reappear as independent parts of value data and binary fingerprints. The binary fingerprint can be directly extracted from the decompressed data. The binary fingerprint is a fixed-length data point generated by processing keywords using a hash function, used to verify and identify the existence and location of target data.

[0082] Finally, the client performs a mapping operation between the binary fingerprint and the value data, using the original mapping relationship or predefined mapping rules to convert the location information corresponding to the fingerprint into associated value data. At this point, the query result is fully generated, and the client can obtain the plaintext information corresponding to the target data item.

[0083] During implementation, decryption operations can be carried out using different homomorphic decryption algorithms. For example, decryption methods based on the learning error problem can be used, and in the fintech field, high-security-level parameters can be used to enhance decryption stability; in healthcare applications, computationally optimized decryption algorithms can be used to reduce latency.

[0084] The methods for noise reduction can also differ. In environments with low noise, a random noise vector can be directly applied to the initial decrypted data for one-time correction; in environments with high noise, noise interference can be gradually eliminated through segmented correction, thereby ensuring the accuracy of the results.

[0085] The decompression process depends on the encoding strategy of the storage unit. It can be achieved by either the inverse of bit-stuffing compression or the inverse of block concatenation. In high-density financial systems, block concatenation is more efficient; in healthcare systems, bit-stuffing is easier to integrate with existing electronic document formats.

[0086] The mapping method for value data can be adjusted according to different scenarios. In fintech businesses, binary fingerprints can be mapped to transaction records or account data; in healthcare businesses, binary fingerprints can be mapped to examination records or medical codes. By adapting different mapping rules, the accurate reconstruction of data in different fields can be ensured.

[0087] This embodiment reconstructs encrypted response data based on query status information, enabling the client to accurately recover data without exposing the query content or plaintext database data. The combination of the private key component and the random noise vector ensures the correctness of decryption and correction, while decompression and mapping operations ensure that the value data and binary fingerprint can be correctly restored to the query result. This approach balances data security and availability, and can be efficiently applied in various domain environments.

[0088] This invention relates to the field of information encryption and decryption technology, applicable to business scenarios such as fintech and healthcare. It discloses a method, apparatus, device, and medium for keyword retrieval using a filtering matrix, comprising: establishing a binary fusion filter structure and writing it into database data item information; generating a filtering matrix and an encryption parameter set based on the binary fusion filter structure; receiving query keywords and generating a hash position set; constructing an index vector based on the hash position set and generating an encrypted query vector and query status information using the encryption parameter set; generating encrypted response data through homomorphic inner product processing by a server based on the filtering matrix and the encrypted query vector; and generating query results by performing a reconstruction operation on the encrypted response data based on the query status information. This invention establishes a binary fusion filter structure between database data items and query keywords, achieving a processing method that maps keywords to matrix form. Furthermore, it utilizes an encryption parameter set and homomorphic inner product mechanism to support encrypted queries and result reconstruction. The entire process maintains an encrypted state, preventing the exposure of query content, while reducing computational and communication overhead through efficient matrix and inner product calculations.

[0089] In one embodiment, step S10 includes:

[0090] S101, retrieve data item information from the database, including keyword fields and associated value fields;

[0091] S102, Create the binary fusion filter structure;

[0092] S103, Configure the false positive rate threshold parameter of the binary fusion filter structure;

[0093] S104, Adjust the processing parameters of the hash function based on the false positive rate threshold parameter;

[0094] S105, the adjusted hash function is applied to process the keyword field to generate a hash fingerprint value corresponding to the keyword field;

[0095] S106, the associated value field is concatenated with the hash fingerprint value to form a binary fusion filter storage unit;

[0096] S107, determine the write position of the binary fusion filter storage unit in the binary fusion filter structure based on the hash fingerprint value and the false positive rate threshold parameter;

[0097] S108, based on the write position, write the binary fusion filter storage unit to the specified position of the binary fusion filter structure.

[0098] In this embodiment, the goal is to transform the data item information in the database into a searchable representation within a binary fusion filter structure, ensuring that subsequent keyword searches can be indexed with a fixed set of dimensions and positions. The data item information includes keyword fields and associated value fields. Keyword fields originate from business primary keys, tags, standardized nouns, or enumeration names, typically from data dictionaries or metadata definitions; associated value fields carry content corresponding to the keywords, such as identifiers, timestamps, summary fingerprints, or compressed business values. During implementation, the data item information is first normalized to remove invisible characters, unify the encoding format, and maintain consistent mapping of keyword fields across different source tables. The normalization results enter the acquisition process, forming a sequence to be written, ensuring reproducible order within the same batch, facilitating consistency between the subsequent matrix row order and the logical order of the data item information.

[0099] The binary fusion filter structure is used to simultaneously handle existence checks and value binding. The structure comprises two parts: a bit array for position marking and a value-carrying area for storing value fragments or value summaries related to keywords. The creation process includes allocating contiguous memory or block storage space, determining the segment layout, alignment, concurrent write granularity, and recovery strategy. The segment layout determines the relative position and span of the bit array and value-carrying area; the alignment ensures stable cross-platform reads; the concurrent write granularity limits the atomicity of writes; and the recovery strategy is used for verification and backfilling after abnormal interruptions. Examples of sources: segment layout and alignment parameters can be derived from the cache line width and page size of the deployment environment; the recovery strategy can be derived from transaction logs or snapshot mechanisms.

[0100] The false positive rate threshold parameter is used to limit the upper bound of false positives for the binary fusion filter structure under a given capacity and load. Once the threshold parameter is determined, derived parameters such as bit array density, position dispersion, and fingerprint length need to be derived to keep the false positive probability below the threshold and maintain stability in the later stages of writing. To make the threshold parameter truly effective, it needs to be linked to the processing parameters of the hash function. The processing parameters of the hash function include output bit width, number of output segments, position mapping domain, seed source, and multiplexing method. The output bit width matches the fingerprint length, the number of output segments affects the number of position sets, the position mapping domain corresponds to the bit array capacity, the seed source determines the independence between different batches, and the multiplexing method determines the dispersion of the same fingerprint at multiple positions. The stricter the threshold parameter, the more the combination of the number of output segments and bit width tends to be a more dispersed mapping and a longer fingerprint, thereby reducing the false positive probability; when the threshold parameter is more relaxed, the mapping is more concentrated, the space occupation is reduced, and the writing and query operations are lighter. Here, external plaintext salt values ​​are not used to avoid additional leakage paths. The seed source can be generated by the key derivation component or deployment configuration, so that the same keyword field has controllable independence between different deployments.

[0101] After the keyword field is entered into the hash function, a hash fingerprint value is generated. In implementation, the keyword field is first case-sensitive and whitespace-neutralized, and then a hash operation is performed with the processing parameters to obtain a fixed-length fingerprint segment sequence. The fingerprint needs to be stable within a batch and reproducible across batches to facilitate incremental updates and deduplication; at the same time, to avoid plaintext leakage, a seeded family hash can be used to prevent direct association between fingerprints from different deployments. The fingerprint length, number of segments, and threshold parameters are linked to ensure that the label density in the bit array falls within the expected range.

[0102] The binary fusion filter storage unit is composed of a hash fingerprint value and an associated value field. Before concatenation, the associated value field is pruned or compressed to form a value fragment; the hash fingerprint value retains its full bit width as a fingerprint segment. The concatenation order and alignment are fixed in the structure definition, facilitating sequential writes and subsequent fast reads by offset. To enhance consistency, the value fragment can carry a short type tag or version tag for compatible reading of different business tables. Example sources: type tags come from the data dictionary, and version tags come from data migration tools.

[0103] The write location is determined by both the hash fingerprint value and the false positive rate threshold parameter. In implementation, a set of locations is derived from the hash fingerprint value. The number of locations and the bit array density are constrained by the threshold parameter, ensuring that the marker distribution is both dispersed and controllable, avoiding local congestion. During the mapping process, rounding and boundary wrapping are used to keep the locations within the valid domain. If a location conflict is detected, a candidate location sequence can be generated using a derived seed without changing the keyword field, until the dispersion requirement is met, avoiding the introduction of external randomness that could lead to unreproducible results. Once the location set is determined, the target offset of the value-carrying area is obtained. This offset is derived from the structural layout and alignment strategy, ensuring the stability of cross-page writes.

[0104] The write operation places the binary fusion filter storage unit at the specified location. The target bit on the bit array is set to the marker value, and the value-carrying area is written with the concatenated storage unit at the corresponding offset. To balance concurrency and consistency, a combination of atomic bit writes and aligned block writes is required. The value-carrying area is written first, then the bit array is updated, and finally, a checksum is recorded to support recovery. In concurrent cases, lightweight locks or lock-free bit operations are introduced to ensure that multiple keyword fields written simultaneously do not overwrite each other. After writing to disk or into the persistent cache, the checksum is used for quick scanning to confirm the write is complete. In case of an anomaly, incomplete segments are replayed according to the recovery strategy.

[0105] This embodiment drives the processing parameters of the hash function with a false positive rate threshold parameter. The dispersion of the location set and the fingerprint length are determined collaboratively, the bit array density falls within the target range, the false positive probability is controlled and maintains a stable relationship with the load growth. By concatenating the associated value field and the hash fingerprint value into a binary fusion filter storage unit and aligning it at the write position, the existence mark and value binding are established synchronously. During the query phase, only the inner product operation based on the location set needs to be triggered to obtain the reconstructable value information. Through the combination of normalization, alignment, atomic write and recovery strategies, batch import and concurrent import can maintain consistency and reproducibility. Thus, without increasing the plaintext exposure surface, it provides a sparse, stable and homomorphically processable data representation for subsequent retrieval, reduces the amount of single operation and transmission, improves retrieval throughput and compresses response latency.

[0106] In one embodiment, step S20 above includes:

[0107] S201, Obtain all binary fusion filter storage units in the binary fusion filter structure;

[0108] S202, analyze each binary fusion filter storage unit to separate the value data part and the hash fingerprint part;

[0109] S203, the value data portion is divided into data blocks of a preset length;

[0110] S204, Arrange the data blocks into row vectors of the filtering matrix according to the logical order of the data item information in the database;

[0111] S205, combine all row vectors to form a filtering matrix;

[0112] S206, Obtain the row dimension parameters and column dimension parameters of the filter matrix;

[0113] S207, Select the security level parameter for the learning error problem, and generate public key components and private key components based on the security level parameter;

[0114] S208, integrate the row dimension parameters, column dimension parameters, public key components and private key components to form an encryption parameter set.

[0115] In this embodiment, the data in the binary fusion filter structure needs to be restored to a computable linear representation and a one-to-one constraint relationship established with the cryptographic parameters. During implementation, the binary fusion filter structure is first traversed, and all binary fusion filter storage units are read according to the segment boundary order recorded during creation. The reading order is consistent with the logical order of the data items in the database. The logical order is derived from the primary key order, time order, or business number order defined in the data dictionary, ensuring that the correspondence between the row position and the data item information remains unchanged during any reconstruction of the filter matrix.

[0116] The binary fusion filter storage unit is formed by splicing together a hash fingerprint part and a value data part in its layout. The parsing process divides the storage unit according to a fixed offset and alignment rule, first locating the hash fingerprint part, and then locating the value data part, avoiding offset drift introduced by cross-page read and write. The hash fingerprint part comes from the hash processing of the keyword field in the previous stage and is mainly used for subsequent index verification and value reconstruction; the value data part comes from the encoding or compression of the associated value field and carries the actual business content or its summary that needs to be returned by private retrieval.

[0117] The value data portion needs to be transformed into linear blocks of a uniform dimension to accommodate matrix row construction and subsequent homomorphic inner product operations. During implementation, a pre-defined data block length standard is introduced. The length is derived from the vector register width, memory page alignment granularity, or network fragment size of the runtime environment, ensuring stable transmission and computational costs between different computing nodes. When the value data portion is shorter than the pre-defined length, it is padded with no information or by repetitive encoding; when it is longer than the pre-defined length, it is truncated into blocks while retaining the block order marker to ensure reversibility during reconstruction. The block-based data uses a uniform end-order and modular representation, facilitating its integration into the integer ring computation environment.

[0118] The filtering matrix is ​​constructed based on the logical order of the data items in the database. For each data item, all corresponding data blocks are collected and concatenated into a row vector in block order. Each column of the row vector corresponds to a data block component at a fixed position. Multiple row vectors are accumulated and combined to form the filtering matrix. The matrix elements are represented by an integer ring, and the value range is compatible with the modulus domain of homomorphic operations. After combination, the row dimension parameter and column dimension parameter of the filtering matrix are extracted. The row dimension parameter is equal to the number of data items or the number of logical rows they map to. The column dimension parameter is equal to the total width obtained by converting the number of data block components in each row to the bit width of each component. Both will directly participate in the subsequent key material generation and homomorphic interface matching.

[0119] The security level parameters for the learning error problem are used to constrain the key size, error distribution, and modulus domain size. The selection rules are derived from common methods in lattice cryptography security assessment: given a security level objective, the scale range of the modulus domain size and error distribution is determined and matched with the row and column dimension parameters to avoid computational instability caused by a mismatch between the matrix dimension and the key structure. When generating public and private key components, a high-entropy random source and seed management mechanism bound to the security level parameters are used to ensure independence and reproducibility across batches and nodes. Key materials are serialized in a structured layout, including version and length markers, facilitating consistent deserialization across different implementations.

[0120] The encryption parameter set is composed of row-dimensional parameters, column-dimensional parameters, public key components, and private key components. The integration process is not a simple concatenation, but rather establishes consistency constraints: the row-dimensional and column-dimensional parameters determine the scale of the multiplication interface between the query vector and the filter matrix; the public key component provides the entry point for homomorphic computation; and the private key component is used for decryption and noise restoration in the subsequent reconstruction stage. To ensure operational stability, the encryption parameter set undergoes consistency checks before output, including checks for dimensional multiplicativity, parameter domain matching, and the use of random sources. For example, the security level parameters for the learning error problem come from the evaluation methods and engineering baselines of the lattice cryptography community; the logical order comes from data governance and master data management practices; the pre-defined length of the data blocks comes from the constraints of the computing platform on vectorization and cache alignment; and the integer ring representation comes from the consistency requirements of homomorphic inner product operations on the modular domain.

[0121] This embodiment systematically restores the binary fusion filter structure into a filtering matrix, and constrains the scale and form of the key material with row dimension parameters and column dimension parameters to construct an encryption parameter set that naturally matches the homomorphic inner product operation; the blockization and logical order alignment of the value data part ensures a stable mapping between matrix rows and data item information, reducing the adaptation cost of query vector and matrix interface; the security level parameter and dimension parameter of the learning error problem are linked to generate public key components and private key components, reducing the risk of dimension mismatch and solution instability.

[0122] In one embodiment, step S30 above includes:

[0123] S301, Receive query keywords and verify that the format of the query keywords meets the predefined requirements;

[0124] S302, Obtain the processing parameters of the adjusted hash function;

[0125] S303, Based on the processing parameters of the adjusted hash function, the query keyword is processed using the hash function to generate an initial hash value;

[0126] S304, the initial hash value is divided into multiple hash segments of equal length;

[0127] S305, convert each hash segment into an integer position value;

[0128] S306, combine all integer position values ​​to form a hash position set.

[0129] In this embodiment, the implementation of receiving query keywords aims for unified encoding and verifiable input. Input is first collected as a byte sequence through a character set and encoding channel. A unified text normalization process is used to perform case normalization, full-width / half-width character unification, whitespace cleanup, and punctuation standardization. Then, length boundaries and character whitelist checks are performed, rejecting input containing control characters and unregistered extended symbols. This process remains consistent between the server and client, ensuring the reproducibility of subsequent hash processing results. To avoid cross-platform differences, a fixed byte order and a defined encoding table are introduced to stably map query keywords into unambiguous byte vectors.

[0130] The adjusted hash function processing parameters are used to ensure that the position mapping is consistent with the previously configured false positive rate threshold. These parameters include hash family identifier, number of rounds, seed and salt, output bit width, mask and modulus, mixing constants, and rehashing count upper limit, and are stored in the same configuration space as the binary fusion filter structure. During loading, the parameter version, length, and value range are checked for consistency with the row and column dimension parameters of the filtering matrix to prevent position out-of-bounds errors due to inconsistent bit width or modulus.

[0131] Based on the adjusted hash function processing parameters, the implementation of generating the initial hash value using the hash function for query keywords follows the principles of determinism and anti-association. The aforementioned byte vector is combined with the seed, salt, and round control parameters from the processing parameters and input into the hash routine, outputting a fixed-length bit string. When the security policy requires anti-replay capability, the salt is bound to the business time slice or tenant identifier, but remains unchanged within the same query transaction to maintain result consistency. The initial hash value is stored in a bit string with the most significant bit first or a big-endian integer representation, maintaining endianness consistent with subsequent partitioning and modulo operations.

[0132] The initial hash value is divided into multiple equal-length hash segments to generate multi-position mappings. The equal-length segment length is given by the processing parameters, allowing each hash segment to be independently mapped to an integer position value. If the bit length of the initial hash value is not an integer multiple of the segment length, a single strategy of leading zero extension or trailing pruning is used, specified in the parameters to ensure consistency across different implementations. An order identifier is appended during the segmentation process to ensure stable sorting or necessary rehashing derivation after deduplication.

[0133] Each hash segment is converted into an integer position value to complete the intra-domain mapping. During the conversion, the hash segment is modulo-operated according to the modulo field specified by the processing parameters. The modulo field is aligned with the row dimension parameter of the filter matrix or the bit field of the binary fusion filter structure to ensure that each integer position value falls within the valid range. To reduce information redundancy caused by position collisions, ordered deduplication is performed on the conversion results. If the number of deduplicated positions is lower than the expected number and the parameters allow rehashing, the same hash family and different rounds or counters are used to supplement the number until the target number is reached or the upper limit is hit. All modulo and deduplication rules are recorded together with the parameters for subsequent auditing and consistency verification.

[0134] When combining all integer position values ​​to form a hash position set, an "ordered, unique, and serializable" set structure is adopted. The combination process outputs two types of information: first, a sequence of position values ​​used to construct the index vector; second, metadata used for logging and replay, including parameter versions, splitting strategies, and conflict handling records. The output structure maintains a one-to-one interface with the subsequent index vector construction interface to avoid introducing additional conversions during cross-module transmission. Query keywords, adjusted hash function processing parameters, initial hash values, hash segments, integer position values, and hash position sets are generated sequentially and fully utilized in this process, without forming detached or unconsumed fields.

[0135] This embodiment obtains an initial hash value consistent with the operator domain by inputting a parameterized hash process after the query keywords are normalized, combined with processing parameters aligned with the filter matrix dimension and false positive rate threshold. The initial hash value is then divided into equal-length segments and subjected to modulo mapping and ordered deduplication to generate a structurally stable set of hash positions. Therefore, the non-zero positions of the index vector are precisely aligned with the row dimension of the binary fusion filter structure and the filter matrix, reducing collisions and out-of-bounds errors, decreasing the number of rehashing operations and communication load, and avoiding additional adaptation and correction overhead in subsequent encryption processing and homomorphic inner product stages. This allows for a verifiable mapping from keywords to position domains with lower computational and bandwidth costs.

[0136] In one embodiment, step S40 above includes:

[0137] S401, define the first value and the second value;

[0138] S402, extract the row dimension parameter from the set of encryption parameters, and create an initial vector with a length equal to the row dimension parameter;

[0139] S403, set all elements of the initial vector to the second value;

[0140] S404, Traverse the hash position set and set the element corresponding to each position in the initial vector to the first value to form an index vector;

[0141] S405, Extract the public key component from the set of encryption parameters;

[0142] S406, Generate a random noise vector;

[0143] S407, based on the public key component and the random noise vector, the index vector is encrypted to generate initial encrypted data, and the initial encrypted data is used as the encrypted query vector;

[0144] S408, Extract the private key component from the set of encryption parameters;

[0145] S409, the private key component is integrated with the random noise vector to form query status information.

[0146] In this embodiment, a first value and a second value are defined to establish the semantic boundaries of discrete binary values. The first value represents the valid position marker of the index vector, and the second value represents the padding of invalid positions. Both originate from the binary judgment requirement of key-value retrieval. The value space is limited to the Boolean field or an equivalent two-level coding field to ensure that subsequent homomorphic processing and decryption reconstruction can stably distinguish between hit and miss positions. During implementation, the same value convention is shared between the encryption and decryption ends, and the value encoding and bit-width mapping are recorded in the parameter area to avoid cross-implementation differences.

[0147] Row dimension parameters are extracted from the encryption parameter set, and an initial vector with a length equal to the row dimension parameters is created to ensure strict alignment between the position field and the matrix field. The row dimension parameters are derived from the structure information of the filtering matrix and are written into the encryption parameter set during the deployment phase. When creating the initial vector, contiguous memory or a sparse storage structure is allocated, and a vector layout and end order compatible with subsequent homomorphic encryption libraries are selected to reduce additional copying and rearrangement. Immediately after creation, the vector length and memory alignment information are recorded as pre-verification input for subsequent encryption kernels.

[0148] Setting all elements of the initial vector to the second value creates a uniform zero baseline, avoiding implicit offsets introduced by residual data. The padding strategy should support batch writing and parallel setting; in the sparse implementation, initialization is equivalent to generating an empty sparse set and setting the default value to the second value. After completion, a boundary sampling check is performed to confirm that both ends of the vector and the randomly sampled positions are the second value.

[0149] The hash position set is traversed, and the element corresponding to each position in the initial vector is set to the first value to form an index vector. The hash position set is derived from the preceding keyword processing module, ensuring consistency with the row dimension parameter and deduplication order. During traversal, out-of-bounds detection and short-circuit writing of duplicate bits are performed first, followed by vector in-place assignment to complete the conversion from the second value to the first value; in the sparse implementation, the target position is inserted into the sparse index set. To ensure compatibility with downstream homomorphic multiplication and addition, the storage format of the index vector is consistent with the expected format of the ciphertext vector. If necessary, a single dense-to-sparse formatting is performed at this stage to avoid conversion again during the encryption stage.

[0150] The public key component is extracted from the set of encryption parameters for homomorphic encryption. This public key component is bound to the deployment security level and includes a public matrix, modulus space, and sampling policy identifier. After loading, parameter version comparison and domain consistency verification are performed, and cross-checking is conducted with row-dimensional parameters to prevent the generation of uncrackable ciphertext in case of domain mismatch.

[0151] A random noise vector is generated to mask the index vector and structural information in the encryption process. The noise vector originates from a secure random source and follows a distribution family and amplitude domain agreed upon with the public key components. During generation, independent noise is sampled for each coordinate, or in a batch processing implementation, noise is sampled in blocks and then assigned to the coordinates. Subsequently, the state digest of the random source is fixed so that querying the state information can reproduce the necessary decryption compensation.

[0152] Encryption is performed on the index vector using the public key component and a random noise vector to generate initial encrypted data, which is then used as the encrypted query vector. The encryption process is completed in the vectorization interface, where the index vector and noise vector are fed into a homomorphic encryption routine to output a ciphertext vector that satisfies the target modulus and ciphertext structure. This vector is not re-encapsulated and is directly used as input for subsequent server-side homomorphic computation to reduce marshaling overhead. To support transmission and replay, minimal metadata, such as parameter version and block number, can be included, but no plaintext location information is contained.

[0153] The private key component is extracted from the set of encrypted parameters for the decryption-side reconstruction calculation. The private key component and the public key component have the same source and their pairing relationship is confirmed through consistency verification. The private key material is stored protectively on the query end, and is only temporarily unsealed within a secure area of ​​local memory; it is deleted after use.

[0154] The private key component is integrated with a random noise vector to form the query state information. The query state information contains the minimum set required for decryption: a private key reference or its derived pointer, a random source state digest or noise correction vector digest, and a parameter version compatible with the current ciphertext. This information is not transmitted to the server but is stored in the query client's temporary context for direct consumption during the result reconstruction phase. Structured serialization and integrity checks are performed during integration to ensure semantic consistency across thread or process boundaries.

[0155] This embodiment defines the binary semantics of the index vector using a first value and a second value, and creates and initializes a unified vector container using row dimension parameters. This allows the hash position set to be losslessly mapped to sparse tokens within a consistent domain. Based on this, a public key component consistent with the row dimension is loaded, and a random noise vector is introduced to perform homomorphic encryption. This directly transforms the index vector into an encrypted query vector that can participate in homomorphic multiplication and addition on the server side. Simultaneously, the minimum elements required for decryption and noise reduction are recorded locally using query state information. Thus, the position field, parameter field, and ciphertext field are integrated and aligned, reducing the additional costs of format conversion and boundary checks, preventing the leakage of the sparse structure on the server side, reducing communication and computational burden, and achieving stable decryption and reconstruction with minimal state upon result return.

[0156] In one embodiment, step S50 above includes:

[0157] S501, Obtain the filtering matrix and the encrypted query vector from the server;

[0158] S502, the filtering matrix is ​​divided into multiple matrix row vectors by rows;

[0159] S503, perform homomorphic scalar multiplication on each matrix row vector and the encrypted query vector to generate multiple homomorphic product results;

[0160] S504 performs homomorphic summation on all homomorphic product results to generate the initial aggregation result;

[0161] S505, retaining the homomorphic noise component generated during the homomorphic scalar multiplication process and the homomorphic accumulation process in the initial aggregation result;

[0162] S506, Perform a modulo reduction operation on the initial aggregation result and encapsulate the result of the modulo reduction operation into encrypted response data.

[0163] In this embodiment, the server employs authenticated transmission and parameter alignment verification when obtaining the filtering matrix and encrypted query vector. First, it verifies that the row dimensions of the filtering matrix match the length of the encrypted query vector, and then verifies that the modulus, parameter version, and encoding domain are consistent. For large filtering matrices, row-block fetching or memory-mapped loading is used. The row block size is set based on the cache level and the number of parallel threads to ensure cache hit rate and throughput during subsequent multiplication and addition processes.

[0164] After the filtering matrix is ​​divided into row vectors, an identity mapping from row to logical record is established. Each row vector is stored in memory using either a contiguous layout or a column-aligned layout, consistent with the ciphertext packing method of the encrypted query vector, avoiding additional rearrangement. If the encryption library supports batch homomorphic operations, several row vectors are grouped into batch processing units, with the batch size matching the batch width of the homomorphic operation. Element field checks are performed simultaneously during the row vector segmentation stage to ensure all elements are within the target modulo space.

[0165] Homomorphic scalar multiplication is performed column-by-column for each matrix row vector and encrypted query vector. The encrypted query vector provides ciphertext components column-by-column, and the matrix row vectors provide plaintext coefficients column-by-column. For each column, the homomorphic scalar multiplication interface for plaintext and ciphertext is called, outputting the ciphertext product. To reduce noise growth, the plaintext coefficients are pre-reduced and bit-width compressed before multiplication, and a lazy reduction strategy is used after multiplication to delay the number of modulo reductions. In batch implementation, multiple column multiplications are completed in a single kernel call, utilizing vector instructions or concurrent operators to improve throughput.

[0166] Homomorphic accumulation processing performs term-by-term homomorphic addition on multiple homomorphic product results generated from the same row vector, outputting the aggregated ciphertext for the corresponding row. All aggregated ciphertexts are then subjected to vertical homomorphic addition to form the initial aggregated result. The accumulation order employs balanced tree reduction to reduce noise stacking height. In parallel scenarios, partitioned reduction followed by global merging controls the number of intermediate ciphertexts and memory usage. During the accumulation phase, noise limits and modulus space margins are continuously tracked to provide a basis for subsequent reduction thresholds.

[0167] The initial aggregation result retains the homomorphic noise components generated during multiplication and addition, without introducing additional randomization and re-addition of noise, thus avoiding the amplification of invalid noise. The noise components originate from the noise within the encrypted query vector itself, the amplification effect of plaintext coefficients, and the additive superposition effect. The server side only performs necessary homomorphic operations, without unpacking or resampling, ensuring that the statistical characteristics of the noise can be accurately canceled out by the state information on the client side. To facilitate client-side reconstruction, the initial aggregation result carries a parameter version identifier and a computation depth identifier, recorded as an encrypted payload, without containing any plaintext index clues.

[0168] Modular reduction maps the ciphertext components of the initial aggregation result back to canonical representations. The implementation employs a strategy combining lazy reduction and threshold triggering, performing modular reduction only when a component exceeds a threshold or enters the output stage, reducing redundant modulo operations. If decomposition of the modulus or number-theoretic transformation domain representation is used, reduction and inverse transformation are performed within the corresponding domain, maintaining a modulus system consistent with the encrypted parameter set. After reduction, consistency checks are performed, verifying component ranges, parameter versions, and row / column alignment markers, before encapsulating the data into encrypted response data. The encapsulation structure contains only the ciphertext vector and necessary metadata, excluding filter matrix row numbers, unnecessary statistical information, or any additional fields that might expose the query distribution, ensuring the indistinguishability of the response during transmission and storage.

[0169] This embodiment implements row partitioning, explicit-encrypted hybrid multiplication, and balanced reduction accumulation on the server side, enabling the homomorphic inner product of the filtering matrix and the encrypted query vector to be completed with a controllable noise trajectory, avoiding noise expansion and computational burden caused by repeated resampling; the noise components are retained throughout the process and are consistent with the parameter version and computation depth, and stable noise reduction and reconstruction can be completed with the query status information held by the client; lazy modular reduction reduces the number of modulo operations and improves cache hit rate, row blockization and batch multiplication and addition improve computational parallelism and bandwidth utilization, and outputs encrypted response data without exposing row-level or column-level access characteristics, thereby reducing cloud computing power and communication costs and keeping query privacy from being leaked.

[0170] In one embodiment, step S60 above includes:

[0171] S601, extract the private key component and random noise vector from the query status information;

[0172] S602, use the private key component to perform a decryption operation on the encrypted response data to generate initial decrypted data;

[0173] S603, apply the random noise vector to perform noise removal processing on the initial decrypted data;

[0174] S604 performs a parsing operation on the noise-cancelled data to obtain parsed data;

[0175] S605, Extract the binary fingerprint from the parsed data;

[0176] S606, map the binary fingerprint to value data and generate query results.

[0177] In this embodiment, after the query status information and encrypted response data enter the same terminal-side processing channel, source verification and parameter alignment are first performed. Verification items include parameter version identifier, modulus consistency, encoding domain consistency, and operation depth marker to ensure that subsequent operations are performed on the same number domain and the same parameter set. The query status information contains the private key component and the generation strategy or instance value of the random noise vector, both of which are stored in an encoding format compatible with the ciphertext system. After loading, a read-only view is established in local memory to prevent modification in place during subsequent processing. If the status information carries auxiliary markers (such as bit width, sampling distribution label, and packing layout label), they are read together during the parsing stage to guide the selection of the decoding path.

[0178] When extracting the private key component and random noise vector from the query state information, a fixed-order field reading and constant-time masking operation are used to avoid leakage of structural information due to branch differences. The private key component is restored to the computational domain in vector or polynomial form according to the key system; the random noise vector is restored to a numerical column or block structure of the same dimension as the ciphertext based on the label. If the state information only carries the noise distribution and sampling seed, the random noise vector is reproduced locally using a deterministic sampler. The sampler's step size, mask, and modulus reduction are consistent with the encryption side to ensure that there is no offset when the noise statistical characteristics are canceled.

[0179] When decrypting encrypted response data using the private key component, the decoding order and ring structure operations of the ciphertext system are followed. For vector-type or block-type ciphertext, inner product or polynomial multiplication and addition are performed block by block, followed by modular reduction and coefficient unpacking to obtain the initial decrypted data. To reduce rounding errors, multiplication and addition are first performed in the high-precision accumulation domain, and then reduction is triggered according to a threshold strategy to avoid quantization jitter introduced by frequent modular operations. The initial decrypted data maintains the same element order and block boundaries as the ciphertext and includes meta-tags of the decoding path to facilitate subsequent processing in locating the effective payload range.

[0180] When applying random noise vectors to the initial decrypted data for noise removal, the positions are aligned according to a one-to-one correspondence, and vector-level compensation is performed. For linear superposition errors, vector merging with opposite signs is used to achieve direct cancellation; if a scaling factor exists, scaling is first performed according to the scaling parameters specified in the state information, and then cancellation is performed. The data arrangement and block boundaries are not changed during processing; boundary elements are reduced and saturated using strategies consistent with the main body to avoid displacement caused by boundary truncation. The noise-removed data enters a numerical fallback range, and its value range satisfies the decoding assumptions for subsequent parsing operations.

[0181] The parsing operation focuses on the payload layout and encoding specifications of the encrypted response data. It performs structured reconstruction of the noise-reduced data to obtain the parsed data. The parsing process performs field segmentation, bit alignment, and radix restoration according to the layout labels, and performs number system conversion and sign expansion when necessary. If a stacked layout is used, the two-dimensional arrangement is first restored based on the row and column dimension labels, and then expanded by column or row to form a linear view. After parsing, each position in the parsed data corresponds one-to-one with the specified field position in the original writing process, and the mapping relationship is recorded in an index table to ensure that subsequent extraction stages only access valid segments.

[0182] When extracting binary fingerprints from parsed data, a fixed-width bit segment is read from each target location based on predefined field boundaries and a mask. Bitwise AND and right-shift AND reduction are then performed to obtain a standardized binary fingerprint. To avoid cross-field crosstalk, a window check is performed on the parsed data before extraction to ensure that the bits covered by the window do not cross field boundaries. Simultaneously, a consistency check is performed on the fingerprint bit width; if bit width drift is detected, it is corrected according to the zero-padding or truncation strategy used in the tag records. The extracted binary fingerprint is consistent with the generation rules in the writing stage and has the conditions to be mapped to the value data field.

[0183] When mapping binary fingerprints to value data, decoding is performed according to a pre-defined mapping relationship. This mapping relationship can be a direct lookup table, hash verification followed by readback, or a reverse mapping of erasure coding. In the direct lookup table path, the fingerprint is used as an index or key to access local read-only table entries, returning the value data. In the hash verification path, a hash operation is first performed on the candidate value and compared with the fingerprint; if they match, confirmation is returned. In the erasure coding path, error correction and reorganization are performed first, followed by value domain restoration. To ensure consistent order, the mapping output is rearranged according to the index table of the parsed data records, forming a query result that corresponds one-to-one with the input set. No new fields are introduced during the entire mapping phase, and the record granularity and alignment of the parsed data are not changed. The final output query result maintains the same encoding and length specifications as the associated value field defined in the writing phase.

[0184] For example, first write the key-value pair mapping of the database into the filter structure, and then use LWE-PIR to query the filter matrix.

[0185] pp KV ←KWPIR.setup(λ,KV): Writes the key-value pair mapping from the database into the filter structure, b←F.write(KV,H). Executes the LWE setup algorithm to obtain common parameters.

[0186] pp LWE ←LWEPIR.setup(λ,F) returns pp KV =(pp LWE H).

[0187] (q,st)←KWPIR.query(pp KV ,k): Query algorithm, executing (h1,...,h k )←H(k).

[0188] Construct index vector F H(k) =(f1,...,f m ). Where f i =1 if and only if i∈H(k), otherwise 0. Return (q,st)←KWPIR.query(pp LWE ,f H(k) ).

[0189] r←KWPIR.respond(pp KV (KV,q): Response algorithm. Settings Return r←KWPIR.respond(pp LWE ,F,q).

[0190] r←KWPIR.process(pp KV ,KV,st,r): Run the function x←LWEPIR.process(pp LWE ,st,r), returns the reconstructed result x.

[0191] The client only needs to construct a sparse encrypted query vector, and the server can return the corresponding result by performing a homomorphic inner product operation once. This avoids the expensive cost of running the index PIR multiple times in the traditional method and realizes a natural mapping of "keyword query → one PIR".

[0192] Binary Fuse Filters (BFFs) are an emerging and highly efficient data structure with extremely low space inflation (only 1.08–1.13 times) and constant-time query performance. This embodiment applies it to a cryptographic scenario. By concatenating hash fingerprints with value data, the false positive rate is controlled within a configurable range, ensuring the correctness and stability of query results. BFFs not only efficiently detect the existence of keywords but also reconstruct the corresponding value information during retrieval, providing an ideal data representation for keyword PIRs (Proof-of-Reference Indexes).

[0193] In this embodiment, key-value pairs are encoded into multi-column segmented matrices and mapped to filters using the same hash function. The encrypted query vector generated by the client sets only the hash position corresponding to the keyword to 1, and the rest to 0. After receiving the query, the server efficiently calculates and returns the encrypted result using the inner product homomorphic property of LWE. The client can then decrypt the result to obtain the value of the corresponding keyword.

[0194] Example Description: In the context of chronic disease follow-up management in the healthcare field, community health service centers need to provide medical staff with efficient data query capabilities without exposing patient privacy. First, the system extracts data items from the patient's health record database, including keyword fields and associated value fields. Keyword fields can be disease tags, symptom descriptions, or medication categories, while associated value fields can be follow-up time, medication dosage, test results, etc. Then, the system creates a binary fusion filter structure for efficient storage and rapid indexing of these data items, sets a false positive rate threshold parameter, and adjusts the hash function's processing parameters to ensure that the data has the predetermined accuracy and space utilization when written. Each keyword field generates a hash fingerprint value through the adjusted hash function, which is then concatenated with its corresponding associated value field to form a binary fusion filter storage unit, and stored in the designated location of the binary fusion filter structure according to the write location rules.

[0195] After the data structure is constructed, the system generates a filtering matrix based on the binary fusion filter structure. During this process, all storage units are parsed, the value data portion and the hash fingerprint portion are separated, and the value data portion is further divided into data blocks of a preset length, arranged according to the logical order of patient records to form the row vectors of the filtering matrix. All row vectors are combined to generate the complete filtering matrix, and its row and column dimension parameters are extracted. Based on the security level parameters of the learning error problem, public and private key components are generated and integrated with the matrix dimension information to form an encryption parameter set, ensuring the security of subsequent encrypted queries and decryption processes.

[0196] In practical use, when doctors or health administrators need to check whether a patient has specific symptoms or is using a certain type of medication, the system receives the query keywords and verifies the validity of the input format. For example, the input "hypertension" or "beta-blockers" will be checked to see if it conforms to predefined character sets and encoding requirements. Subsequently, the system retrieves the previously adjusted hash function parameters, processes the keyword using the hash function to generate an initial hash value. The initial hash value is divided into multiple hash segments of equal length, then converted into integer position values, and these position values ​​are combined to form a hash position set.

[0197] Based on the hash position set, the system constructs an index vector. To do this, a first and second value, such as 1 and 0, are defined, and an initial vector is created based on the row dimension parameter extracted from the encryption parameter set. All elements are initially set to the second value, and then, for each position in the hash position set, the corresponding element is modified to the first value, ultimately resulting in a sparse index vector. Next, the public key component is extracted, and a random noise vector is generated. The index vector, along with the public key component and the random noise vector, participates in the encryption process to obtain the initial encrypted data, which serves as the encrypted query vector. Simultaneously, the private key component and the random noise vector are integrated to generate query status information.

[0198] After receiving the filter matrix and the encrypted query vector, the server divides the filter matrix into multiple row vectors. Each row vector is homomorphically multiplied by the encrypted query vector, generating multiple homomorphic product results. These results are then homomorphically accumulated to obtain the initial aggregation result. Homomorphic noise components generated during this process are preserved. The final initial aggregation result is then encapsulated into encrypted response data after modulo reduction. At this point, the server cannot know the content of the query keywords, ensuring user privacy.

[0199] The client reconstructs the encrypted response data using query status information. First, it extracts the private key component and a random noise vector from the query status information. The private key component is used to decrypt the encrypted response data, generating initial decrypted data, which is then processed by applying the random noise vector for noise reduction. The processed data is parsed to obtain structured parsed data, from which binary fingerprints are extracted. These binary fingerprints are then mapped to specific value data. For example, the mapping might yield the patient's latest follow-up results, test result values, or medication records, ultimately generating the query result.

[0200] In the fintech business, the filter matrix keyword retrieval mechanism can support a variety of highly sensitive application scenarios, especially compliance review, anti-money laundering detection, risk assessment, and intelligent investment and financing analysis.

[0201] In customer compliance review scenarios, financial institutions' databases store a large amount of customer information, including names, account numbers, transaction tags, risk classifications, and compliance status. The system first writes this customer data using a binary fusion filter structure, with associated value fields that can be compliance levels or risk warning codes. When conducting due diligence, the compliance department inputs keywords, such as "high-risk area account" or "abnormal payment pattern." These keywords are processed by a hash function to generate a corresponding set of hash positions. The client constructs an index vector locally and encrypts it. The server performs homomorphic operations based on the filtering matrix and returns encrypted response data. After decryption, the client can determine whether the customer matches a specific compliance tag. The entire process ensures that the keywords themselves are not leaked, making it particularly suitable for privacy protection of sensitive tags in cross-border business reviews.

[0202] In anti-money laundering detection scenarios, keywords may be specific descriptions related to illicit transaction patterns, such as "short-term high-frequency transfers" or "structured deposits." Financial regulators or internal risk control systems need to perform rapid searches within massive transaction databases, while simultaneously avoiding direct access to the specific query content by servers or third-party cloud providers. By using the homomorphic inner product of encrypted query vectors and filtering matrices, sets of accounts associated with suspicious behavior can be efficiently screened. The decrypted results directly correspond to whether the transaction characteristics of a particular group of customers conform to a risk pattern, thereby improving the timeliness and privacy protection capabilities of anti-money laundering detection.

[0203] In risk assessment scenarios, financial institutions often need to query customers' historical default records or contract performance based on keywords. For example, entering keywords such as "contract overdue" can trigger a search process to determine whether the corresponding customer group has any risk records. Compared with traditional plaintext queries, the encrypted search process avoids keyword leakage and the misuse of query traces, while also reducing the possibility of database operators abusing sensitive customer tags.

[0204] In intelligent investment and financing analysis scenarios, keywords might be specific business tags within the investment field, such as "new energy subsidy projects" or "medical data platform." Funds or investment companies can input these keywords into a decision support system to retrieve matching company information and investment value indicators from the target company's database. Since query keywords involve cutting-edge projects and market opportunities, submitting them in plaintext risks being stolen by competitors. Encrypted search mechanisms ensure that investors can quickly locate project data while protecting sensitive business information.

[0205] This embodiment strictly bases terminal-side processing on the private key component and random noise vector carried by the query status information. Decryption, noise reduction, and parsing are linked together. The noise component in the initial decrypted data is canceled out under the condition of consistent position and scale, and the parsed data can stably fall back to the effective payload range. The extraction of binary fingerprints is carried out under the constraints of fixed window and consistent bit width, and the mapping between fingerprint and value data is completed without exposing any unauthorized index clues.

[0206] In one embodiment, a filter matrix keyword retrieval device is provided, which corresponds one-to-one with the filter matrix keyword retrieval method described in the above embodiments. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the keyword retrieval device for a filtering matrix of the present invention. The modules include a filter construction module 10, a parameter generation module 20, a keyword parsing module 30, a query encryption module 40, a homomorphic calculation module 50, and a result reconstruction module 60. Detailed descriptions of each functional module are as follows:

[0207] Filter construction module 10 is used to establish a binary fusion filter structure and write data item information from the database into the binary fusion filter structure;

[0208] Parameter generation module 20 is used to generate a filtering matrix based on the binary fusion filter structure and to generate an encryption parameter set based on the filtering matrix;

[0209] Keyword parsing module 30 is used to receive query keywords, process the query keywords using a hash function, and generate a hash position set;

[0210] The query encryption module 40 is used to construct an index vector based on the hash position set, perform encryption processing on the index vector based on the encryption parameter set, and generate an encrypted query vector and query status information.

[0211] The homomorphic computation module 50 is used to generate encrypted response data by performing homomorphic inner product processing on the filtering matrix and the encrypted query vector through the server.

[0212] The result reconstruction module 60 is used to perform a reconstruction operation on the encrypted response data based on the query status information to generate query results.

[0213] In one embodiment, the filter construction module 10 is specifically used for:

[0214] Retrieve data item information from the database, including keyword fields and associated value fields;

[0215] Create a binary fusion filter structure;

[0216] Configure the false positive rate threshold parameter of the binary fusion filter structure;

[0217] Adjust the processing parameters of the hash function based on the false positive rate threshold parameter;

[0218] The adjusted hash function is applied to process the keyword field to generate a hash fingerprint value corresponding to the keyword field;

[0219] The associated value field is concatenated with the hash fingerprint value to form a binary fusion filter storage unit;

[0220] The write position of the binary fusion filter storage unit in the binary fusion filter structure is determined based on the hash fingerprint value and the false positive rate threshold parameter.

[0221] Based on the write location, the binary fusion filter storage unit is written to the specified location of the binary fusion filter structure.

[0222] In one embodiment, the parameter generation module 20 is specifically used for:

[0223] Obtain all binary fusion filter storage units in the binary fusion filter structure;

[0224] Analyze each binary fusion filter storage unit to separate the value data part and the hash fingerprint part;

[0225] The value data portion is divided into data blocks of a preset length;

[0226] Arrange the data blocks into row vectors of the filtering matrix according to the logical order of the data item information in the database.

[0227] Combine all row vectors to form a filtering matrix;

[0228] Obtain the row dimension parameters and column dimension parameters of the filter matrix;

[0229] Select a security level parameter for the learning error problem, and generate a public key component and a private key component based on the security level parameter;

[0230] The row dimension parameters, column dimension parameters, public key components, and private key components are integrated to form an encryption parameter set.

[0231] In one embodiment, the keyword parsing module 30 is specifically used for:

[0232] Receive query keywords and verify that the format of the query keywords meets the predefined requirements;

[0233] Obtain the processing parameters of the adjusted hash function;

[0234] Based on the adjusted processing parameters of the hash function, the query keywords are processed using the hash function to generate an initial hash value;

[0235] The initial hash value is divided into multiple hash segments of equal length;

[0236] Convert each hash segment into an integer position value;

[0237] Combine all integer position values ​​to form a hash position set.

[0238] In one embodiment, the query encryption module 40 is specifically used for:

[0239] Define the first and second values;

[0240] Extract row dimension parameters from the set of encryption parameters, and create an initial vector with a length equal to the row dimension parameters;

[0241] Set all elements of the initial vector to the second value;

[0242] Traverse the set of hash positions and set the element corresponding to each position in the initial vector as the first value to form an index vector;

[0243] Extract the public key component from the set of encryption parameters;

[0244] Generate a random noise vector;

[0245] The index vector is encrypted based on the public key component and the random noise vector to generate initial encrypted data, which is then used as the encrypted query vector.

[0246] Extract the private key component from the set of encryption parameters;

[0247] The private key component is integrated with the random noise vector to form query status information.

[0248] In one embodiment, the homomorphic computation module 50 is specifically used for:

[0249] The filtering matrix and the encrypted query vector are obtained from the server.

[0250] The filtering matrix is ​​divided into multiple matrix row vectors by rows;

[0251] Perform homomorphic scalar multiplication on each matrix row vector and the encrypted query vector to generate multiple homomorphic product results;

[0252] All homomorphic product results are homomorphically summed to generate the initial aggregation result;

[0253] The initial aggregation result retains the homomorphic noise components generated during the homomorphic scalar multiplication and homomorphic accumulation processes.

[0254] A modulo reduction operation is performed on the initial aggregation result, and the result of the modulo reduction operation is encapsulated into encrypted response data.

[0255] In one embodiment, the result reconstruction module 60 is specifically used for:

[0256] Extract the private key component and random noise vector from the query status information;

[0257] The encrypted response data is decrypted using the private key component to generate initial decrypted data.

[0258] The initial decrypted data is noise-removed using the random noise vector.

[0259] Perform a parsing operation on the noise-removed data to obtain parsed data;

[0260] Extract the binary fingerprint from the parsed data;

[0261] The binary fingerprint is mapped to value data to generate query results.

[0262] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external user terminals via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a filtering matrix keyword retrieval method on the server side.

[0263] In one embodiment, a computer device is provided, which may be a user terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the user-side functions or steps of a filtering matrix keyword retrieval method.

[0264] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0265] Establish a binary fusion filter structure and write the data item information from the database into the binary fusion filter structure;

[0266] A filtering matrix is ​​generated based on the binary fusion filter structure, and an encryption parameter set is generated based on the filtering matrix.

[0267] Receive query keywords, process the query keywords using a hash function, and generate a set of hash positions;

[0268] An index vector is constructed based on the hash position set, and an encryption process is performed on the index vector based on the encryption parameter set to generate an encrypted query vector and query status information.

[0269] The server performs homomorphic inner product processing on the filter matrix and the encrypted query vector to generate encrypted response data.

[0270] Based on the query status information, a reconstruction operation is performed on the encrypted response data to generate query results.

[0271] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0272] Establish a binary fusion filter structure and write the data item information from the database into the binary fusion filter structure;

[0273] A filtering matrix is ​​generated based on the binary fusion filter structure, and an encryption parameter set is generated based on the filtering matrix.

[0274] Receive query keywords, process the query keywords using a hash function, and generate a set of hash positions;

[0275] An index vector is constructed based on the hash position set, and an encryption process is performed on the index vector based on the encryption parameter set to generate an encrypted query vector and query status information.

[0276] The server performs homomorphic inner product processing on the filter matrix and the encrypted query vector to generate encrypted response data.

[0277] Based on the query status information, a reconstruction operation is performed on the encrypted response data to generate query results.

[0278] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0279] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0280] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0281] It should be noted that if any software tools or components not belonging to this company appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A filtering matrix keyword retrieval method, characterized in that, Includes the following steps: Establish a binary fusion filter structure and write the data item information from the database into the binary fusion filter structure; A filtering matrix is ​​generated based on the binary fusion filter structure, and an encryption parameter set is generated based on the filtering matrix. Receive query keywords, process the query keywords using a hash function, and generate a set of hash positions; An index vector is constructed based on the hash position set, and an encryption process is performed on the index vector based on the encryption parameter set to generate an encrypted query vector and query status information. The server performs homomorphic inner product processing on the filter matrix and the encrypted query vector to generate encrypted response data. Based on the query status information, a reconstruction operation is performed on the encrypted response data to generate query results.

2. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, Establishing a binary fusion filter structure and writing data item information from the database into the binary fusion filter structure includes: Retrieve data item information from the database, including keyword fields and associated value fields; Create a binary fusion filter structure; Configure the false positive rate threshold parameter of the binary fusion filter structure; Adjust the processing parameters of the hash function based on the false positive rate threshold parameter; The adjusted hash function is applied to process the keyword field to generate a hash fingerprint value corresponding to the keyword field; The associated value field is concatenated with the hash fingerprint value to form a binary fusion filter storage unit; The write position of the binary fusion filter storage unit in the binary fusion filter structure is determined based on the hash fingerprint value and the false positive rate threshold parameter. Based on the write location, the binary fusion filter storage unit is written to the specified location of the binary fusion filter structure.

3. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, A filtering matrix is ​​generated based on the binary fusion filter structure, and a set of encryption parameters is generated based on the filtering matrix, including: Obtain all binary fusion filter storage units in the binary fusion filter structure; Analyze each binary fusion filter storage unit to separate the value data part and the hash fingerprint part; The value data portion is divided into data blocks of a preset length; Arrange the data blocks into row vectors of the filtering matrix according to the logical order of the data item information in the database. Combine all row vectors to form a filtering matrix; Obtain the row dimension parameters and column dimension parameters of the filter matrix; Select a security level parameter for the learning error problem, and generate a public key component and a private key component based on the security level parameter; The row dimension parameters, column dimension parameters, public key components, and private key components are integrated to form an encryption parameter set.

4. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, Receive query keywords, process the query keywords using a hash function, and generate a set of hash positions, including: Receive query keywords and verify that the format of the query keywords meets the predefined requirements; Obtain the processing parameters of the adjusted hash function; Based on the adjusted processing parameters of the hash function, the query keywords are processed using the hash function to generate an initial hash value; The initial hash value is divided into multiple hash segments of equal length; Convert each hash segment into an integer position value; Combine all integer position values ​​to form a hash position set.

5. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, An index vector is constructed based on the hash position set, and the index vector is encrypted based on the encryption parameter set to generate an encrypted query vector and query status information, including: Define the first and second values; Extract row dimension parameters from the set of encryption parameters, and create an initial vector with a length equal to the row dimension parameters; Set all elements of the initial vector to the second value; Traverse the set of hash positions and set the element corresponding to each position in the initial vector as the first value to form an index vector; Extract the public key component from the set of encryption parameters; Generate a random noise vector; The index vector is encrypted based on the public key component and the random noise vector to generate initial encrypted data, which is then used as the encrypted query vector. Extract the private key component from the set of encryption parameters; The private key component is integrated with the random noise vector to form query status information.

6. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, The server performs homomorphic inner product processing on the filter matrix and the encrypted query vector to generate encrypted response data, including: The filtering matrix and the encrypted query vector are obtained from the server. The filtering matrix is ​​divided into multiple matrix row vectors by rows; Perform homomorphic scalar multiplication on each matrix row vector and the encrypted query vector to generate multiple homomorphic product results; All homomorphic product results are homomorphically summed to generate the initial aggregation result; The initial aggregation result retains the homomorphic noise components generated during the homomorphic scalar multiplication and homomorphic accumulation processes. A modulo reduction operation is performed on the initial aggregation result, and the result of the modulo reduction operation is encapsulated into encrypted response data.

7. The keyword retrieval method using a filtering matrix as described in claim 1, characterized in that, Based on the query status information, a reconstruction operation is performed on the encrypted response data to generate query results, including: Extract the private key component and random noise vector from the query status information; The encrypted response data is decrypted using the private key component to generate initial decrypted data. The initial decrypted data is noise-removed using the random noise vector. Perform a parsing operation on the noise-removed data to obtain parsed data; Extract the binary fingerprint from the parsed data; The binary fingerprint is mapped to value data to generate query results.

8. A filter matrix keyword retrieval device, characterized in that, The filtering matrix keyword retrieval device includes: A filter construction module is used to build a binary fusion filter structure and write data item information from the database into the binary fusion filter structure. The parameter generation module is used to generate a filtering matrix based on the binary fusion filter structure and to generate an encrypted parameter set based on the filtering matrix. The keyword parsing module receives query keywords, processes the query keywords using a hash function, and generates a set of hash positions. The query encryption module is used to construct an index vector based on the hash position set, perform encryption processing on the index vector based on the encryption parameter set, and generate an encrypted query vector and query status information. The homomorphic computation module is used to generate encrypted response data by having the server perform homomorphic inner product processing on the filtering matrix and the encrypted query vector. The result reconstruction module is used to perform a reconstruction operation on the encrypted response data based on the query status information to generate query results.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a filter matrix keyword retrieval program stored in the memory and executable on the processor. When executed by the processor, the filter matrix keyword retrieval program implements the steps of the filter matrix keyword retrieval method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a filter matrix keyword retrieval program, which, when executed by a processor, implements the steps of the filter matrix keyword retrieval method as described in any one of claims 1-7.

Citation Information

Cited By

  • Privacy retrieval method and system based on end-cloud collaborative architecture

    CN121644080A