Homomorphic encryption character string accurate matching method applied to cloud computing application program

By building a collaborative processing framework in a cloud computing application, mapping database data blocks to polynomials and performing coefficient-level parallel operations, the problems of high computational latency and low storage efficiency in homomorphic encryption string matching methods are solved, and efficient and secure string matching operations are achieved.

CN121071196AActive Publication Date: 2025-12-05YUNNAN INST OF GEOLOGY & MINERAL SURVEYING & MAPPING CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511621754.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2025-12-05
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

Existing homomorphic encryption string matching methods suffer from high computational latency, data transmission bottlenecks, low storage efficiency, and a trade-off between security and efficiency, making it difficult to perform string matching operations efficiently while protecting data privacy.

Method used

A collaborative processing framework is constructed, which uses SSD storage units and homomorphic encryption algorithms to map database data blocks into polynomials. String matching is achieved through coefficient-level parallel operations, using only homomorphic addition operations to avoid complex multiplication or rotation operations, and bit string addition is implemented within SSD storage units to improve efficiency.

Benefits of technology

It significantly reduces the memory footprint of encrypted data, improves data transmission and storage efficiency, ensures data security, and enhances system performance and energy efficiency by optimizing the internal data flow and computing logic of the SSD, achieving efficient string matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071196A_ABST
    Figure CN121071196A_ABST
Patent Text Reader

Abstract

The invention relates to a homomorphic encryption character string accurate matching method applied to a cloud computing application program, and belongs to the technical field of cloud computing. The method comprises the following steps: firstly, constructing a co-processing framework, dividing a binary character string of original data of a database into a plurality of data blocks with set lengths by a server, mapping a data block sequence into a data polynomial, encrypting the data polynomial by using a homomorphic encryption algorithm, and writing a data polynomial ciphertext into an SSD storage unit; the client performs bit-by-bit negation on an input query character string to obtain a negation query character string, the negation query character string is filled into each coefficient of the polynomial structure, and a homomorphic encryption algorithm is used to encrypt a query polynomial; and performing coefficient-level homomorphic addition operation on each encryption coefficient of the data polynomial ciphertext and the query polynomial ciphertext, comparing an addition result with a corresponding coefficient in the matching polynomial, and generating a matching position index of the corresponding data block. According to the invention, the character string matching operation can be quickly carried out.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and more particularly to a homomorphic encryption string accurate matching method applied to a cloud computing application. BACKGROUND

[0002] With the rapid development of cloud computing technology, more and more enterprises and individuals store sensitive data in the cloud. These data include but are not limited to DNA sequences, biometric information, medical records and financial data. In many application scenarios, such as DNA sequence matching, biometric recognition and database query, accurate string matching operations need to be performed on these encrypted data.

[0003] Homomorphic encryption (HE) technology allows direct computation on encrypted data without decryption, which is of great significance for protecting data privacy. However, the existing homomorphic encryption string matching method has the following technical problems: (1) High computational delay: Homomorphic encryption operations are usually several orders of magnitude slower than traditional computing operations, resulting in slow processing speed.

[0004] (2) Data transmission bottleneck: The amount of encrypted data is much larger than the original data, increasing the time and cost of data transmission.

[0005] (3) Low storage efficiency: The existing encrypted data storage method does not fully utilize the characteristics of storage devices, resulting in low storage efficiency.

[0006] (4) Balance between security and efficiency: How to improve the efficiency of matching operations while ensuring data security is a problem to be solved. SUMMARY

[0007] The purpose of the present application is to provide a homomorphic encryption string accurate matching method applied to a cloud computing application, which can efficiently and quickly perform string matching operations while protecting data privacy.

[0008] To achieve the above purpose, the present application provides a homomorphic encryption string accurate matching method applied to a cloud computing application, which comprises: Constructing a collaborative processing framework, the collaborative processing framework comprising a client and a server and an SSD storage unit located in a cloud data center; The server divides the database original data binary string into a plurality of data blocks of a set length, packs them into a data block sequence, maps the data block sequence into a data polynomial, wherein each data block is the coefficient of a term in the data polynomial, encrypts the data polynomial using a homomorphic encryption algorithm to obtain data polynomial ciphertext, and writes the data polynomial ciphertext into the SSD storage unit; The client takes the input query string bit by bit to get the negated query string, fills the negated query string to the coefficients of the polynomial structure, constructs a query polynomial, encrypts the query polynomial using a homomorphic encryption algorithm, obtains the query polynomial ciphertext, and uploads it to the server; The server performs a homomorphic addition operation on the coefficients of the data polynomial ciphertext and the query polynomial ciphertext in a coefficient-level parallel operation, compares the addition results of the encrypted coefficients with the corresponding coefficients in the pre-defined and encrypted matching polynomial, and if any coefficient matches, generates a matching position index for the corresponding data block and encrypts the matching position index and feeds it back to the client; The client decrypts the matching position index using the private key.

[0009] Optionally, the data polynomial, the query polynomial and the matching polynomial have the same structure; The length of each data block obtained by dividing the binary string of the original database data is 16 bits, the bit width of each coefficient in the data polynomial, the query polynomial and the matching polynomial is 16 bits, and the maximum degree of the data polynomial, the query polynomial and the matching polynomial is the same.

[0010] Optionally, the SSD storage unit is configured with a dedicated storage area, and the data polynomial ciphertext is stored in the dedicated storage area; The storage layout of the dedicated storage area adopts a bit line first vertical layout, and the storage mode of the dedicated storage area adopts a single-layer cell (SLC) mode.

[0011] Optionally, the homomorphic encryption algorithm is a BFV homomorphic encryption algorithm.

[0012] Optionally, the binary string of the original database data is divided into a plurality of data blocks with a set length, including: The binary string is divided into a plurality of block sequences with a fixed length of 16 bits, and when the last data block is less than 16 bits, 0 is filled to make up 16 bits.

[0013] The plurality of data blocks are packaged to form a data block sequence: Wherein, represents the vector of the packaged data block sequence; represents the i th data block, i is the block index , k is the original data length, t is the coefficient bit width, corresponding to the data block length, t = 16.

[0014] Optionally, the mapping of the data block sequence into a data polynomial comprises: If the data length L is less than or equal to the polynomial degree n , a data polynomial is constructed as: wherein, is the data polynomial, is the th element in the data block sequence, corresponding to the i th encryption coefficient value; i is the variable term of the polynomial, is the exponent, 0≤ i ≤ i -1; n If the block sequence length L is greater than the polynomial degree , the data block sequence is divided into multiple polynomials: n The expression of the data polynomial is: wherein, is the j th data polynomial; n is the polynomial degree, n =1024; is the polynomial encryption coefficient value, corresponding to the element in the block sequence; j is the polynomial index, , L is the block sequence length, ; is the i th polynomial term, i is the exponent, 0≤ i ≤ n -1, t is the coefficient bit width, corresponding to the data block length.

[0015] Optionally, the filling of the negated query string into each term coefficient of the polynomial comprises: When the length of the query string is equal to the polynomial coefficient bit width t, the bit-by-bit negated query string is directly repeated and filled into each term coefficient of the polynomial structure; When the length of the query string is greater than the polynomial coefficient bit width t, the bit-by-bit negated query string is divided into multiple 16-bit data blocks, and the multiple data blocks are filled into each term coefficient of the polynomial structure in a cyclic manner; When the length of the query string is less than the polynomial coefficient bit width, the end of the bit-by-bit negated query string is padded with 0 to 16 bits, and then the string is repeated and filled into each term coefficient of the polynomial structure; The expression of the query polynomial is: ​ wherein, represents a query polynomial; represents a padding value of the i th encrypted coefficient; is the i th polynomial term, 0≤ i n ; n is a polynomial degree, n =1024.

[0016] Optionally, an expression of the matching polynomial is: wherein, is a matching polynomial; represents a numerical encoding of a string of all 1s; t is a coefficient bit width, t =16; is a polynomial term; i is an exponent, 0≤ i ≤ n -1, n is a polynomial degree.

[0017] Optionally, when the data polynomial and the query polynomial are encrypted using a homomorphic encryption algorithm, the public key provided by the server is used for encryption.

[0018] Optionally, the homomorphic addition operation of the coefficient-level parallel operation is performed on the encrypted coefficients of each term of the data polynomial ciphertext and the query polynomial ciphertext, and the addition result of each encrypted coefficient is compared with the corresponding coefficient of the pre-defined and encrypted matching polynomial, comprising: performing in the dedicated storage area: adding the encrypted coefficients of each term of the data polynomial and the corresponding encrypted coefficients of each term of the query polynomial separately bit by bit, and outputting the addition result corresponding to each coefficient; comparing the addition result of each coefficient with the corresponding coefficient in the matching polynomial, and if any coefficient matches, generating a matching position index of the corresponding data block.

[0019] The present application has the following beneficial effects: The present application achieves the above-mentioned purposes by the following technical means: 1. A memory-efficient polynomial packing method is adopted: a binary string is divided into small segments (each segment is 16 bits), and then these segments are packed into polynomials, so that the encrypted data is only 4 times larger than the original data. Compared with the existing method, the memory occupation is greatly reduced, and the data transmission and storage efficiency is improved.

[0020] ​2. Only using homomorphic addition: string matching is implemented through homomorphic addition, avoiding complex homomorphic multiplication or rotation operation.

[0021] 3. A mechanism for implementing bit string addition in the SSD storage unit (in the NAND flash chip) is designed, which takes advantage of the array level and bit level parallelism of the flash memory to accelerate the matching process and improve processing efficiency.

[0022] 4. During the entire matching process, the data always remains in an encrypted state, and only the client has the decryption private key, ensuring the security of the data during transmission and storage.

[0023] 5. The matching algorithm is integrated into the SSD, enabling the server-side software to efficiently call the matching function in the SSD, and through the optimization of data flow and calculation logic inside the SSD, the performance and energy efficiency of the system are improved.

[0024] The system of the present application has other characteristics and advantages, which will be apparent or will be described in detail in the accompanying drawings and subsequent specific embodiments incorporated herein, which together serve to explain the specific principles of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0025] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of exemplary embodiments of the present application taken in conjunction with the accompanying drawings, in which like reference characters refer to the like parts throughout the figures, and in which:

[0026] Figure 1 A flowchart showing the steps of a homomorphic encryption string exact matching method applied to a cloud computing application according to the present application is shown. DETAILED DESCRIPTION

[0027] The present application will be described in more detail by referring to the attached drawings. Although preferred embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application is more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0028] A homomorphic encryption string exact matching method applied to a cloud computing application according to the present application comprises: S1: Construct a cooperative processing framework, which includes a client and a server and an SSD storage unit located in a cloud data center; Specifically, the SSD storage unit is configured with a dedicated storage area, the storage layout of the dedicated storage area adopts a bit-line priority vertical layout, and the storage mode of the dedicated storage area adopts a single-layer cell (SLC) mode.

[0029] S2: The server divides the original binary string of data in the database into multiple data blocks of a set length, packages them into a data block sequence, maps the data block sequence into a data polynomial, where each data block is the coefficient of a term in the data polynomial, encrypts the data polynomial using a homomorphic encryption algorithm to obtain the data polynomial ciphertext, and writes the data polynomial ciphertext into the SSD storage unit. Specifically, the homomorphic encryption algorithm is the BFV homomorphic encryption algorithm. The ciphertext of the data polynomial is stored in a dedicated storage area. In this embodiment, the length of each data block after the original binary string of the database data is 16 bits, the bit width of each coefficient in the data polynomial, query polynomial, and matching polynomial is 16 bits, and the maximum degree of the data polynomial, query polynomial, and matching polynomial is the same.

[0030] In this step, the raw binary string of data from the database is divided into multiple data blocks of a set length, including: The binary string is divided into multiple block sequences by a fixed length of 16 bits. When the last data block is less than 16 bits, it is padded with 0s to make it 16 bits.

[0031] Pack multiple data blocks to form a data block sequence: in, A vector representing a sequence of packed data blocks; Indicates the first i One data block, i For block index , k The length of the original data. t The coefficient bit width corresponds to the data block length. t =16.

[0032] Mapping a sequence of data blocks to a data polynomial includes: If the data length L is less than or equal to the polynomial degree n, then construct a data polynomial: in, For data polynomials, yes The first in i The element corresponding to the element i One encryption coefficient value; For the variable terms of the polynomial, i For exponent, 0 ≤i ≤ n -1; If the block sequence length L is greater than the polynomial degree n Then it is divided into multiple polynomials: The expression for the data polynomial is: in, For the first j A data polynomial; n For polynomial degree, n =1024; These are the polynomial encryption coefficient values, corresponding to elements in the block sequence; j For polynomial indexing, L is the block sequence length. ; For the first i polynomial terms, i For exponent, 0 ≤ i ≤ n -1, t This represents the bit width of the coefficient and the corresponding data block length.

[0033] S3: The client inverts each bit of the input query string to obtain the inverted query string, fills the coefficients of the polynomial structure with the inverted query string to construct the query polynomial, encrypts the query polynomial using a homomorphic encryption algorithm to obtain the query polynomial ciphertext, and uploads it to the server. In this step, the negated query string is filled into the coefficients of the polynomial, including: When the length of the query string is equal to the width t of the polynomial coefficients, the query string, after being inverted bit by bit, is repeatedly filled into each coefficient of the polynomial structure. When the length of the query string is greater than the width t of the polynomial coefficients, the query string after bit-by-bit inversion is divided into multiple 16-bit data blocks, and the multiple data blocks are filled into each coefficient of the polynomial structure in a cyclic filling manner. When the length of the query string is less than the width of the polynomial coefficients, the end of the query string after inverting each bit is padded with 0 to 16 bits, and then the string is repeated to padded each coefficient of the polynomial structure. The expression for the query polynomial is: in, Represents the query polynomial; Indicates the first i The padding value for each encryption coefficient; For the first i n polynomial terms, 0 ≤ i <n ; n is a polynomial degree, n =1024.

[0034] In this embodiment, when the data polynomial and the query polynomial are encrypted using the homomorphic encryption algorithm in steps S2 and S3, the public key provided by the server is used for encryption.

[0035] S4: The server performs homomorphic addition operation on the encrypted coefficients of each term of the data polynomial ciphertext and the query polynomial ciphertext in a coefficient-level parallel operation, compares the addition result of each encrypted coefficient with the corresponding coefficient in the pre-defined and encrypted stored matching polynomial, and if any coefficient matches, generates the matching position index of the corresponding data block and feeds back the matching position index to the client after encryption; In this step, the expression of the matching polynomial is: wherein, is a matching polynomial; represents the numerical encoding of the all-1 string; t is the coefficient bit width, t =16; is a polynomial term; i is an exponent, 0≤ i ≤ n -1, n is a polynomial degree.

[0036] The encrypted coefficients of each term of the data polynomial ciphertext and the query polynomial ciphertext are subjected to homomorphic addition operation in a coefficient-level parallel operation, and the addition result of each encrypted coefficient is compared with the corresponding coefficient in the pre-defined and encrypted stored matching polynomial, including: In the dedicated storage area: The encrypted coefficients of each term of the data polynomial are individually added to the corresponding encrypted coefficients of each term of the query polynomial bit by bit, and the addition result corresponding to each coefficient is outputted; The addition result of each coefficient is compared with the corresponding coefficient in the matching polynomial, and if any coefficient matches, the matching position index i of the corresponding data block is generated.

[0037] S5: The client decrypts the matching position index using the private key corresponding to the public key to obtain the matching position of the original data.

[0038] The technical solutions of the present application will be further explained and described through a specific example.

[0039] The application provides a homomorphic encryption string accurate matching method applied to a cloud computing application. Data packing optimization: split and pack binary strings into polynomial coefficients to reduce the memory occupation of encrypted data. Traditional arithmetic methods pack single bits, resulting in high storage overhead; this method packs multiple bits (such as 16 bits) into a polynomial coefficient, significantly reducing memory growth (from 64 times to 4 times).

[0040] Only homomorphic addition is used: string matching is realized through homomorphic addition, avoiding complex homomorphic multiplication or rotation operations. This is achieved by taking the inverse query ( ) and adding it to the input data. If there is a match, the result is a full 1 string, and then homomorphic addition is used to calculate in the encrypted domain.

[0041] Parallel processing: through structured polynomial design, SIMD (Single Instruction Multiple Data) parallelism is supported, and multiple string matching operations can be processed within the same polynomial.

[0042] Overall effect: reduce calculation delay and data movement, improve performance and energy efficiency, and be suitable for privacy-sensitive applications (such as DNA sequence matching and encrypted database search).

[0043] The data processing flow is from the input of raw data to the output of encrypted matching results. The overall process is: data preparation (splitting and packing) → polynomial construction → encryption → homomorphic addition → index generation. The following is a step-by-step explanation: 1. Memory-efficient data packing scheme 2. Step 1: Split the binary string 3. Input: binary string , length k (bits).

[0044] Process: split the string into non-overlapping chunks of size t. The default t = 16 bits (based on HE parameters). If k cannot be divided by t, the last chunk is padded with zeros.

[0045] For example, the first chunk of P: .

[0046] The second chunk: , and so on.

[0047] Purpose of this step: reduce data granularity and facilitate efficient packing into polynomial coefficients. Avoid high memory overhead caused by bit-by-bit encryption.

[0048] Effect: Reduce the size of encrypted data, memory usage is reduced by 16 times (compared with traditional arithmetic method), from 64 times to only 4 times (encrypted data size is about 4 times of the original data).

[0049] Data processing flow: Original binary string → split into t-bit blocks → form block sequence.

[0050] Step 2: Packaged message construction Input: Split block sequence , .

[0051] Processing: Construct packaged message , defined as block sequence: , is a vector, each element is a t-bit block.

[0052] Purpose: Organize the block sequence into a linear structure, facilitating conversion to a polynomial.

[0053] Effect: Simplify subsequent polynomial representation, support efficient encoding.

[0054] Data processing flow: Block sequence → combined into a vector .

[0055] Step 3: Polynomial representation Input: Packaged message , contains L elements ( ).

[0056] Processing: Convert into one or more plaintext polynomials. Each polynomial has a maximum degree n (default n =1024): If L≤n, construct a single polynomial: where is the th element of i (i.e., a t -bit block).

[0057] If L> n , split into multiple polynomials: Each polynomial contains n coefficients.

[0058] Purpose of this step: Adapt to the ring structure of HE Support parallel encryption and computation.

[0059] Effect: Take full advantage of the parallelism of polynomials n , reduce the number of polynomials required, and thus reduce encryption delay.

[0060] Data processing flow: Vector → Map to polynomial coefficients → Generate one or more polynomials .

[0061] Step 4: Encrypt polynomials Input: plaintext polynomials .

[0062] Process: Encrypt each polynomial using public key pk: After encryption, each ciphertext is a tuple , where each coefficient is q bits in size (default q=32).

[0063] Purpose of this step: Protect data privacy in the encrypted domain while maintaining computability.

[0064] Effect: The size of the ciphertext is about 4 times that of the plaintext (due to coefficient expansion and tuple structure), which is significantly better than the 64 times growth of traditional methods.

[0065] Data processing flow: plaintext polynomials → BFV encryption → output ciphertext polynomials.

[0066] 2. Secure string matching algorithm Step 1: Query preparation (client side) Input: Query string Q (length y bits).

[0067] Process: Take the inverse query: generate (bitwise inverse). The purpose is to construct a matching condition , which converts the matching problem into an addition problem.

[0068] Duplicate the query: If y / t<n, duplicate Q' to fill the polynomial coefficients to ensure that each coefficient contains the same query pattern (supporting parallel matching).

[0069] For example, construct a polynomial where all are the same.

[0070] Left shift variant: To detect all possible alignment positions, ensure that any position match can be detected, generate multiple left shift query polynomials (s is the number of shifts).

[0071] This step aims to adapt the query to the polynomial structure and achieve multiple matching positions with one processing by copying. Maximize parallel processing capability, improve parallelism, reduce the computational overhead of each query, and check 1024 matching positions in a single operation.

[0072] Data processing flow: original query Q → negation → copy and fill → construct query polynomial → shift variant generation.

[0073] Step 2: Encrypt the query Input: query polynomial .

[0074] Processing: use the same public key pk Encryption: , where u represents the user (client) query, and the ciphertext form is .

[0075] This step aims to protect query privacy in the encrypted domain. Ensure that the server cannot decrypt the query while supporting homomorphic operations.

[0076] Data processing flow: query polynomial → BFV encryption → output encrypted query.

[0077] Step 3: Homomorphic addition (server) Input: encrypted database data (from data packaging) and encrypted query .

[0078] Processing: perform homomorphic addition operation: Where: ): encrypted database polynomial; ): encrypted query polynomial; Hom-Add is a coefficient-level addition (each coefficient is added independently), and the output result is ciphertext.

[0079] When the plaintext value corresponding to a certain coefficient is (i.e., a string of all 1s, 65535 when t=16), it means that the position matches.

[0080] This step aims to calculate the sum of the database data; if it matches, the result corresponds to the encrypted value 65535 of the all-1 string. Avoid the delay caused by traditional homomorphic multiplication and significantly reduce the computational delay.

[0081] Data processing flow: encrypted database + encrypted query -> homomorphic addition -> output result ciphertext.

[0082] Step 4: Index generation Input: homomorphic addition result .

[0083] Process: compare result with "matching polynomial" (encrypted representation of all-1 string).

[0084] Matching polynomial definition: .

[0085] If any coefficient matches , generate matching position index (e.g., index of polynomial coefficient).

[0086] Index is done in SSD controller through comparison algorithm.

[0087] Purpose: identify matching position and return to user. Achieve precise string positioning, support privacy protection.

[0088] Data processing flow: result ciphertext -> compare matching polynomial -> output matching index.

[0089] The above has described various embodiments of the present application, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments.

Claims

1. A homomorphic encryption string exact match method applied to cloud computing applications, characterized in that, The method comprises the following steps: Constructing a cooperative processing framework, which comprises a client and a server and an SSD storage unit located in a cloud data center; The server divides the original data binary string of the database into a plurality of data blocks of a set length, packs the data blocks into a data block sequence, maps the data block sequence into a data polynomial, wherein each data block is a coefficient of a term in the data polynomial, encrypts the data polynomial using a homomorphic encryption algorithm to obtain data polynomial ciphertext, and writes the data polynomial ciphertext into the SSD storage unit; The client takes the input query string bit by bit to obtain an inverted query string, fills the inverted query string into each coefficient of the polynomial structure to construct a query polynomial, encrypts the query polynomial using a homomorphic encryption algorithm to obtain query polynomial ciphertext, and uploads the query polynomial ciphertext to the server; The server performs a homomorphic addition operation on the encrypted coefficients of each term of the data polynomial ciphertext and the query polynomial ciphertext in a coefficient-level parallel manner, compares the addition result of each encrypted coefficient with the corresponding coefficient in a pre-defined and encrypted matching polynomial, and if any coefficient matches, generates a matching position index of the corresponding data block and feeds back the matching position index to the client in an encrypted manner; The client decrypts the matching position index using a private key.

2. The method of claim 1, wherein, The data polynomial, the query polynomial and the matching polynomial have the same structure; Each data block after the original data binary string of the database is divided has a length of 16 bits, each coefficient in the data polynomial, the query polynomial and the matching polynomial has a bit width of 16 bits, and the data polynomial, the query polynomial and the matching polynomial have the same maximum degree.

3. The method of claim 1, wherein, The SSD storage unit is configured with a special storage area, and the data polynomial ciphertext is stored in the special storage area; The storage layout of the special storage area adopts a bit line first vertical layout mode, and the storage mode of the special storage area adopts a single-layer cell (SLC) mode.

4. The method of claim 1, wherein, The homomorphic encryption algorithm is a BFV homomorphic encryption algorithm.

5. The method of claim 2, wherein, Dividing the original data binary string of the database into a plurality of data blocks of a set length comprises: Dividing the binary string into a plurality of block sequences according to a fixed length of 16 bits, and when the last data block is less than 16 bits, filling 0 to make up 16 bits; Packing the plurality of data blocks to form a data block sequence: ; wherein, represents a vector of packed data block sequences; represents the i-th data block, i i is the block index , k is the original data length, t is the coefficient bit width, corresponding to the data block length, t = 16.​ 6. The method of claim 5, wherein, The mapping of the data block sequence into a data polynomial comprises: If the data length L is less than or equal to the polynomial degree n, a data polynomial is constructed: ; wherein, is a data polynomial, is the i th element in i corresponding to the th encrypted coefficient value; i is a variable term of the polynomial, i is an exponent, 0≤ n -1; If the block sequence length L is greater than the polynomial degree n then divide the polynomial into The expression of the data polynomial is: ; wherein, is the j th data polynomial; n is the polynomial degree, n = 1024; is the polynomial encryption coefficient value, corresponding to the element in the block sequence; j is the polynomial index, , L is the block sequence length, ; is the i th polynomial term, i is the exponent, 0 ≤ i ≤ n - 1, t is the coefficient bit width, corresponding to the data block length.

7. The method of claim 6, wherein, Filling the inverted query string into each coefficient of the polynomial comprises: When the length of the query string is equal to the polynomial coefficient bit width t, the inverted query string after bit inversion is directly repeated and filled into each coefficient of the polynomial structure; When the length of the query string is greater than the polynomial coefficient bit width t, the inverted query string after bit inversion is divided into a plurality of 16-bit data blocks, and the plurality of data blocks are filled into each coefficient of the polynomial structure in a cyclic filling manner; When the length of the query string is less than the polynomial coefficient bit width, the end of the query string after being taken bit by bit is filled with 0 to 16 bits, and the string is repeatedly filled to each item coefficient of the polynomial structure; The expression of the query polynomial is: ; wherein represents a query polynomial; represents a padding value for the i th encrypted coefficient; is the i th polynomial term, 0≤ i n n is the polynomial degree, n = 1024.​​ 8. The method of claim 7, wherein, The expression of the matching polynomial is: ; wherein is a matching polynomial; denotes the numeric encoding of an all-ones string; t is the coefficient bit width, t = 16; is a polynomial term; i is an exponent, 0≤ i ≤ n -1, n is the polynomial degree.

9. The method of claim 1, wherein, When the data polynomial and the query polynomial are encrypted using the homomorphic encryption algorithm, the public key provided by the server is used for encryption.

10. The method of claim 1, wherein, The homomorphic addition operation of the coefficient level parallel operation is performed on each encrypted coefficient of the data polynomial ciphertext and the query polynomial ciphertext, and the addition result of each encrypted coefficient is compared with the corresponding coefficient of the pre-defined and encrypted matching polynomial, including: In the dedicated storage area, the following is executed: The encrypted coefficients of each item of the data polynomial and the encrypted coefficients corresponding to each item of the query polynomial are added bit by bit, and the addition result corresponding to each item coefficient is outputted; The addition result of each item coefficient is compared with the corresponding coefficient in the matching polynomial. If any coefficient matches, the matching position index of the corresponding data block is generated.

Citation Information

Patent Citations

  • Database SQL character string operation privacy protection method and system

    CN115712910A

  • Data anonymous trace query method and device, storage medium and electronic equipment

    CN116680324A

  • Data hiding query method and device, electronic equipment and storage medium

    CN118551122A

  • Weight sensing device for mechanical parking

    KR102748911B1