Data query method and device, medium, electronic equipment and program product

By converting batch anonymous query problems into polynomial evaluation problems, and using homomorphic encryption and polynomial reduction processing technology, the problem of large communication overhead in the existing technology is solved, and efficient data query and data privacy protection is achieved.

CN119576979APending Publication Date: 2025-03-07BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411679056.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing batch anonymized query technology leads to huge communication overhead when the amount of data requested by the data requester is large, and how to reduce the traffic becomes an urgent problem.

Method used

By converting the batch anonymous query problem into a polynomial evaluation problem and splitting the polynomial evaluation process into two subprocesses, homomorphic encryption and polynomial reduction processing technology, the communication volume of both parties during polynomial evaluation is reduced.

Benefits of technology

It effectively reduces the traffic during batch anonymous query, improves query efficiency, and protects the data privacy of data requesters in scenarios such as model prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576979A_ABST
    Figure CN119576979A_ABST
Patent Text Reader

Abstract

The invention discloses a data query method and device, a medium, electronic equipment and a program product. The method applied to a data provider comprises the following steps: for each dimension feature in at least part of dimension features in h dimension features, reducing a first polynomial corresponding to the dimension feature according to a first ciphertext polynomial sent by a data requester to obtain a second polynomial; and calculating the value of the second polynomial on at least part of the identifier in the second identifier set with the data requester, so that the data requester obtains the dimension feature corresponding to at least part of the identifier. In this way, the problem of batch hidden trace query can be converted into the polynomial evaluation problem, and the polynomial evaluation process is divided into two sub-processes of reduction and evaluation. Through polynomial order reduction, the number of times of the to-be-evaluated polynomial can be reduced, so that the communication traffic during polynomial evaluation is increased, and the query efficiency of batch hidden trace query is improved. Therefore, through the scheme, the data privacy of the data requester can be protected in scenes such as model prediction, and the communication traffic is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a data query method, device, medium, electronic device and program product. Background Art

[0002] In practical applications, the Private Information Retrieval (PIR) technology allows the data requester to query the data provider's data without revealing the query content of the data requester. The Batch PIR technology allows the data requester to obtain multiple query results in a single anonymous query, improving query efficiency. Therefore, the batch PIR technology greatly improves query efficiency while ensuring privacy, and is widely used in finance, medical and other fields.

[0003] In the related technology, an anonymous query method based on unique-hot encoding and homomorphic encryption is usually used for batch anonymous query. The data communication volume involved in this method is proportional to the amount of data requested by the data requester. When the amount of data requested by the data requester is large, it will cause huge communication overhead for batch anonymous query. Therefore, how to reduce the communication volume of batch anonymous query has become an urgent problem to be solved. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a data query method, which is applied to a data provider, wherein the data provider holds a plurality of first data, the first data includes h-dimensional features, h≥1, and the method includes:

[0006] In response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, according to the first ciphertext polynomial, a first polynomial corresponding to the dimensional feature is reduced in degree to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set;

[0007] The data requester calculates the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional features corresponding to the at least part of the identifiers.

[0008] In a second aspect, the present disclosure provides a data query method, which is applied to a data requester, and the method includes:

[0009] Generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1;

[0010] Based on the second identifier set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial;

[0011] The first ciphertext polynomial is sent to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial, so as to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner;

[0012] Calculate, with the data provider, the value of the second polynomial on at least some of the identifiers in the second identifier set to obtain features of the dimension corresponding to the at least some of the identifiers.

[0013] In a third aspect, the present disclosure provides a data query device, which is applied to a data provider, wherein the data provider holds a plurality of first data, the first data includes h-dimensional features, h≥1, and the device includes:

[0014] A reduction module, configured to, in response to receiving a first ciphertext polynomial sent by a data requester, perform, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, reduction processing on a first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set;

[0015] The first evaluation module is used to calculate, with the data requester, the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional feature corresponding to the at least part of the identifiers.

[0016] In a fourth aspect, the present disclosure provides a data query device, applied to a data requester, the device comprising:

[0017] A generating module, configured to generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1;

[0018] A construction module, used to construct a fifth polynomial based on the second identifier set, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial;

[0019] A sending module, used for sending the first ciphertext polynomial to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner;

[0020] The second evaluation module is used to calculate, together with the data provider, the value of the second polynomial on at least part of the identifiers in the second identifier set, and obtain the dimensional features corresponding to the at least part of the identifiers.

[0021] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the data query method provided in the first aspect of the present disclosure or the steps of the data query method provided in the second aspect of the present disclosure.

[0022] In a sixth aspect, the present disclosure provides an electronic device, including:

[0023] a storage device having a computer program stored thereon;

[0024] A processing device is used to execute the computer program in the storage device to implement the steps of the data query method provided in the first aspect of the present disclosure or the steps of the data query method provided in the second aspect of the present disclosure.

[0025] In a seventh aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the data query method provided in the first aspect of the present disclosure or the steps of the data query method provided in the second aspect of the present disclosure.

[0026] In the above technical solution, first, the data requester generates a second identification set based on the index number of the first data to be requested from the data provider, generates a first ciphertext polynomial based on the second identification set, and sends the first ciphertext polynomial to the data provider; then, the data provider performs a degree reduction process on the first polynomial corresponding to the h-dimensional feature based on each dimensional feature of at least some of the dimensional features in the h-dimensional features held by itself, according to the first ciphertext polynomial received from the data requester, to obtain a second polynomial; finally, the data provider and the data requester calculate the value of the second polynomial on at least some of the identifications in the second identification set, and the data requester obtains the dimensional feature corresponding to at least some of the identifications, so that the data requester obtains the first data requested by it. In this way, the problem of batch anonymity query can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of degree reduction and evaluation. Among them, by reducing the degree of the polynomial, the degree of the polynomial to be evaluated can be reduced, thereby reducing the communication volume between the two parties when evaluating the polynomial (wherein the communication volume during polynomial evaluation is proportional to the degree of the polynomial), so that the communication volume during batch anonymous query can be reduced, and the query efficiency of batch anonymous query can be improved. Therefore, this solution can protect the data privacy of the data requester in scenarios such as model prediction and reduce the communication volume.

[0027] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0029] Figure 1 The figure is a schematic diagram of a process of batch anonymous query according to an exemplary embodiment.

[0030] Figure 2 The present invention is a flowchart showing a data query method applied to a data provider according to an exemplary embodiment.

[0031] Figure 3 The present invention is a flowchart showing a data query method applied to a data requester according to an exemplary embodiment.

[0032] Figure 4 The invention is a block diagram showing a data query device applied to a data provider according to an exemplary embodiment.

[0033] Figure 5 The invention is a block diagram showing a data query device applied to a data requester according to an exemplary embodiment.

[0034] Figure 6 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0035] Before introducing the specific embodiments of the present disclosure, the terms involved in the present disclosure and the specific application scenarios of multi-party secure computing are first introduced and explained.

[0036] Ring: refers to a set that defines two operations, addition and multiplication, and forms a commutative group (i.e., Abelian group) for addition, a semigroup for multiplication for elements other than 0, and multiplication satisfies the distributive law for addition.

[0037] Homomorphic encryption is a technology that allows calculations to be performed on encrypted data (i.e., ciphertext) and then decrypted to obtain the result. The result of homomorphic encryption is the same as the result of direct calculation on the original data (i.e., plaintext), but the entire calculation process is performed on the encrypted data. There are many encryption algorithms that can be used to implement homomorphic encryption, among which BFV is one of them, and it is called BFV homomorphic encryption at this time.

[0038] Offline: The process of pre-processing data before executing the actual computing task. Generally speaking, the time requirement of the offline process is not strict.

[0039] Online: The process of performing actual computing tasks. It is usually hoped that online computing can be completed as quickly as possible.

[0040] Secure multi-party computing, also known as multi-party secure computing (MPC), can be used by multiple parties to jointly calculate the result of a function without disclosing the input data of each party in the function. The result of the calculation is made public to one or more of the parties.

[0041] Communication volume: Since the data requested by the data requester is located on the data provider, it is necessary to complete the anonymous query through network communication. In the anonymous query, ciphertext data will be transmitted on the network, and the amount of data transmitted is the communication volume.

[0042] In the related technology, an anonymous query method based on one-hot encoding and homomorphic encryption is usually used for batch anonymous query. The amount of data communication involved in this method is proportional to the amount of data requested by the data requester. When the amount of data requested by the data requester is large, it will cause huge communication overhead for batch anonymous query.

[0043] Specifically, if Figure 1 As shown, the data provider has N first data a 0 ,…,a N-1 , each first data contains h features, and the data requester has n index numbers of the data requested by the data provider, and the n index numbers form a set I, that is, the data requester requests n first data from the data provider, that is, {a i :i∈I}, the communication volume involved in batch anonymous query based on one-hot encoding and homomorphic encryption is O(ndlog d (N)+hnd) level, where d is the degree of the polynomial modulus of homomorphic encryption. It can be seen that the communication volume involved in batch anonymous query based on one-hot encoding and homomorphic encryption is proportional to the amount of data n requested by the data requester. When the amount of data n requested by the data requester increases, the communication volume increases linearly. When the amount of data requested by the data requester is large, it will lead to huge communication overhead for batch anonymous query.

[0044] In view of this, the present disclosure provides a data query method, device, medium, electronic device and program product to reduce the communication volume during batch anonymous query.

[0045] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

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

[0047] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0048] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0049] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0050] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0051] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0052] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's information. Thus, the user can autonomously choose whether to provide information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0053] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide information to the electronic device.

[0054] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0055] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0056] Before describing the specific implementation of the present disclosure, the core idea of ​​the data query method in the present disclosure is first introduced.

[0057] In the present disclosure, the participants of the anonymous query include a data provider and a data requester, wherein the data provider holds multiple pieces of first data, each piece of first data includes h-dimensional features, and the data requester can request one or more pieces of first data from the data provider, at which time the data requester holds the index numbers of the first data to be requested from the data provider. h≥1, that is, each piece of first data includes at least one-dimensional features.

[0058] The data query method disclosed in the present invention can be applied to machine learning model prediction scenarios. For example, the data provider is a server, the data requester is a client, and a machine learning model and a vocabulary are deployed on the server, wherein the vocabulary includes embedding vectors corresponding to different word segments, and the vocabulary is a plurality of first data held by the server. In order not to disclose its own information to be predicted, the client can obtain the embedding vector corresponding to each word segment in the information to be predicted through batch anonymous query, and then encrypt the embedding vector corresponding to each word segment in the information to be predicted, and then send the ciphertext to the server to use the machine learning model on the server side for prediction.

[0059] The core idea of ​​the data query method is to convert the batch anonymous query problem into a polynomial evaluation problem. Specifically, the data provider can encode each dimensional feature of at least some of the dimensional features in the h-dimensional features into a polynomial, so that the value of the polynomial on the corresponding identifier in the first identifier set is the value of the dimensional feature corresponding to the identifier; then, the data requester and the data provider securely calculate the values ​​of each polynomial encoded by the data provider on at least some of the identifiers in the second identifier set, so that the data requester obtains at least some of the dimensional features corresponding to each identifier in at least some of the identifiers, that is, the data requester obtains the first data requested by it. Among them, the first identifier set is generated based on the index numbers of multiple first data held by the data provider, and the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the first identifier set and the second identifier set are generated in the same way. The index number of the first data is used to represent the index position of the first data in the multiple first data. The "index number" here can be understood as the position identifier of the current first data in the multiple first data, for example, the row number.

[0060] The degree of each polynomial encoded by the data provider is less than or equal to N-1, where N is the number of first data held by the data provider (that is, the number of identifiers in the first identifier set). The amount of communication during polynomial evaluation is proportional to the degree of the polynomial. Thus, when the number of first data held by the data provider is large, it indicates that the degree of the polynomial is high. If it is directly evaluated, the communication overhead is huge. Therefore, the polynomial evaluation process can be considered to be split into two sub-processes of decreasing the degree (that is, reducing the degree of the polynomial) and evaluating, which are executed sequentially.

[0061] In the order reduction subprocess, the degree of the polynomial is reduced from O(N) level to O(n) level, and in the evaluation subprocess, the O(n) degree polynomial is evaluated on the n identifiers of the second identifier set, where n is the number of first data to be requested from the data provider, that is, the number of identifiers in the second identifier set. The degree of the polynomial can be reduced based on the following theorem:

[0062] Theorem: Let is a domain, x i is the i-th identifier in the second identifier set, is a polynomial group with coefficients on x, x is the independent variable, if Then there is and f(x) are both polynomials in , that is, if a polynomial is equal to another polynomial modg(x), then the two polynomials have the same value on the same label.

[0063] Specifically, first, the data provider converts the polynomial f(x) into the following form:

[0064]

[0065] Among them, f k (x) is the kth polynomial whose degree is less than or equal to n-1.

[0066] Then, the data requester prepares the data h k (x) = x kn modg(x), k = 0, 1, 2, ..., L, Then we have:

[0067]

[0068] That is, polynomial The number of times is less than or equal to 2n-2, It is the polynomial obtained by reducing the degree of the polynomial f(x).

[0069] For example, N=7, n=3, f(x)=a 0 +a 1 x+a 2 x 2 +a 3 x 3 +a 4 x 4 +a 5 x 5 +a 6 x 6 +a 7 x 7 ,but At this point, f(x) can be converted into the following form:

[0070] f(x)=(a 0 +a 1 x+a 2 x 2 )+(a 3 +a 4 x+a 5 x 2 )x 3 +(a 6 +a 7 x+a 8 x 2 )x 6

[0071] Among them, f 0 (x) = a 0 +a 1 x+a 2 x 2 , f 1 (x) = a 3 +a 4 x+a 5 x 2 , f 2 (x) = a 6 +a 7 x+a 8 x 2 , a 8 = 0. At this time, the data requester prepares h 1 (x) = x 3 modg(x),h 2 (x) = x 6 modg(x).

[0072] Figure 2 FIG. 1 is a flow chart showing a data query method applied to a data provider according to an exemplary embodiment. Figure 2 As shown, the data query method applied to the data provider may include S101 and S102.

[0073] In S101, in response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature of at least some of the h-dimensional features, the first polynomial corresponding to the dimensional feature is reduced in degree according to the first ciphertext polynomial to obtain a second polynomial.

[0074] In the present disclosure, the data requester may request to obtain partial dimensional features of the first data, or may request to obtain h-dimensional features of the first data, which is not specifically limited in the present disclosure. In addition, the number of constructed first polynomials is the same as the dimension of the features of the first data requested by the data requester, that is, the number of first polynomials is equal to the dimension of the features included in at least the partial dimensional features. For example, if the data requester requests to obtain h-dimensional features of the first data, then h first polynomials are constructed.

[0075] The first polynomial corresponding to the dimensional feature can be constructed based on the dimensional feature corresponding to each identifier in the first identifier set. The value of the first polynomial on any identifier in the first identifier set is the value of the dimensional feature corresponding to the identifier, that is, the first polynomial is constructed with each identifier in the first identifier set as an independent variable and the dimensional feature as a dependent variable.

[0076] The first identification set is generated based on the index numbers of the plurality of first data, wherein a new identification can be assigned to the index number of each first data held by the data provider to obtain the first identification set. In a possible implementation, a unit root with the index number of the first data held by the data provider as an order can be used as a new identification.

[0077] For example, the index numbers of the plurality of first data held by the data provider are 0, 1, 2, ..., N-1 in sequence, and the first identification set includes ξ 0 , 1 , 2 ,……,ξ N-1 , where ξ j is the jth primitive root of unity, j = 0, 1, 2,…, N-1.

[0078] In addition, the first ciphertext polynomial is generated by the data requester based on the second identifier set. Specifically, the data requester can generate the first ciphertext polynomial based on the second identifier set by performing the following steps (1) and (2).

[0079] Step (1): Generate a second identification set based on the index number of the first data to be requested from the data provider.

[0080] In the present disclosure, a new identifier may be assigned to each index number of the first data to be requested from the data provider to obtain a second identifier set. In a possible implementation, a unit root with the index number of the first data to be requested from the data provider as an order may be used as a new identifier, that is, the second identifier set is generated in the same manner as the first identifier set.

[0081] Step (2): Based on the second identifier set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial.

[0082] For example, the fifth polynomial may be constructed based on the second identification set by the following equation:

[0083] h k (x) = x kn modg(x)k=1,2,…,L

[0084] Among them, there are L fifth polynomials, h k (x) is the kth fifth polynomial, and the data requester obtains N by interacting with the data provider.

[0085] After constructing L fifth polynomials, the data requester can use the locally generated homomorphic encryption public key pk to homomorphically encrypt the L fifth polynomials respectively, obtain L first ciphertext polynomials, and send them to the data provider. This process is the first interaction between the two parties in the batch anonymity query process, and the amount of communication involved is O(N). Among them, the kth first ciphertext polynomial is generated by the data requester for h k (x)(i.e. x kn modg(x)) is homomorphically encrypted.

[0086] return Figure 2 In S102, the data requester and the data requester calculate the value of the second polynomial on at least some of the identifiers in the second identifier set, so that the data requester obtains the dimensional features corresponding to at least some of the identifiers.

[0087] In the present disclosure, after the data provider and the data requester calculate the value of the second polynomial on at least some of the identifiers in the second identifier set, the data requester can obtain the value, that is, the dimensional feature corresponding to at least some of the identifiers in the second identifier set.

[0088] In addition, the data provider and the data requester may calculate the value of the second polynomial on each identifier in the second identifier set, or may calculate the value of the second polynomial on some identifiers in the second identifier set, and the present disclosure does not make any specific limitation on this.

[0089] In the above technical solution, first, the data requester generates a second identification set based on the index number of the first data to be requested from the data provider, generates a first ciphertext polynomial based on the second identification set, and sends the first ciphertext polynomial to the data provider; then, the data provider performs a degree reduction process on the first polynomial corresponding to the h-dimensional feature based on each dimensional feature of at least some of the dimensional features in the h-dimensional features held by itself, according to the first ciphertext polynomial received from the data requester, to obtain a second polynomial; finally, the data provider and the data requester calculate the value of the second polynomial on at least some of the identifications in the second identification set, and the data requester obtains the dimensional feature corresponding to at least some of the identifications, so that the data requester obtains the first data requested by it. In this way, the problem of batch anonymity query can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of degree reduction and evaluation. Among them, by reducing the degree of the polynomial, the degree of the polynomial to be evaluated can be reduced, thereby reducing the communication volume between the two parties when evaluating the polynomial (wherein the communication volume during polynomial evaluation is proportional to the degree of the polynomial), so that the communication volume during batch anonymous query can be reduced, and the query efficiency of batch anonymous query can be improved. Therefore, this solution can protect the data privacy of the data requester in scenarios such as model prediction and reduce the communication volume.

[0090] In a possible implementation, the data provider may construct the first polynomial by interpolation so that the first polynomial Satisfy f(ξ j )=z j , where z j is the jth identifier ξ in the first identifier set j The value of the corresponding feature of this dimension, that is, the value of the first polynomial on the corresponding identifier in the first identifier set is the value of the feature of this dimension corresponding to the identifier, j=0,1,2,…,N-1.

[0091] The data provider may construct the first polynomial by using a variety of interpolation methods. In one embodiment, the data provider may construct the first polynomial by using the Lagrange interpolation method. The complexity of constructing the first polynomial by using this method is O(N 3 ).

[0092] In another embodiment, the data provider may use a fast Fourier transform method to perform polynomial interpolation on the dimensional feature corresponding to the identifier in the first identifier set to obtain a first polynomial corresponding to the dimensional feature. The complexity of constructing the first polynomial in this way is O(NlogN). Therefore, preferably, the fast Fourier transform method may be used to construct the first polynomial to reduce the complexity of polynomial construction, thereby improving the query efficiency of batch anonymization query.

[0093] In the present disclosure, the first polynomial can be constructed online. In order to improve the query efficiency of batch anonymity query, the first polynomial can also be constructed offline (that is, the first polynomial is constructed in advance).

[0094] The following is a detailed description of the specific implementation method of obtaining the second polynomial by reducing the first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial in S101. Specifically, it can be achieved by the following steps (b1) to (b3).

[0095] Step (b1): Convert the first polynomial corresponding to the dimension feature into form.

[0096] Step (b2): k (x) is multiplied by the kth first ciphertext polynomial to obtain the fourth polynomial, where k = 1, 2, …, L.

[0097] Among them, f k (x) is plaintext, and the first ciphertext polynomial is ciphertext. At this time, the plaintext and ciphertext multiplication protocol can be used to multiply the two to obtain the fourth polynomial.

[0098] Step (b3): ​​Substitute each fourth polynomial and f 0 The sum of (x) is determined as the second polynomial.

[0099] Every fourth polynomial and f 0 The sum of (x) is It is equal to That is, we get the second polynomial

[0100] The following is a detailed description of the specific implementation method of calculating the value of the second polynomial on at least some of the identifiers in the second identifier set with the data requester in S102 above, so that the data requester obtains the dimensional features corresponding to at least some of the identifiers. Specifically, it can be achieved through the following steps (c1) to (c3).

[0101] Step (c1): Receive the second ciphertext polynomial sent by the data requester.

[0102] In the present disclosure, the second ciphertext polynomial is obtained by homomorphically encrypting g(x) by the data requester. After generating the second identification set, the data requester can calculate g(x) based on the second identification set, and then homomorphically encrypt g(x) using the homomorphic encryption public key pk to obtain the second ciphertext polynomial, and then send the second ciphertext polynomial to the data provider. This process is the second interaction between the two parties in the batch anonymity query process, and the communication volume involved is O(n).

[0103] The data requester can calculate g(x) online. In order to improve the query efficiency of batch anonymous queries, g(x) can also be calculated offline (i.e., g(x) is calculated in advance).

[0104] Step (c2): Generate a random polynomial.

[0105] In the present disclosure, the degree of the random polynomial is less than or equal to d-n-1, and the random polynomial belongs to

[0106] Step (c3): Mask the second polynomial using the product of a random polynomial and the second ciphertext polynomial to obtain a masked polynomial, and send the masked polynomial to the data requester, so that the data requester decrypts the masked polynomial to obtain a third polynomial, and calculates the value of the third polynomial on at least part of the identification to obtain the feature of the dimension corresponding to at least part of the identification.

[0107] In the present disclosure, after generating a random polynomial, the data provider can use the product of the random polynomial and the second ciphertext polynomial received from the data requester to mask the second polynomial to obtain a masked polynomial, and then send the masked polynomial to the data requester; after receiving the masked polynomial, the data requester can use the homomorphic encryption private key sk to decrypt the masked polynomial to obtain a third polynomial, and then calculate the value of the third polynomial on at least part of the identification to obtain the dimensional feature corresponding to at least part of the identification. This process is the third interaction between the two parties in the batch anonymous query process, and the communication volume involved is O(hn), wherein the communication volume involved in the first interaction between the two parties is O(N), and the communication volume involved in the second interaction is O(n). Therefore, the communication volume involved in the entire batch anonymous query is O(N+hn).

[0108] In one implementation, the difference between the second polynomial and the above product may be determined as a masking polynomial, that is, masking polynomial=second polynomial−random polynomial×second ciphertext polynomial.

[0109] In another implementation, the sum of the second polynomial and the above product may be determined as the masking polynomial, that is, masking polynomial=second polynomial+random polynomial×second ciphertext polynomial.

[0110] In the above implementation, after the data provider reduces the degree of the first polynomial to obtain the second polynomial (a ciphertext polynomial), if the second polynomial is directly sent to the data requester, the data requester can use the local homomorphic encryption private key sk to decrypt the second polynomial and use the decrypted polynomial to evaluate, but this may expose other information in the decrypted polynomial, resulting in data privacy leakage of the data provider. Therefore, the present disclosure uses the product of a random polynomial and the second ciphertext polynomial to mask the second polynomial, thereby avoiding data privacy leakage of the data provider.

[0111] Since the second ciphertext polynomial is the ciphertext of g(x), where g(x) has the identifiers in the second identifier set as roots, the plaintext corresponding to the product of the random polynomial and the second ciphertext polynomial also has the identifiers in the second identifier set as roots. As a result, the value of the third polynomial on at least some of the identifiers can be the same as the value of the second polynomial on at least some of the identifiers, thereby avoiding the data privacy leakage of the data provider while ensuring the accuracy of the polynomial evaluation.

[0112] Figure 3 FIG. 1 is a flow chart showing a data query method applied to a data requester according to an exemplary embodiment. Figure 3 As shown, the data query method applied to the data requester may include S201 to S204.

[0113] In S201, a second identification set is generated based on the index number of the first data to be requested from the data provider.

[0114] In S202, based on the second identifier set, a fifth polynomial is constructed, and the fifth polynomial is homomorphically encrypted to obtain a first ciphertext polynomial.

[0115] In S203, the first ciphertext polynomial is sent to the data provider, so that the data provider can reduce the order of the first polynomial corresponding to each dimensional feature of at least some of the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial.

[0116] Among them, the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in the first identifier set, and the first identifier set is generated by the data provider based on the index numbers of multiple first data. The first identifier set and the second identifier set are generated in the same way.

[0117] In S204, the value of the second polynomial on at least some of the identifiers in the second identifier set is calculated with the data provider to obtain the dimensional features corresponding to at least some of the identifiers.

[0118] In the above technical solution, first, the data requester generates a second identification set based on the index number of the first data to be requested from the data provider, generates a first ciphertext polynomial based on the second identification set, and sends the first ciphertext polynomial to the data provider; then, the data provider performs a degree reduction process on the first polynomial corresponding to the h-dimensional feature based on each dimensional feature of at least some of the dimensional features in the h-dimensional features held by itself, according to the first ciphertext polynomial received from the data requester, to obtain a second polynomial; finally, the data provider and the data requester calculate the value of the second polynomial on at least some of the identifications in the second identification set, and the data requester obtains the dimensional feature corresponding to at least some of the identifications, so that the data requester obtains the first data requested by it. In this way, the problem of batch anonymity query can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of degree reduction and evaluation. Among them, by reducing the degree of the polynomial, the degree of the polynomial to be evaluated can be reduced, thereby reducing the communication volume between the two parties when evaluating the polynomial (wherein the communication volume during polynomial evaluation is proportional to the degree of the polynomial), so that the communication volume during batch anonymous query can be reduced, and the query efficiency of batch anonymous query can be improved. Therefore, this solution can protect the data privacy of the data requester in scenarios such as model prediction and reduce the communication volume.

[0119] In a possible implementation, calculating with the data provider the value of the second polynomial on at least some of the identifiers in the second identifier set to obtain the dimensional features corresponding to at least some of the identifiers includes:

[0120] Perform homomorphic encryption on g(x) to obtain the second ciphertext polynomial, where x i is the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider;

[0121] Sending the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the second polynomial to obtain a masked polynomial, and sending the masked polynomial to the data requester;

[0122] In response to receiving the masking polynomial sent by the data provider, decrypting the masking polynomial to obtain a third polynomial;

[0123] The value of the third polynomial on at least part of the identification is calculated to obtain the feature of the dimension corresponding to at least part of the identification.

[0124] In a possible implementation, constructing a fifth polynomial based on the second identifier set includes:

[0125] Based on the second identity set, the fifth polynomial is constructed by the following formula:

[0126] h k (x) = x kn modg(x)

[0127] Among them, there are L fifth polynomials, h k (x) is the kth fifth polynomial, k = 1, 2, ..., L, N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0128] The specific implementation of each step in the data query method applied to the data requester according to the embodiment of the present disclosure has been described in detail in the data query method applied to the data provider according to the embodiment of the present disclosure, and will not be repeated here.

[0129] Figure 4 is a block diagram of a data query device applied to a data provider according to an exemplary embodiment. The data provider holds a plurality of first data, and the first data includes h-dimensional features, h≥1, such as Figure 4 As shown, the data query device 300 applied to the data provider includes:

[0130] A reduction module 301 is used for, in response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, reducing the first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set;

[0131] The first evaluation module 302 is used to calculate, with the data requester, the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional feature corresponding to the at least part of the identifiers.

[0132] In the above technical solution, first, the data requester generates a second identification set based on the index number of the first data to be requested from the data provider, generates a first ciphertext polynomial based on the second identification set, and sends the first ciphertext polynomial to the data provider; then, the data provider performs a degree reduction process on the first polynomial corresponding to the h-dimensional feature based on each dimensional feature of at least some of the dimensional features in the h-dimensional features held by itself, according to the first ciphertext polynomial received from the data requester, to obtain a second polynomial; finally, the data provider and the data requester calculate the value of the second polynomial on at least some of the identifications in the second identification set, and the data requester obtains the dimensional feature corresponding to at least some of the identifications, so that the data requester obtains the first data requested by it. In this way, the problem of batch anonymity query can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of degree reduction and evaluation. Among them, by reducing the degree of the polynomial, the degree of the polynomial to be evaluated can be reduced, thereby reducing the communication volume between the two parties when evaluating the polynomial (wherein the communication volume during polynomial evaluation is proportional to the degree of the polynomial), so that the communication volume during batch anonymous query can be reduced, and the query efficiency of batch anonymous query can be improved. Therefore, this solution can protect the data privacy of the data requester in scenarios such as model prediction and reduce the communication volume.

[0133] Optionally, the first evaluation module 302 includes:

[0134] A receiving submodule is used to receive a second ciphertext polynomial sent by the data requester, wherein the second ciphertext polynomial is obtained by the data requester performing homomorphic encryption on g(x), x i is the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider;

[0135] A generating submodule, used to generate a random polynomial, wherein the degree of the random polynomial is less than or equal to d-n-1, where d is the degree of the polynomial module of the homomorphic encryption;

[0136] The masking processing submodule is used to mask the second polynomial using the product of the random polynomial and the second ciphertext polynomial to obtain a masked polynomial, and send the masked polynomial to the data requester so that the data requester can decrypt the masked polynomial to obtain a third polynomial, and calculate the value of the third polynomial on the at least partial identifier to obtain the dimensional feature corresponding to the at least partial identifier.

[0137] Optionally, the masking processing submodule includes:

[0138] a first determining submodule, configured to determine a difference between the second polynomial and the product as the masking polynomial; or

[0139] The second determining submodule is configured to determine the sum of the second polynomial and the product as the masking polynomial.

[0140] Optionally, the number of the first ciphertext polynomials is L, and the kth first ciphertext polynomial is generated by the data requesting party for x kn modg(x) is homomorphically encrypted to obtain k=1,2,…,L, where N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable;

[0141] The downgrade module 301 includes:

[0142] The conversion submodule is used to convert the first polynomial corresponding to the dimension feature into The form, where f k (x) is the kth polynomial;

[0143] The multiplication submodule is used to convert f k (x) multiplying the kth first ciphertext polynomial to obtain a fourth polynomial, where k = 1, 2, ..., L;

[0144] The third determining submodule is used to convert each of the fourth polynomials and f 0 The sum of (x) is determined as the second polynomial.

[0145] Optionally, the data query device 300 applied to the data provider further includes:

[0146] The interpolation module is used to perform polynomial interpolation on each dimensional feature of the at least partial dimensional features by using a fast Fourier transform method on the dimensional feature corresponding to the identifier in the first identifier set to obtain a first polynomial corresponding to the dimensional feature.

[0147] Figure 5 FIG. 1 is a block diagram showing a data query device applied to a data requester according to an exemplary embodiment. Figure 5 As shown, the data query device 400 applied to the data requester includes:

[0148] A generating module 401 is used to generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1;

[0149] A construction module 402 is used to construct a fifth polynomial based on the second identifier set, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial;

[0150] A sending module 403 is used to send the first ciphertext polynomial to the data provider, so that the data provider can reduce the order of the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated by the data provider based on the index number of the multiple first data, and the first identifier set is generated in the same manner as the second identifier set;

[0151] The second evaluation module 404 is used to calculate, with the data provider, the value of the second polynomial on at least part of the identifiers in the second identifier set, to obtain the dimensional features corresponding to the at least part of the identifiers.

[0152] In the above technical solution, first, the data requester generates a second identification set based on the index number of the first data to be requested from the data provider, generates a first ciphertext polynomial based on the second identification set, and sends the first ciphertext polynomial to the data provider; then, the data provider performs a degree reduction process on the first polynomial corresponding to the h-dimensional feature based on each dimensional feature of at least some of the dimensional features in the h-dimensional features held by itself, according to the first ciphertext polynomial received from the data requester, to obtain a second polynomial; finally, the data provider and the data requester calculate the value of the second polynomial on at least some of the identifications in the second identification set, and the data requester obtains the dimensional feature corresponding to at least some of the identifications, so that the data requester obtains the first data requested by it. In this way, the problem of batch anonymity query can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of degree reduction and evaluation. Among them, by reducing the degree of the polynomial, the degree of the polynomial to be evaluated can be reduced, thereby reducing the communication volume between the two parties when evaluating the polynomial (wherein the communication volume during polynomial evaluation is proportional to the degree of the polynomial), so that the communication volume during batch anonymous query can be reduced, and the query efficiency of batch anonymous query can be improved. Therefore, this solution can protect the data privacy of the data requester in scenarios such as model prediction and reduce the communication volume.

[0153] Optionally, the second evaluation module 404 includes:

[0154] The encryption submodule is used to perform homomorphic encryption on g(x) to obtain the second ciphertext polynomial, where x iis the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider;

[0155] a sending submodule, configured to send the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the second polynomial to obtain a masked polynomial, and sends the masked polynomial to the data requester;

[0156] a decryption submodule, configured to, in response to receiving the masking polynomial sent by the data provider, decrypt the masking polynomial to obtain a third polynomial;

[0157] The calculation submodule is used to calculate the value of the third polynomial on the at least part of the identification to obtain the dimensional feature corresponding to the at least part of the identification.

[0158] Optionally, the construction module 402 is used to construct a fifth polynomial based on the second identifier set by using the following formula:

[0159] h k (x) = x kn modg(x)

[0160] Among them, the fifth polynomial is L, h k (x) is the kth fifth polynomial, k = 1, 2, ..., L, N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0161] The present disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the data query method applied to a data provider or the steps of the data query method applied to a data requester provided by the present disclosure.

[0162] The present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the data query method applied to a data provider or the steps of the data query method applied to a data requester provided by the present disclosure.

[0163] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device (terminal device or server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0164] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0165] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0166] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0167] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0168] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0169] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0170] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature in at least some of the dimensional features in the h-dimensional features, according to the first ciphertext polynomial, the first polynomial corresponding to the dimensional feature is reduced in degree to obtain a second polynomial, wherein the data provider holds multiple first data, the first data includes h-dimensional features, h≥1, the first polynomial is constructed based on the dimensional features corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set; and the data requester calculates the value of the second polynomial on at least some of the identifiers in the second identifier set, so that the data requester obtains the dimensional features corresponding to the at least some of the identifiers.

[0171] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: generates a second identification set based on the index number of the first data to be requested from the data provider, wherein the data provider holds multiple first data, and the first data includes h-dimensional features, h≥1; constructs a fifth polynomial based on the second identification set, and homomorphically encrypts the fifth polynomial to obtain a first ciphertext polynomial; sends the first ciphertext polynomial to the data provider, so that the data provider reduces the order of the first polynomial corresponding to each dimensional feature of at least some of the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in the first identification set, the first identification set is generated by the data provider based on the index number of the multiple first data, and the first identification set is generated in the same manner as the second identification set; calculates with the data provider the value of the second polynomial on at least some of the identifiers in the second identification set to obtain the dimensional feature corresponding to the at least some of the identifiers.

[0172] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0173] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0174] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the module does not limit the module itself in some cases. For example, the generation module may also be described as "a module for generating a second identification set based on the index number of the first data to be requested from the data provider".

[0175] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

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

[0177] According to one or more embodiments of the present disclosure, Example 1 provides a data query method, which is applied to a data provider, wherein the data provider holds multiple first data, the first data includes h-dimensional features, h≥1, and the method includes:

[0178] In response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, according to the first ciphertext polynomial, a first polynomial corresponding to the dimensional feature is reduced in degree to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set;

[0179] The data requester calculates the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional features corresponding to the at least part of the identifiers.

[0180] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein calculating with the data requester the value of the second polynomial on at least part of the identifiers in the second identifier set so that the data requester obtains the dimensional feature corresponding to the at least part of the identifiers includes:

[0181] receiving a second ciphertext polynomial sent by the data requester, wherein the second ciphertext polynomial is obtained by the data requester performing homomorphic encryption on g(x), x iis the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider;

[0182] Generate a random polynomial, wherein the degree of the random polynomial is less than or equal to d-n-1, where d is the degree of the polynomial modulus of the homomorphic encryption;

[0183] The second polynomial is masked by using the product of the random polynomial and the second ciphertext polynomial to obtain a masked polynomial, and the masked polynomial is sent to the data requester so that the data requester decrypts the masked polynomial to obtain a third polynomial, and calculates the value of the third polynomial on the at least partial identifier to obtain the dimensional feature corresponding to the at least partial identifier.

[0184] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the step of masking the second polynomial using the product of the random polynomial and the second ciphertext polynomial to obtain the masked polynomial includes:

[0185] determining a difference between the second polynomial and the product as the masking polynomial; or

[0186] A sum of the second polynomial and the product is determined as the masking polynomial.

[0187] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the first ciphertext polynomials are L, and the kth first ciphertext polynomial is generated by the data requester for x kn modg(x) is homomorphically encrypted to obtain k=1,2,…,L, where N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable;

[0188] The step of reducing the degree of the first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial includes:

[0189] Convert the first polynomial corresponding to the dimension feature into The form, where f k (x) is the kth polynomial;

[0190] f k (x) multiplying the kth first ciphertext polynomial to obtain a fourth polynomial, where k = 1, 2, ..., L;

[0191] Each of the fourth polynomials and f 0 The sum of (x) is determined as the second polynomial.

[0192] According to one or more embodiments of the present disclosure, Example 5 provides the method of any one of Examples 1-4, wherein the method further includes:

[0193] For each dimensional feature of the at least partial dimensional features, a fast Fourier transform method is used to perform polynomial interpolation on the dimensional feature corresponding to the identifier in the first identifier set to obtain a first polynomial corresponding to the dimensional feature.

[0194] According to one or more embodiments of the present disclosure, Example 6 provides a data query method, which is applied to a data requester, and the method includes:

[0195] Generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1;

[0196] Based on the second identifier set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial;

[0197] The first ciphertext polynomial is sent to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial, so as to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner;

[0198] Calculate, with the data provider, the value of the second polynomial on at least some of the identifiers in the second identifier set to obtain features of the dimension corresponding to the at least some of the identifiers.

[0199] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein calculating with the data provider the value of the second polynomial on at least part of the identifiers in the second identifier set to obtain the dimensional feature corresponding to the at least part of the identifiers includes:

[0200] Perform homomorphic encryption on g(x) to obtain the second ciphertext polynomial, where x i is the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider;

[0201] Sending the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the second polynomial to obtain a masked polynomial, and sending the masked polynomial to the data requester;

[0202] In response to receiving the masking polynomial sent by the data provider, decrypting the masking polynomial to obtain a third polynomial;

[0203] The value of the third polynomial on the at least partial identifier is calculated to obtain the feature of the dimension corresponding to the at least partial identifier.

[0204] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 6 or 7, wherein constructing a fifth polynomial based on the second identifier set includes:

[0205] Based on the second identification set, a fifth polynomial is constructed by the following formula:

[0206] h k (x) = x kn modg(x)

[0207] Among them, the fifth polynomial is L, h k (x) is the kth fifth polynomial, k = 1, 2, ..., L, N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0208] According to one or more embodiments of the present disclosure, Example 9 provides a data query device, which is applied to a data provider, wherein the data provider holds a plurality of first data, the first data includes h-dimensional features, h≥1, and the device includes:

[0209] A reduction module, configured to, in response to receiving a first ciphertext polynomial sent by a data requester, perform, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, reduction processing on a first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set;

[0210] The first evaluation module is used to calculate, with the data requester, the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional feature corresponding to the at least part of the identifiers.

[0211] According to one or more embodiments of the present disclosure, Example 10 provides a data query device, which is applied to a data requester, and the device includes:

[0212] A generating module, configured to generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1;

[0213] A construction module, used to construct a fifth polynomial based on the second identifier set, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial;

[0214] A sending module, used for sending the first ciphertext polynomial to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner;

[0215] The second evaluation module is used to calculate, together with the data provider, the value of the second polynomial on at least part of the identifiers in the second identifier set, and obtain the dimensional features corresponding to the at least part of the identifiers.

[0216] According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-8 when executed by a processing device.

[0217] According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, including:

[0218] a storage device having a computer program stored thereon;

[0219] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-8.

[0220] According to one or more embodiments of the present disclosure, Example 13 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-8 when executed by a processor.

[0221] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0222] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0223] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A data query method, characterized in that: Applied to a data provider, wherein the data provider holds a plurality of first data, the first data includes h-dimensional features, h≥1, and the method includes: In response to receiving a first ciphertext polynomial sent by a data requester, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, according to the first ciphertext polynomial, a first polynomial corresponding to the dimensional feature is reduced in degree to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set; The data requester calculates the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional features corresponding to the at least part of the identifiers.

2. The method according to claim 1, characterized in that The calculating, with the data requester, the value of the second polynomial on at least some of the identifiers in the second identifier set so that the data requester obtains the dimensional feature corresponding to the at least some of the identifiers, includes: receiving a second ciphertext polynomial sent by the data requester, wherein the second ciphertext polynomial is obtained by the data requester performing homomorphic encryption on g(x), x i is the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider; Generate a random polynomial, wherein the degree of the random polynomial is less than or equal to d-n-1, where d is the degree of the polynomial modulus of the homomorphic encryption; The second polynomial is masked by using the product of the random polynomial and the second ciphertext polynomial to obtain a masked polynomial, and the masked polynomial is sent to the data requester so that the data requester decrypts the masked polynomial to obtain a third polynomial, and calculates the value of the third polynomial on the at least partial identifier to obtain the dimensional feature corresponding to the at least partial identifier.

3. The method according to claim 2, characterized in that The step of masking the second polynomial by multiplying the random polynomial by the second ciphertext polynomial to obtain a masked polynomial includes: determining a difference between the second polynomial and the product as the masking polynomial; or A sum of the second polynomial and the product is determined as the masking polynomial.

4. The method according to claim 1, characterized in that: The number of the first ciphertext polynomials is L, and the kth first ciphertext polynomial is generated by the data requesting party for x kn modg(x) is homomorphically encrypted to obtain k=1,2,…,L, where N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable; The step of reducing the first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial includes: Convert the first polynomial corresponding to the dimension feature into The form, where f k (x) is the kth polynomial; f k (x) multiplying the kth first ciphertext polynomial to obtain a fourth polynomial, where k = 1, 2, ..., L; The sum of each of the fourth polynomials and f0(x) is determined as the second polynomial.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: For each dimensional feature of the at least partial dimensional features, a fast Fourier transform method is used to perform polynomial interpolation on the dimensional feature corresponding to the identifier in the first identifier set to obtain a first polynomial corresponding to the dimensional feature.

6. A data query method, characterized in that: Applied to a data requester, the method comprises: Generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1; Based on the second identifier set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial; The first ciphertext polynomial is sent to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial, so as to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner; Calculate, with the data provider, the value of the second polynomial on at least some of the identifiers in the second identifier set to obtain features of the dimension corresponding to the at least some of the identifiers.

7. The method according to claim 6, characterized in that The calculating, with the data provider, the value of the second polynomial on at least part of the identifiers in the second identifier set to obtain the dimensional features corresponding to the at least part of the identifiers includes: Perform homomorphic encryption on g(x) to obtain the second ciphertext polynomial, where x i is the i-th identifier in the second identifier set, x is an independent variable, and n is the number of first data to be requested from the data provider; Sending the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the second polynomial to obtain a masked polynomial, and sending the masked polynomial to the data requester; In response to receiving the masking polynomial sent by the data provider, decrypting the masking polynomial to obtain a third polynomial; The value of the third polynomial on the at least partial identifier is calculated to obtain the feature of the dimension corresponding to the at least partial identifier.

8. The method according to claim 6 or 7, characterized in that: The constructing a fifth polynomial based on the second identifier set comprises: Based on the second identification set, a fifth polynomial is constructed by the following formula: h k (x)=x kn modg(x) Among them, the fifth polynomial is L, h k (x) is the kth fifth polynomial, k = 1, 2, ..., L, N is the number of first data items held by the data provider, n is the number of first data items to be requested from the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

9. A data query device, characterized in that: Applied to a data provider, wherein the data provider holds a plurality of first data, the first data includes h-dimensional features, h≥1, and the device includes: A reduction module, configured to, in response to receiving a first ciphertext polynomial sent by a data requester, perform, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, reduction processing on a first polynomial corresponding to the dimensional feature according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the first ciphertext polynomial is generated by the data requester based on the second identifier set, the second identifier set is generated by the data requester based on the index number of the first data to be requested from the data provider, and the second identifier set is generated in the same manner as the first identifier set; The first evaluation module is used to calculate, with the data requester, the value of the second polynomial on at least part of the identifiers in the second identifier set, so that the data requester obtains the dimensional feature corresponding to the at least part of the identifiers.

10. A data query device, characterized in that: Applied to a data requester, the device comprises: A generating module, configured to generate a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds a plurality of first data, and the first data includes h-dimensional features, where h≥1; A construction module, used to construct a fifth polynomial based on the second identifier set, and perform homomorphic encryption on the fifth polynomial to obtain a first ciphertext polynomial; A sending module, used for sending the first ciphertext polynomial to the data provider, so that the data provider performs a degree reduction process on the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the first ciphertext polynomial to obtain a second polynomial, wherein the first polynomial corresponding to the dimensional feature is constructed by the data provider based on the dimensional feature corresponding to each identifier in a first identifier set, the first identifier set is generated by the data provider based on the index numbers of the multiple first data, and the first identifier set and the second identifier set are generated in the same manner; The second evaluation module is used to calculate, together with the data provider, the value of the second polynomial on at least part of the identifiers in the second identifier set, and obtain the dimensional features corresponding to the at least part of the identifiers.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

12. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.