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

By converting the batch anonymous query sharding problem into polynomial evaluation problem, and using homomorphic polynomial interpolation and difference construction, the problem of large communication overhead in the existing technology is solved, and efficient and privacy-protected data query is achieved.

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

Patent Information

Application Number
CN202411679029.7
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 anonymous query sharding technology causes huge communication overhead when the amount of data requests is large, and how to reduce the traffic has become an urgent problem.

Method used

By converting the batch anonymous query sharding problem to a polynomial evaluation problem, and splitting the polynomial evaluation process into two subprocesses, homomorphic polynomial interpolation and difference construction is used to avoid direct transmission of large amounts of data.

Benefits of technology

It reduces the traffic volume of batch anonymous query shards, improves query efficiency, and protects the data privacy of data requesters and data providers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576978A_ABST
    Figure CN119576978A_ABST
Patent Text Reader

Abstract

The invention discloses a data query method and device, a medium, electronic equipment and a program product. The method of the data provider comprises the following steps: constructing an interpolation polynomial ciphertext based on a base polynomial ciphertext sent by a data requester and n random numbers generated locally; for each dimension feature in at least part of dimension features in the h dimension features, determining the difference between a first polynomial corresponding to the dimension feature and an interpolation polynomial ciphertext as a first ciphertext polynomial, and determining n random numbers as a first fragment of the dimension feature corresponding to a second identification set; and calculating the value of the first ciphertext polynomial on the second identification set with the data requester, so that the data requester obtains a second fragment of the dimension feature corresponding to the second identification set. The problem of batch hidden trace query fragmentation can be ingeniously converted into a polynomial evaluation problem, and the polynomial evaluation process is split into interpolation and evaluation. According to the scheme, the data privacy of the data requester and the data provider can be protected at the same time under the scenes of model prediction and the like, 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 actual applications, the Private Information Retrieval to Share (PIR to Share) technology allows the data requester to query the data provider's data shards without revealing the data requester's query content and without leaking the data provider's data privacy. The batch PIR to Share technology allows the data requester to obtain multiple query result shards in a single anonymous query shard, improving query efficiency. Therefore, the batch PIR to Share 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 sharding. 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 sharding. Therefore, how to reduce the communication volume of batch anonymous query sharding 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 multiple first data, and the first data includes h-dimensional features, h≥1. The method includes: in response to a received base polynomial ciphertext sent by a data requester, based on the base polynomial ciphertext and n locally generated random numbers, constructing an interpolation polynomial ciphertext, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; for each dimensional feature of at least some of the dimensional features in the h-dimensional features, comparing the first polynomial corresponding to the dimensional feature with the interpolation polynomial ciphertext; The difference of the term ciphertexts is determined as a first ciphertext polynomial, and the n random numbers are determined as a first slice of the dimensional feature corresponding to a second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers 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 value of the first ciphertext polynomial on the second identifier set is calculated with the data requester, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set.

[0006] In a second aspect, the present disclosure provides a data query method, which is applied to a data requester, and the method includes: generating a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds multiple first data, and the first data includes h-dimensional features, h≥1; generating a second base polynomial based on n different second data, and homomorphically encrypting the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; sending the base polynomial ciphertext to the data provider, so that the data provider can obtain the base polynomial ciphertext for the h-dimensional features; For each dimensional feature of at least some of the dimensional features in the feature, a first ciphertext polynomial is generated according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same way as the second identifier set; the value of the first ciphertext polynomial on the second identifier set is calculated with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

[0007] In a third aspect, the present disclosure provides a data query device, 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 device includes: a first construction module, which is used to respond to a base polynomial ciphertext received from a data requester, and to construct an interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; a determination module, which is used to compare, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, the first polynomial corresponding to the dimensional feature with the first polynomial corresponding to the dimensional feature; The difference of the interpolation polynomial ciphertext is determined as a first ciphertext polynomial, and the n random numbers are determined as a first slice of the dimensional feature corresponding to a second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers 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; a first evaluation module is used to calculate the value of the first ciphertext polynomial on the second identifier set with the data requester, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set.

[0008] In a fourth aspect, the present disclosure provides a data query device, which is applied to a data requester, and the device includes: a first generation module, which 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 multiple first data, and the first data includes h-dimensional features, h≥1; a second generation module, which is used to generate a second base polynomial based on n different second data, and homomorphically encrypt the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; a sending module, which is used to send the base polynomial ciphertext to the data provider, so that the data provider can receive the base polynomial ciphertext. The party generates a first ciphertext polynomial for each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; a second evaluation module is used to calculate the value of the first ciphertext polynomial on the second identifier set with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

[0009] 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.

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

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

[0012] 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.

[0013] 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.

[0014] In the above technical solution, first, the data requester generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial, and sends the base polynomial ciphertext obtained by homomorphic encryption to the data provider; then, the data provider constructs an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated by itself; next, the data provider determines the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature in at least some of the dimensional features in the h-dimensional features, and determines the n random numbers as the first shard of the dimensional feature corresponding to the second identification set; finally, the data provider and the data requester calculate the value of the first ciphertext polynomial on the second identification set, and the data requester obtains the second shard of the dimensional feature corresponding to the second identification set, so that the data provider and the data requester respectively obtain a shard of the first data requested by the data provider. In this way, the problem of batch anonymous query sharding can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of interpolation and evaluation. Among them, through polynomial interpolation, the value of the interpolation polynomial ciphertext on n different second data can be made into n random numbers. In this way, the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding. Through homomorphic polynomial interpolation and difference construction, the direct transmission of a large amount of data can be avoided, thereby reducing the communication volume of batch anonymous query sharding and improving the efficiency of batch anonymous query sharding. In addition, homomorphic encryption allows calculations to be performed directly on encrypted data. In this way, the data provider does not need to decrypt the base polynomial ciphertext to perform homomorphic polynomial interpolation, which reduces the plaintext transmission of data and further reduces the communication volume of batch anonymous query sharding. Therefore, through this scheme, the data privacy of the data requester and the data provider can be protected at the same time in scenarios such as model prediction, and the communication volume can be reduced.

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

[0016] 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:

[0017] Figure 1 The present invention is a schematic diagram of a process of batch anonymous query sharding according to an exemplary embodiment.

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

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

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

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

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

[0023] 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.

[0024] Secret Sharing is also called secret splitting or secret sharing. Its basic principle is to split secrets (such as keys, private data, etc.) into multiple shares (Shares) and give them to different data parties for safekeeping. Only when parties exceeding a threshold number merge their shards can the secret be restored; Shares obtained from parties less than the threshold number cannot restore any information of the secret. In multi-party secure computing, the threshold number is usually the same as the number of participants, and the shares into which the secret is split can also be called shards. Among them, private data is the data that you do not want other parties to know in multi-party secure computing.

[0025] 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.

[0026] Basis Polynomial is a concept in polynomial theory, which is usually used in polynomial interpolation and approximation.

[0027] 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.

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

[0029] 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.

[0030] 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.

[0031] In the related technology, an anonymous query method based on one-hot encoding and homomorphic encryption is usually used for batch anonymous query sharding. 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 sharding.

[0032] Specifically, if Figure 1 As shown, the data provider has N first data a0,…,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 pieces of the first data from the data provider, that is, {a i1 :i∈I}, at the same time, the data provider holds another fragment of the n first data requested by the data requester, that is, {a i0 :i∈I}. The communication volume involved in batch anonymous query sharding based on one-hot encoding and homomorphic encryption is O(ndlog d (N)+hnd) level, where d is the degree of the polynomial module of homomorphic encryption. It can be seen that the communication volume involved in batch anonymous query sharding based on the anonymous query method 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 sharding.

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

[0034] 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.

[0035] 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.

[0036] 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.

[0037] 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.

[0038] 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".

[0039] 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.

[0040] 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.

[0041] 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 personal information. Thus, the user can autonomously choose whether to provide personal 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.

[0042] 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 personal information to the electronic device.

[0043] 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.

[0044] 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.

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

[0046] In the present disclosure, the participants of the anonymous query sharding include a data provider and a data requester, wherein the data provider holds multiple first data, each of which includes h-dimensional features, and the data requester can request one or more 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. Wherein, h≥1, that is, each of the first data includes at least one-dimensional features.

[0047] 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 slices of the embedding vectors corresponding to each word segment in the information to be predicted by batch anonymous query of the word segment, and at the same time, the server obtains another slice of the embedding vector corresponding to each word segment in the information to be predicted. After that, both parties use the machine learning model on the server side to make predictions based on the slices they hold.

[0048] The core idea of ​​the data query method corresponding to the anonymous query sharding is to convert the problem of batch anonymous query sharding 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 as a first polynomial, so that the value of the first polynomial on the corresponding identifier in the first identifier set is the value of the dimensional feature corresponding to the identifier; at the same time, the data requester generates a second base polynomial based on n different local second data, and homomorphically encrypts the second base polynomial to obtain the base polynomial ciphertext; thereafter, the data provider performs homomorphic polynomial interpolation based on the base polynomial ciphertext and n random numbers generated locally, so that the value of the interpolation polynomial on n different second data is n random numbers to obtain the interpolation polynomial ciphertext. ; Next, the data provider determines the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature of at least some of the dimensional features obtained by encoding, and determines the n random numbers generated locally as a slice of the dimensional feature corresponding to the second identification set; Finally, the data requester and the data provider calculate the value of the first ciphertext polynomial on the second identification set, so that the data requester obtains another slice of the dimensional feature corresponding to the second identification set, so that the data provider can obtain the slice of the first data requested by the data requester, and the data requester obtains another slice of the first data requested by it. Among them, the first identification set is generated based on the index numbers of multiple first data held by the data provider, and the second identification 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 identification set and the second identification 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.

[0049] The degree of each first 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 evaluation process of the polynomial can be considered to be split into three sub-processes: degree reduction (that is, reducing the degree of the polynomial), homomorphic polynomial interpolation, and evaluation.

[0050] In the order reduction subprocess, the degree of the first polynomial obtained by encoding is reduced from the O(N) level to the O(n) level. In the evaluation subprocess, the O(n)-order polynomial is evaluated on the n identifiers of the second identifier set, where n is the number of first data to be requested by the data requester 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:

[0051] 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.

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

[0053]

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

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

[0056]

[0057] 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).

[0058] For example, N=7, n=3, f(x)=a0+a1x+a2x 2 +a3x 3 +a4x 4 +a5x 5 +a6x 6 +a7x 7 ,but At this point, f(x) can be converted into the following form:

[0059] f(x)=(a0+a1x+a2x 2 )+(a3+a4x+a5x 2 )x 3 +(a6+a7x+a8x 2 )x 6

[0060] Where f0(x)=a0+a1x+a2x 2 , f1(x)=a3+a4x+a5x 2 , f2(x)=a6+a7x+a8x 2 , a8 = 0. At this time, the data requester prepares h1(x) = x 3 modg(x),h2(x)=x 6 modg(x).

[0061] 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 to S103.

[0062] In S101 , in response to the received base polynomial ciphertext sent by the data requester, an interpolation polynomial ciphertext is constructed based on the base polynomial ciphertext and n random numbers generated locally.

[0063] In the present disclosure, a base polynomial ciphertext is generated by a data requester based on n different second data.

[0064] When requesting first data from a data provider, a data requester may generate a second identification set based on the index number of the first data to be requested from the data provider, and at the same time, generate a second base polynomial based on n different second data, and use a homomorphic encryption public key pk to homomorphically encrypt the second base polynomial to obtain a base polynomial ciphertext, and send the base polynomial ciphertext to the data provider; the data provider may locally generate n random numbers, and after receiving the base polynomial ciphertext sent by the data requester, perform homomorphic polynomial interpolation based on the base polynomial ciphertext and the n locally generated random numbers to construct an interpolation polynomial ciphertext, wherein the values ​​of the interpolation polynomial on the n different second data are n random numbers.

[0065] Among them, n random numbers and n different second data all belong to in, is a finite field containing p elements. In addition, the n different second data may be randomly generated by the data requester.

[0066] In S102, for each dimensional feature of at least some of the h-dimensional features, the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext is determined as the first ciphertext polynomial, and n random numbers are determined as the first fragment of the dimensional feature corresponding to the second identifier set.

[0067] 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 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, h first polynomials are constructed.

[0068] The first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, and 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 the identifier in the first identifier set as the independent variable and the dimensional feature as the dependent variable, and the degree of the first polynomial is less than or equal to the number of identifiers in the first identifier set, wherein the first identifier set is generated based on the index numbers of multiple first data.

[0069] 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.

[0070] 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.

[0071] In addition, the second identification set is generated by the data requester based on the index number of the first data to be requested from the data provider. Specifically, the data requester can assign new identifications to the index number of each first data to be requested from the data provider to obtain the second identification set. In a possible implementation, the unit root with the index number of the first data to be requested from the data provider as the order can be used as the new identification, that is, the second identification set is generated in the same way as the first identification set.

[0072] In S103, the value of the first ciphertext polynomial on the second identifier set is calculated with the data requesting party, so that the data requesting party obtains the second fragment of the dimensional feature corresponding to the second identifier set.

[0073] In the present disclosure, the values ​​of each first polynomial on the second identification set are at least part of the dimensional features corresponding to the second identification set. In order to avoid data leakage of the data provider, the present disclosure distributes at least part of the dimensional features corresponding to the second identification set in the form of slices to the data provider and the data requester.

[0074] The data provider performs homomorphic polynomial interpolation based on the base polynomial ciphertext and the n random numbers generated locally, so that the value of the interpolation polynomial on n different second data is n random numbers. Therefore, the value of the first polynomial corresponding to the dimensional feature on the second identification set is decomposed into the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and n random numbers. Therefore, the value of the first ciphertext polynomial on the second identification set and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding.

[0075] In the above technical solution, first, the data requester generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial, and sends the base polynomial ciphertext obtained by homomorphic encryption to the data provider; then, the data provider constructs an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated by itself; next, the data provider determines the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature in at least some of the dimensional features in the h-dimensional features, and determines the n random numbers as the first shard of the dimensional feature corresponding to the second identification set; finally, the data provider and the data requester calculate the value of the first ciphertext polynomial on the second identification set, and the data requester obtains the second shard of the dimensional feature corresponding to the second identification set, so that the data provider and the data requester respectively obtain a shard of the first data requested by the data provider. In this way, the problem of batch anonymous query sharding can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of interpolation and evaluation. Among them, through polynomial interpolation, the value of the interpolation polynomial ciphertext on n different second data can be made into n random numbers. In this way, the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding. Through homomorphic polynomial interpolation and difference construction, the direct transmission of a large amount of data can be avoided, thereby reducing the communication volume of batch anonymous query sharding and improving the efficiency of batch anonymous query sharding. In addition, homomorphic encryption allows calculations to be performed directly on encrypted data. In this way, the data provider does not need to decrypt the base polynomial ciphertext to perform homomorphic polynomial interpolation, which reduces the plaintext transmission of data and further reduces the communication volume of batch anonymous query sharding. Therefore, through this scheme, the data privacy of the data requester and the data provider can be protected at the same time in scenarios such as model prediction, and the communication volume can be reduced.

[0076] 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.

[0077] 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 ).

[0078] 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 anonymity query shards.

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

[0080] The following is a detailed description of a specific implementation of the data requester generating the second base polynomial based on n different second data. In one implementation, it can be implemented by the following steps (a1) and (a2).

[0081] Step (a1): For each second data among the n different second data, construct a first basis polynomial corresponding to the second data based on the n different second data, so that the value of the first basis polynomial on the second data is 1, and the value of the first basis polynomial on the other second data among the n different second data except the second data is 0.

[0082] In the present disclosure, the data requester can perform n-order polynomial interpolation based on n different second data to satisfy the interpolation condition Thus, n first base polynomials are obtained, wherein the degree of each first base polynomial is less than n, and the first base polynomial corresponding to the i-th second data among the n different second data is B i '(x), bs is the sth second data of n different second data, i=0,…,n-1, s=0,…,n-1.

[0083] Step (a2): Determine the first base polynomial corresponding to each of the n second data as the second base polynomial.

[0084] At this time, the second basis polynomial may include the first basis polynomials corresponding to each of the n second data, that is, the second basis polynomial includes n first basis polynomials. After obtaining the n first basis polynomials, the data requester may use the homomorphic encryption public key pk to perform homomorphic encryption on each first basis polynomial to obtain the ciphertexts of the n first basis polynomials. The ciphertexts of the n first basis polynomials constitute the basis polynomial ciphertext, that is, the basis polynomial ciphertext includes the ciphertexts of the first basis polynomials corresponding to each of the n second data.

[0085] When the base polynomial ciphertext includes ciphertexts of the first base polynomial corresponding to n pieces of second data, the above S102 may include:

[0086] Based on the base polynomial ciphertext and n locally generated random numbers, the interpolation polynomial ciphertext is constructed by the following equation:

[0087]

[0088] Among them, a(x) is the interpolation polynomial ciphertext, x is the independent variable; u i is the i-th random number among n random numbers; B i (x) is the ciphertext of the first base polynomial corresponding to the i-th second data among the n second data.

[0089] Since the i-th second data b i The corresponding first base polynomial is in the second data b i The value of is 1, except for the second data b among the n different second data i The values ​​of the other second data except for are 0. Accordingly, the i-th second data b i The ciphertext of the corresponding first base polynomial is in the second data b i The value of is also 1. Among the n different second data, except for the second data b i The values ​​of the other second data are also 0, so Therefore, the first ciphertext polynomial formed by the difference between the first polynomial and the interpolation polynomial ciphertext is in the second data b s The value of the first polynomial is equal to the second data b s Upper value and u s difference.

[0090] In this implementation, when performing homomorphic polynomial interpolation, the data requester needs to send the ciphertexts of n first basis polynomials to the data provider, and the communication volume involved in this process is O(n*n).

[0091] In another embodiment, the data requester generates a second base polynomial based on n different second data through the following steps (b1) to (b3).

[0092] Step (b1): construct an l-order square matrix with n different second data as elements.

[0093] In this disclosure, Each element in the square matrix is ​​different. Among them, the n second data can be filled into the empty square matrix of order l to obtain an order l square matrix. In one embodiment, b s Fill the empty square matrix of order l in ascending order of subscripts, starting from the first element of the first row of the empty square matrix, filling to the right in sequence until the row is filled, then move to the first element of the next row, continue filling to the right in sequence, and repeat this process until the entire square matrix is ​​filled.

[0094] For example, n = 16, l = 4, then the l-order square matrix is

[0095] Among them, when When it is not an integer, you can first put n second data l-order empty squares into the matrix, and then generate indivual and fill the unfilled positions with different random numbers in the Any of the random numbers does not belong to the n second data.

[0096] Step (b2): Generate a row basis polynomial corresponding to each row and a column basis polynomial corresponding to each column in the square matrix, so that the row basis polynomial takes the value of 1 on each element in the corresponding row and takes the value of 0 on other elements, and the column basis polynomial takes the value of 1 on each element in the corresponding column and takes the value of 0 on other elements, and satisfies RB r '(b s )CB c '(b s )=δ(s-(rl+c)).

[0097] In the present disclosure, δ(.) is the Dirac function, that is, when s-(rl+c)=0, the Dirac function takes the value of 1, and when s-(rl+c)≠0, the Dirac function takes the value of 0. RB r '(x) is the row basis polynomial corresponding to the rth row of the square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, and the degree of each row basis polynomial is less than l 2 .

[0098] Step (b3): ​​determine l row basis polynomials and l column basis polynomials as second basis polynomials.

[0099] At this time, the second basis polynomial includes l row basis polynomials and l column basis polynomials. After obtaining the l row basis polynomials and l column basis polynomials, the data requester can use the homomorphic encryption public key pk to homomorphically encrypt each row basis polynomial and each column basis polynomial to obtain the ciphertext of the l row basis polynomials and the ciphertext of the l column basis polynomials, which constitute the basis polynomial ciphertext, that is, the basis polynomial ciphertext includes the ciphertext of the l row basis polynomials and the ciphertext of the l column basis polynomials.

[0100] When the basis polynomial ciphertext includes ciphertexts of l row basis polynomials and ciphertexts of l column basis polynomials, the above S102 may include:

[0101] Based on the base polynomial ciphertext and n locally generated random numbers, the interpolation polynomial ciphertext is constructed by the following equation:

[0102]

[0103] Among them, u rl+c is the rl+cth random number among n random numbers; RB r (x) is the ciphertext of the rth row basis polynomial among the ciphertexts of l row basis polynomials; CB c (x) is the ciphertext of the cth column basis polynomial among the ciphertexts of l column basis polynomials.

[0104] Due to RB r '(b s )CB c '(b s )=δ(s-(rl+c)), therefore:

[0105]

[0106] It can be seen that the first ciphertext polynomial formed by the difference between the first polynomial and the interpolation polynomial ciphertext is in the second data b s The value of the first polynomial is equal to the second data b s Upper value and u s difference.

[0107] In this implementation, when the homomorphic polynomial is interpolated, the data requester needs to send a The ciphertext of the first base polynomial, the communication amount involved in this process is Compared with the implementation method using n basis polynomials, the communication volume is smaller.

[0108] Below we use RB'0(x) to illustrate the construction method of the row basis polynomial. Specifically, it can be achieved by the following steps:

[0109] First, let Then Z(x ij)=0, where i≠0, j=0,…,l-1; Z(x 0j )≠0, where j=0,…,l-1; the degree of Z(x) is l(l-1).

[0110] Then, find a polynomial C(x) of degree less than or equal to l-1 such that C(x 0j )=Z(x 0j ) -1 , where j = 0,…,l-1;

[0111] Finally, let RB'0(x) = Z(x)C(x), whose degree is less than or equal to l 2 -1, and RB'0(x) satisfies that the values ​​of the elements in the 0th row of the square matrix are all 1, and the values ​​of the elements in other rows are all 0.

[0112] The construction method of the row basis polynomials corresponding to other rows in the square matrix and the construction method of the column basis polynomials corresponding to each column in the square matrix are similar to the construction method of RB'0(x), which will not be described in detail in this disclosure.

[0113] The following is a detailed description of the specific implementation method of calculating the value of the first ciphertext polynomial on the second identifier set with the data requester in the above S103 so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set. Specifically, it can be achieved by the following steps (c1) to (c3).

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

[0115] 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 use the homomorphic encryption public key pk to homomorphically encrypt g(x) to obtain the second ciphertext polynomial, and then send the second ciphertext polynomial to the data provider. This process is an interaction between the two parties in the batch anonymity query process, and the communication volume involved is O(n).

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

[0117] The degree of the random polynomial is less than or equal to d-n-1, and the random polynomial belongs to

[0118] Step (c3): Mask the first ciphertext polynomial using the product of a random polynomial and a 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 second polynomial, and calculates the value of the second polynomial on the second identifier set to obtain a second fragment of the feature of the dimension corresponding to the second identifier set.

[0119] 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 first ciphertext 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 second polynomial, and then calculate the value of the second polynomial on the second identification set to obtain the second shard of the feature of the dimension corresponding to the second identification set. The communication volume involved in this process is O(hN). It can be seen that in the polynomial evaluation process, the two parties involve two interactions, and the communication volumes are O(n) and O(hN) respectively. Therefore, the communication volume involved in the polynomial evaluation process is O(hN).

[0120] In addition, the product of the random polynomial and the second ciphertext polynomial can be used to mask the first ciphertext polynomial in a variety of ways to obtain a masked polynomial. In one implementation, the difference between the first ciphertext polynomial and the above product can be determined as the masked polynomial, that is, the masked polynomial = the first ciphertext polynomial - the random polynomial × the second ciphertext polynomial.

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

[0122] In the above implementation, after the data provider encrypts the first ciphertext polynomial, if the data provider directly sends the first ciphertext polynomial to the data requester, the data requester can use the local homomorphic encryption private key sk to decrypt the first ciphertext 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 a second ciphertext polynomial to mask the first ciphertext polynomial, thereby avoiding data privacy leakage of the data provider.

[0123] 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 second polynomial on at least some of the identifiers can be the same as the value of the first ciphertext 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.

[0124] The communication volume 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 first polynomial is high. Accordingly, the degree of the first ciphertext polynomial is also high. If it is directly evaluated, the communication overhead is huge. Therefore, it is possible to consider reducing the degree of the first polynomial before determining the first ciphertext polynomial based on the first polynomial to reduce the communication volume during polynomial evaluation, thereby improving the efficiency of batch anonymous query sharding. Specifically, before the above step of determining the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial, the data query method applied to the data provider may also include the following steps:

[0125] In response to receiving the third ciphertext polynomial sent by the data requester, the first polynomial is reduced in degree according to the third ciphertext polynomial to obtain a third polynomial.

[0126] At this time, determining the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial may include: determining the difference between the third polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial.

[0127] The third ciphertext polynomial is generated by the data requester based on the second identification set. After the data requester generates the second identification set based on the index number of the first data to be requested from the data provider, the data requester can construct the fifth polynomial based on the second identification set, perform homomorphic encryption on the fifth polynomial, obtain the third ciphertext polynomial, and send the third ciphertext polynomial to the data provider; after the data provider receives the third ciphertext polynomial sent by the data requester in response, it can perform down-order processing on the first polynomial according to the third ciphertext polynomial to obtain the third polynomial.

[0128] For example, the data requester may construct the fifth polynomial based on the second identifier set by using the following equation:

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

[0130] 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.

[0131] 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 third ciphertext polynomials, and send them to the data provider. This process is the fourth interaction between the two parties in the batch anonymous query sharding process, and the communication volume 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. Since the degree of the first polynomial is reduced from O(N) to O(n), the communication volume of polynomial evaluation is reduced from O(hN) to O(hn), where the communication volume involved in the polynomial reduction is O(N). In addition, the communication volume of polynomial interpolation is O(n*n) or Therefore, the communication volume of batch anonymous query shard is O(N+hn+n 2 ).

[0132] In typical applications, N = 2 20 , n = 2 12 , h = 2 10 , d = 2 13 , O(N+hn+n 2 ) is much smaller than O(ndlog d (N)+hnd).

[0133] The following is a detailed description of the specific implementation method of reducing the first polynomial according to the third ciphertext polynomial to obtain the third polynomial. Specifically, it can be achieved through steps (e1) to (e3).

[0134] Step (e1): Convert the first polynomial into form.

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

[0136] Among them, f k (x) is plain text, and the third 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.

[0137] Step (e3): Determine the sum of each fourth polynomial and f0(x) as the third polynomial.

[0138] The sum of each fourth polynomial and f0(x) is It is equal to That is, we get the third polynomial

[0139] 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.

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

[0141] In S202, a second base polynomial is generated based on n different second data, and the second base polynomial is homomorphically encrypted to obtain a base polynomial ciphertext.

[0142] In S203, the base polynomial ciphertext is sent to the data provider, so that the data provider generates a first ciphertext polynomial for each dimensional feature of at least some of the h-dimensional features according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature.

[0143] 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.

[0144] In S204, the value of the first ciphertext polynomial on the second identifier set is calculated with the data provider to obtain a second fragment of the feature of the dimension corresponding to the second identifier set.

[0145] In the above technical solution, first, the data requester generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial, and sends the base polynomial ciphertext obtained by homomorphic encryption to the data provider; then, the data provider constructs an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated by itself; next, the data provider determines the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature in at least some of the dimensional features in the h-dimensional features, and determines the n random numbers as the first shard of the dimensional feature corresponding to the second identification set; finally, the data provider and the data requester calculate the value of the first ciphertext polynomial on the second identification set, and the data requester obtains the second shard of the dimensional feature corresponding to the second identification set, so that the data provider and the data requester respectively obtain a shard of the first data requested by the data provider. In this way, the problem of batch anonymous query sharding can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of interpolation and evaluation. Among them, through polynomial interpolation, the value of the interpolation polynomial ciphertext on n different second data can be made into n random numbers. In this way, the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding. Through homomorphic polynomial interpolation and difference construction, the direct transmission of a large amount of data can be avoided, thereby reducing the communication volume of batch anonymous query sharding and improving the efficiency of batch anonymous query sharding. In addition, homomorphic encryption allows calculations to be performed directly on encrypted data. In this way, the data provider does not need to decrypt the base polynomial ciphertext to perform homomorphic polynomial interpolation, which reduces the plaintext transmission of data and further reduces the communication volume of batch anonymous query sharding. Therefore, through this scheme, the data privacy of the data requester and the data provider can be protected at the same time in scenarios such as model prediction, and the communication volume can be reduced.

[0146] In a possible implementation, generating a second basis polynomial based on n different second data includes: for each of the n different second data, constructing a first basis polynomial corresponding to the second data based on the n different second data, so that the value of the first basis polynomial on the second data is 1, and the value of the other second data among the n different second data except the second data is 0; and determining the first basis polynomial corresponding to each of the n second data as a second basis polynomial.

[0147] In a possible implementation manner, generating the second base polynomial based on n different second data includes: constructing an l-order square matrix with the n different second data as elements, Each element in the square matrix is ​​different; a row basis polynomial corresponding to each row and a column basis polynomial corresponding to each column in the square matrix are generated, so that the row basis polynomial takes a value of 1 on each element in the corresponding row and takes a value of 0 on other elements, and the column basis polynomial takes a value of 1 on each element in the corresponding column and takes a value of 0 on other elements, and satisfies RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s The s-th second data of the n different second data, s=0, ..., n-1; l row basis polynomials and l column basis polynomials are determined as second basis polynomials.

[0148] In a possible implementation, calculating the value of the first ciphertext polynomial on the second identifier set with the data provider to obtain the second shard of the feature of the dimension corresponding to the second identifier set includes: homomorphically encrypting g(x) to obtain a second ciphertext polynomial, wherein, x i is the i-th identifier in the second identifier set, and x is the independent variable; the second ciphertext polynomial is sent to the data provider, so that the data provider uses the second ciphertext polynomial to mask the first ciphertext polynomial to obtain a masked polynomial, and sends the masked polynomial to the data requester; in response to receiving the masked polynomial sent by the data provider, the masked polynomial is decrypted to obtain a second polynomial; the value of the second polynomial on the second identifier set is calculated to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

[0149] In a possible implementation manner, the data query method applied to the data requester may further include:

[0150] Based on the second identification set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a third ciphertext polynomial;

[0151] The third ciphertext polynomial is sent to the data provider, so that the data provider, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, performs down-order processing on the first polynomial corresponding to the dimensional feature according to the third ciphertext polynomial to obtain the third polynomial, and generates a first ciphertext polynomial based on the base polynomial ciphertext, the first polynomial corresponding to the dimensional feature and the third 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 numbers of multiple first data, and the first identifier set is generated in the same way as the second identifier set.

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

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

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

[0155] 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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0156] 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.

[0157] 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 4As shown, the data query device 300 applied to the data provider includes: a first construction module 301, which is used to respond to the received base polynomial ciphertext sent by the data requester, and construct an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated locally, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; a determination module 302, which is used to determine the difference between the first polynomial corresponding to each dimensional feature of at least some of the dimensional features in the h-dimensional features and the interpolation polynomial ciphertext as a first ciphertext polynomial, and The n random numbers are determined as the first slice of the dimensional feature corresponding to the second identification set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identification in the first identification set, the first identification set is generated based on the index numbers of the multiple first data, the second identification set is generated by the data requester based on the index numbers of the first data to be requested from the data provider, and the second identification set is generated in the same manner as the first identification set; a first evaluation module 303 is used to calculate the value of the first ciphertext polynomial on the second identification set with the data requester, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identification set.

[0158] In the above technical solution, first, the data requester generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial, and sends the base polynomial ciphertext obtained by homomorphic encryption to the data provider; then, the data provider constructs an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated by itself; next, the data provider determines the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature in at least some of the dimensional features in the h-dimensional features, and determines the n random numbers as the first shard of the dimensional feature corresponding to the second identification set; finally, the data provider and the data requester calculate the value of the first ciphertext polynomial on the second identification set, and the data requester obtains the second shard of the dimensional feature corresponding to the second identification set, so that the data provider and the data requester respectively obtain a shard of the first data requested by the data provider. In this way, the problem of batch anonymous query sharding can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of interpolation and evaluation. Among them, through polynomial interpolation, the value of the interpolation polynomial ciphertext on n different second data can be made into n random numbers. In this way, the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding. Through homomorphic polynomial interpolation and difference construction, the direct transmission of a large amount of data can be avoided, thereby reducing the communication volume of batch anonymous query sharding and improving the efficiency of batch anonymous query sharding. In addition, homomorphic encryption allows calculations to be performed directly on encrypted data. In this way, the data provider does not need to decrypt the base polynomial ciphertext to perform homomorphic polynomial interpolation, which reduces the plaintext transmission of data and further reduces the communication volume of batch anonymous query sharding. Therefore, through this scheme, the data privacy of the data requester and the data provider can be protected at the same time in scenarios such as model prediction, and the communication volume can be reduced.

[0159] Optionally, the base polynomial ciphertext includes ciphertexts of first base polynomials corresponding to n second data, wherein the value of the first base polynomial on the second data corresponding to it is 1, and the value of the first base polynomial on other second data is 0; the first construction module 301 is used to construct the interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers by the following formula:

[0160]

[0161] Wherein, a(x) is the interpolation polynomial ciphertext, x is the independent variable; u i is the ith random number among the n random numbers; B i(x) is the ciphertext of the first base polynomial corresponding to the i-th second data among the n second data.

[0162] Optionally, the basis polynomial ciphertext includes ciphertexts of l row basis polynomials and ciphertexts of l column basis polynomials, wherein: And satisfy RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the l-order square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s is the sth second data of the n different second data, s=0,…,n-1, the square matrix is ​​generated by the data requesting party based on the n different second data; the first construction module 301 is used to construct the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally through the following formula:

[0163]

[0164] Wherein, a(x) is the interpolation polynomial ciphertext; u rl+c is the rl+cth random number among the n random numbers; RB r (x) is the ciphertext of the rth row basis polynomial among the ciphertexts of the l row basis polynomials; CB c (x) is the ciphertext of the cth column basis polynomial among the ciphertexts of the l column basis polynomials.

[0165] Optionally, the first evaluation module 303 includes: a first receiving submodule, configured 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, and x is an independent variable; a first generating submodule is used to generate a random polynomial, wherein the degree of the random polynomial is less than or equal to d-n-1, and d is the degree of the polynomial module of the homomorphic encryption; a masking processing submodule is used to mask the first ciphertext polynomial using the product of the random polynomial and the second ciphertext polynomial to obtain a masking polynomial, and send the masking polynomial to the data requester so that the data requester decrypts the masking polynomial to obtain a second polynomial, and calculates the value of the second polynomial on the second identifier set to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

[0166] Optionally, the masking process of the first ciphertext polynomial using the product of the random polynomial and the second ciphertext polynomial to obtain a masked polynomial includes: a first determination submodule, used to determine the difference between the first ciphertext polynomial and the product as the masked polynomial; or, a second determination submodule, used to determine the sum of the first ciphertext polynomial and the product as the masked polynomial.

[0167] Optionally, the data query device 300 applied to the data provider also includes: a degree reduction module, which is used to, in response to receiving a third ciphertext polynomial sent by the data requester, perform degree reduction processing on the first polynomial according to the third ciphertext polynomial to obtain a third polynomial before the determination module determines the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial, wherein the third ciphertext polynomial is generated by the data requester based on the second identifier set; the determination module is used to determine the difference between the third polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial.

[0168] Optionally, there are L third ciphertext polynomials, and the kth third 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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is an independent variable; the reduction module includes: a conversion submodule, which is used to convert the first polynomial into The form, where f k (x) is the kth polynomial; the first calculation submodule is used to convert f k (x) is multiplied by the kth third ciphertext polynomial to obtain a fourth polynomial, wherein k=1, 2, ..., L; a third determination submodule is used to determine the sum of each of the fourth polynomials and f0(x) as the third polynomial.

[0169] Figure 5 FIG. 1 is a block diagram showing a data query device applied to a data requester according to an exemplary embodiment. Figure 5As shown, a data query device 400 applied to a data requester includes: a first generation module 401, 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 multiple first data, and the first data includes h-dimensional features, h≥1; a second generation module 402, used to generate a second base polynomial based on n different second data, and homomorphically encrypt the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; a sending module 403, used to send the base polynomial ciphertext to the data provider, with the data provider policy For each dimensional feature of at least some of the dimensional features in the h-dimensional features, a first ciphertext polynomial is generated according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; a second evaluation module 404 is used to calculate the value of the first ciphertext polynomial on the second identifier set with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

[0170] In the above technical solution, first, the data requester generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial, and sends the base polynomial ciphertext obtained by homomorphic encryption to the data provider; then, the data provider constructs an interpolation polynomial ciphertext based on the base polynomial ciphertext and n random numbers generated by itself; next, the data provider determines the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as the first ciphertext polynomial for each dimensional feature in at least some of the dimensional features in the h-dimensional features, and determines the n random numbers as the first shard of the dimensional feature corresponding to the second identification set; finally, the data provider and the data requester calculate the value of the first ciphertext polynomial on the second identification set, and the data requester obtains the second shard of the dimensional feature corresponding to the second identification set, so that the data provider and the data requester respectively obtain a shard of the first data requested by the data provider. In this way, the problem of batch anonymous query sharding can be cleverly converted into a polynomial evaluation problem, and the polynomial evaluation process can be divided into two sub-processes of interpolation and evaluation. Among them, through polynomial interpolation, the value of the interpolation polynomial ciphertext on n different second data can be made into n random numbers. In this way, the value of the first ciphertext polynomial on the second identification set, which is composed of the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext, and the n random numbers constitute two shards of the dimensional feature corresponding to the second identification set, thereby realizing batch anonymous query sharding. Through homomorphic polynomial interpolation and difference construction, the direct transmission of a large amount of data can be avoided, thereby reducing the communication volume of batch anonymous query sharding and improving the efficiency of batch anonymous query sharding. In addition, homomorphic encryption allows calculations to be performed directly on encrypted data. In this way, the data provider does not need to decrypt the base polynomial ciphertext to perform homomorphic polynomial interpolation, which reduces the plaintext transmission of data and further reduces the communication volume of batch anonymous query sharding. Therefore, through this scheme, the data privacy of the data requester and the data provider can be protected at the same time in scenarios such as model prediction, and the communication volume can be reduced.

[0171] Optionally, the second generating module 402 includes: a first constructing submodule, used for constructing, for each of the n different second data, a first basis polynomial corresponding to the second data based on the n different second data, so that the value of the first basis polynomial on the second data is 1, and the value of the other second data among the n different second data except the second data is 0; and a fourth determining submodule, used for determining the first basis polynomial corresponding to each of the n second data as a second basis polynomial.

[0172] Optionally, the second generating module 402 includes: a second constructing submodule, configured to construct an l-order square matrix using the n different second data as elements, Each element in the square matrix is ​​different; the second generating submodule is used to generate a row basis polynomial corresponding to each row in the square matrix and a column basis polynomial corresponding to each column, so that the row basis polynomial takes a value of 1 on each element in the corresponding row and takes a value of 0 on other elements, and the column basis polynomial takes a value of 1 on each element in the corresponding column and takes a value of 0 on other elements, and satisfies RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s is the sth second data of the n different second data, s=0, ..., n-1; a fifth determining submodule is used to determine the l row basis polynomials and the l column basis polynomials as second basis polynomials.

[0173] Optionally, the second evaluation module 404 includes: an encryption submodule, configured to perform homomorphic encryption on g(x) to obtain a second ciphertext polynomial, wherein: x i is the i-th identifier in the second identifier set, and x is an independent variable; a first sending submodule, used to send the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the first ciphertext polynomial to obtain a masked polynomial, and sends the masked polynomial to the data requester; a decryption submodule, used to respond to receiving the masked polynomial sent by the data provider, decrypt the masked polynomial to obtain a second polynomial; a second calculation submodule, used to calculate the value of the second polynomial on the second identifier set, and obtain the second shard of the feature of this dimension corresponding to the second identifier set.

[0174] Optionally, the data query device 400 applied to the data requester also includes: a second construction module, used to construct a fifth polynomial based on the second identification set, and homomorphically encrypt the fifth polynomial to obtain a third ciphertext polynomial; the sending module 403 is also used to send the third ciphertext polynomial to the data provider, so that the data provider, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, performs a degree reduction process on the first polynomial corresponding to the dimensional feature according to the third ciphertext polynomial to obtain a third polynomial, and generates the first ciphertext polynomial based on the base polynomial ciphertext, the first polynomial corresponding to the dimensional feature and the third 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 way as the second identification set.

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

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

[0177] 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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0178] 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.

[0179] 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.

[0180] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a 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.

[0181] 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.

[0182] 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.

[0183] 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.

[0184] 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.

[0185] 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.

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

[0187] 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 the received base polynomial ciphertext sent by the data requester, construct an interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers, wherein the data provider holds multiple first data, the first data includes h-dimensional features, h≥1, and the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; for each dimensional feature of at least some of the dimensional features in the h-dimensional features, the first polynomial corresponding to the dimensional feature is compared with The difference of the interpolation polynomial ciphertext is determined as the first ciphertext polynomial, and the n random numbers are determined as the first slice of the dimensional feature corresponding to the second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers of the first data to be requested from the data provider, and the second identifier set is generated in the same way as the first identifier set; and the value of the first ciphertext polynomial on the second identifier set is calculated with the data requester, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set.

[0188] 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; generates a second base polynomial based on n different second data, and homomorphically encrypts the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; sends the base polynomial ciphertext to the data provider, and sends the base polynomial ciphertext to the data provider. The supplier generates a first ciphertext polynomial for each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; the supplier calculates with the data provider the value of the first ciphertext polynomial on the second identifier set to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

[0189] 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).

[0190] 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.

[0191] 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 first generation module may also be described as "a module for generating a second identifier based on the index number of the first data to be requested from the data provider".

[0192] 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.

[0193] 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.

[0194] 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, and the first data includes h-dimensional features, h≥1. The method includes: in response to a received base polynomial ciphertext sent by a data requester, based on the base polynomial ciphertext and n locally generated random numbers, constructing an interpolation polynomial ciphertext, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; for each dimensional feature of at least some of the dimensional features in the h-dimensional features, the first polynomial corresponding to the dimensional feature is generated. The difference between the first ciphertext polynomial and the interpolation polynomial ciphertext is determined as the first ciphertext polynomial, and the n random numbers are determined as the first slice of the dimensional feature corresponding to the second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers of the first data to be requested from the data provider, and the second identifier set is generated in the same way as the first identifier set; and the data requester calculates the value of the first ciphertext polynomial on the second identifier set, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set.

[0195] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the base polynomial ciphertext includes ciphertexts of the first base polynomial corresponding to n second data, wherein the value of the first base polynomial on the second data corresponding to it is 1, and the value of the first base polynomial on other second data is 0; constructing the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally includes: constructing the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally by the following formula:

[0196]

[0197] Wherein, a(x) is the interpolation polynomial ciphertext, x is the independent variable; u i is the i-th random number among the n random numbers; B i (x) is the ciphertext of the first base polynomial corresponding to the i-th second data among the n second data.

[0198] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the base polynomial ciphertext includes ciphertexts of l row base polynomials and ciphertexts of l column base polynomials, wherein: And satisfy RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the l-order square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s is the sth second data of the n different second data, s=0,…,n-1, the square matrix is ​​generated by the data requesting party based on the n different second data; constructing the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally, comprising: constructing the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally by the following formula:

[0199]

[0200] Wherein, a(x) is the interpolation polynomial ciphertext; u rl+c is the rl+cth random number among the n random numbers; RB r (x) is the ciphertext of the rth row basis polynomial among the ciphertexts of the l row basis polynomials; CB c (x) is the ciphertext of the cth column basis polynomial among the ciphertexts of the l column basis polynomials.

[0201] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the step of calculating the value of the first ciphertext polynomial on the second identifier set with the data requester so that the data requester obtains the second shard of the feature of the dimension corresponding to the second identifier set 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, and x is an independent variable; a random polynomial is generated, wherein the degree of the random polynomial is less than or equal to d-n-1, and d is the degree of the polynomial module of the homomorphic encryption; the first ciphertext 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 second polynomial, and the value of the second polynomial on the second identifier set is calculated to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

[0202] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein the first ciphertext polynomial is masked using the product of the random polynomial and the second ciphertext polynomial to obtain a masked polynomial, including: determining the difference between the first ciphertext polynomial and the product as the masked polynomial; or determining the sum of the first ciphertext polynomial and the product as the masked polynomial.

[0203] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, and before the step of determining the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial, the method also includes: in response to receiving a third ciphertext polynomial sent by the data requester, according to the third ciphertext polynomial, performing reduction processing on the first polynomial to obtain a third polynomial, wherein the third ciphertext polynomial is generated by the data requester based on the second identifier set; determining the difference between the first polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial includes: determining the difference between the third polynomial and the interpolation polynomial ciphertext as the first ciphertext polynomial.

[0204] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein the number of the third ciphertext polynomials is L, and the kth third 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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is an independent variable; the step of reducing the first polynomial according to the third ciphertext polynomial to obtain the third polynomial includes: converting the first polynomial into The form, where f k (x) is the kth polynomial; f k (x) is multiplied by the kth third ciphertext polynomial to obtain a fourth polynomial, wherein k=1, 2, ..., L; and the sum of each of the fourth polynomials and f0(x) is determined as the third polynomial.

[0205] According to one or more embodiments of the present disclosure, Example 8 provides a data query method, which is applied to a data requester, and the method includes: generating a second identification set based on an index number of first data to be requested from a data provider, wherein the data provider holds multiple first data, and the first data includes h-dimensional features, h≥1; generating a second base polynomial based on n different second data, and homomorphically encrypting the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; sending the base polynomial ciphertext to the data provider, with the data provider providing the policy For each dimensional feature of at least some of the dimensional features in the h-dimensional features, a first ciphertext polynomial is generated according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; the value of the first ciphertext polynomial on the second identifier set is calculated with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

[0206] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8, which generates a second basis polynomial based on n different second data, including: for each of the n different second data, based on the n different second data, constructing a first basis polynomial corresponding to the second data, so that the value of the first basis polynomial on the second data is 1, and the value of the other second data among the n different second data except the second data is 0; and determining the first basis polynomial corresponding to each of the n second data as a second basis polynomial.

[0207] According to one or more embodiments of the present disclosure, Example 10 provides the method of Example 8, wherein generating a second base polynomial based on n different second data includes: constructing an l-order square matrix with the n different second data as elements, Each element in the square matrix is ​​different; a row basis polynomial corresponding to each row and a column basis polynomial corresponding to each column in the square matrix are generated, so that the row basis polynomial takes a value of 1 on each element in the corresponding row and takes a value of 0 on other elements, and the column basis polynomial takes a value of 1 on each element in the corresponding column and takes a value of 0 on other elements, and satisfies RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the square matrix, CB c '(x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s The s-th second data of the n different second data, s=0, ..., n-1; l row basis polynomials and l column basis polynomials are determined as second basis polynomials.

[0208] According to one or more embodiments of the present disclosure, Example 11 provides the method of Example 8, wherein the step of calculating the value of the first ciphertext polynomial on the second identification set with the data provider to obtain the second shard of the dimensional feature corresponding to the second identification set includes: homomorphically encrypting g(x) to obtain a second ciphertext polynomial, wherein: x i is the i-th identifier in the second identifier set, and x is an independent variable; the second ciphertext polynomial is sent to the data provider, so that the data provider uses the second ciphertext polynomial to mask the first ciphertext polynomial to obtain a masked polynomial, and sends the masked polynomial to the data requester; in response to receiving the masked polynomial sent by the data provider, the masked polynomial is decrypted to obtain a second polynomial; the value of the second polynomial on the second identifier set is calculated to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

[0209] According to one or more embodiments of the present disclosure, Example 12 provides the method of Example 8, which further includes: constructing a fifth polynomial based on the second identifier set, and homomorphically encrypting the fifth polynomial to obtain a third ciphertext polynomial; sending the third ciphertext polynomial to the data provider, so that the data provider, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, performs a degree reduction process on the first polynomial corresponding to the dimensional feature according to the third ciphertext polynomial to obtain a third polynomial, and generates the first ciphertext polynomial based on the base polynomial ciphertext, the first polynomial corresponding to the dimensional feature, and the third 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.

[0210] According to one or more embodiments of the present disclosure, Example 13 provides the method of Example 12, wherein constructing a fifth polynomial based on the second identifier set includes: constructing a fifth polynomial based on the second identifier set by the following formula:

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

[0212] 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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

[0213] According to one or more embodiments of the present disclosure, Example 14 provides a data query device, which is applied to a data provider, wherein the data provider holds multiple first data, and the first data includes h-dimensional features, h≥1, and the device includes: a first construction module, which is used to respond to a base polynomial ciphertext sent by a received data requester, and to construct an interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; a determination module, which is used to determine, for each dimensional feature of at least some of the h-dimensional features, the first dimensional feature corresponding to the dimensional feature; The difference between a polynomial and the interpolation polynomial ciphertext is determined as a first ciphertext polynomial, and the n random numbers are determined as a first slice of the dimensional feature corresponding to a second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers 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; a first evaluation module is used to calculate the value of the first ciphertext polynomial on the second identifier set with the data requester, so that the data requester obtains the second slice of the dimensional feature corresponding to the second identifier set.

[0214] According to one or more embodiments of the present disclosure, Example 15 provides a data query device, which is applied to a data requester, and the device includes: a first generation module, which 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 multiple first data, and the first data includes h-dimensional features, h≥1; a second generation module, which is used to generate a base polynomial based on n different second data, and homomorphically encrypt the base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; a sending module, which is used to send the base polynomial ciphertext to the data provider, so that the data provider can obtain the base polynomial ciphertext. The data provider generates a first ciphertext polynomial for each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the base polynomial ciphertext and the first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; a second evaluation module is used to calculate the value of the first ciphertext polynomial on the second identifier set with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identifier set.

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

[0216] According to one or more embodiments of the present disclosure, Example 17 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in any one of claims 1-13.

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

[0218] 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.

[0219] 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.

[0220] 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 the received base polynomial ciphertext sent by the data requester, construct an interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; For each dimensional feature of at least some of the dimensional features in the h-dimensional features, the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext is determined as the first ciphertext polynomial, and the n random numbers are determined as the first fragment of the dimensional feature corresponding to the second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers 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 value of the first ciphertext polynomial on the second identifier set is calculated with the data requester, so that the data requester obtains the second fragment of the dimensional feature corresponding to the second identifier set.

2. The method according to claim 1, characterized in that The base polynomial ciphertext includes ciphertexts of the first base polynomials corresponding to n pieces of the second data, wherein the value of the first base polynomial on the second data corresponding to the first base polynomial is 1, and the value of the first base polynomial on other pieces of the second data is 0; The step of constructing an interpolation polynomial ciphertext based on the base polynomial ciphertext and n locally generated random numbers includes: Based on the base polynomial ciphertext and n locally generated random numbers, an interpolation polynomial ciphertext is constructed by the following formula: Wherein, a(x) is the interpolation polynomial ciphertext, x is the independent variable; u i is the ith random number among the n random numbers; B i (x) is the ciphertext of the first base polynomial corresponding to the i-th second data among the n second data.

3. The method according to claim 1, characterized in that The base polynomial ciphertext includes the ciphertexts of l row base polynomials and the ciphertexts of l column base polynomials, wherein: And satisfy RB r '(b s )CB c '(b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB r '(x) is the row basis polynomial corresponding to the rth row of the l-order square matrix, CB' c (x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s is the sth second data of the n different second data, s=0, ..., n-1, and the square matrix is ​​generated by the data requesting party based on the n different second data; The constructing of the interpolation polynomial ciphertext based on the base polynomial ciphertext and the n random numbers generated locally includes: Based on the base polynomial ciphertext and the n random numbers generated locally, the interpolation polynomial ciphertext is constructed by the following formula: Wherein, a(x) is the interpolation polynomial ciphertext; u rl+c is the rl+cth random number among the n random numbers; RB r (x) is the ciphertext of the rth row basis polynomial among the ciphertexts of the l row basis polynomials; CB c (x) is the ciphertext of the cth column basis polynomial among the ciphertexts of the l column basis polynomials.

4. The method according to claim 1, characterized in that: The calculating, with the data requesting party, the value of the first ciphertext polynomial on the second identifier set so that the data requesting party obtains a second fragment of the dimensional feature corresponding to the second identifier set, 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, and x is the independent variable; 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 first ciphertext 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 second polynomial, and calculates the value of the second polynomial on the second identifier set to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

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

6. The method according to claim 1, characterized in that Before the step of determining the difference between the first polynomial and the interpolation polynomial ciphertext as a first ciphertext polynomial, the method further includes: In response to receiving a third ciphertext polynomial sent by the data requester, performing a degree reduction process on the first polynomial according to the third ciphertext polynomial to obtain a third polynomial, wherein the third ciphertext polynomial is generated by the data requester based on the second identifier set; The step of determining the difference between the first polynomial and the interpolation polynomial ciphertext as a first ciphertext polynomial comprises: The difference between the third polynomial and the interpolation polynomial ciphertext is determined as a first ciphertext polynomial.

7. The method according to claim 6, characterized in that The number of the third ciphertext polynomials is L, and the kth third ciphertext polynomial is generated by the data requesting party for x kn mod g(x) is homomorphically encrypted to obtain k=1,2,…,L, where N is the number of first data held by the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable; The step of performing a degree reduction process on the first polynomial according to the third ciphertext polynomial to obtain a third polynomial includes: Convert the first polynomial into The form, where f k (x) is the kth polynomial; f k (x) multiplying the k-th third 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 third polynomial.

8. 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; Generate a second base polynomial based on n different second data, and perform homomorphic encryption on the second base polynomial to obtain a base polynomial ciphertext, where n is the number of first data to be requested from the data provider; Sending the base polynomial ciphertext to the data provider, so that the data provider generates a first ciphertext polynomial for each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the base polynomial ciphertext and a first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; Calculate the value of the first ciphertext polynomial on the second identifier set with the data provider to obtain a second shard of the feature of this dimension corresponding to the second identifier set.

9. The method according to claim 8, characterized in that The generating a second base polynomial based on n different second data comprises: For each of the n different second data, construct a first base polynomial corresponding to the second data based on the n different second data, so that the value of the first base polynomial on the second data is 1, and the value of the other second data among the n different second data except the second data is 0; The first base polynomial corresponding to each of the n second data is determined as a second base polynomial.

10. The method according to claim 8, characterized in that The generating a second base polynomial based on n different second data comprises: Constructing an l-order square matrix with the n different second data as elements, Each element in the square matrix is ​​different; Generate a row basis polynomial corresponding to each row and a column basis polynomial corresponding to each column in the square matrix, so that the row basis polynomial takes a value of 1 on each element in the corresponding row and takes a value of 0 on other elements, and the column basis polynomial takes a value of 1 on each element in the corresponding column and takes a value of 0 on other elements, and satisfies RB' r (b s )CB' c (b s )=δ(s-(rl+c)), where δ(.) is the Dirac function, RB' r (x) is the row basis polynomial corresponding to the rth row of the square matrix, CB' c (x) is the column basis polynomial corresponding to the cth column of the square matrix, x is the independent variable, b s is the s-th second data of the n different second data, s=0, ..., n-1; The l row basis polynomials and the l column basis polynomials are determined as second basis polynomials.

11. The method according to claim 8, characterized in that The calculating, with the data provider, the value of the first ciphertext polynomial on the second identifier set to obtain a second shard of the feature of the dimension corresponding to the second identifier set 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, and x is the independent variable; Sending the second ciphertext polynomial to the data provider, so that the data provider uses the second ciphertext polynomial to mask the first ciphertext 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 second polynomial; The value of the second polynomial on the second identification set is calculated to obtain a second slice of the feature of the dimension corresponding to the second identification set.

12. The method according to claim 8, characterized in that The method further comprises: Based on the second identifier set, construct a fifth polynomial, and perform homomorphic encryption on the fifth polynomial to obtain a third ciphertext polynomial; The third ciphertext polynomial is sent to the data provider, so that the data provider, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, performs a degree reduction process on the first polynomial corresponding to the dimensional feature according to the third ciphertext polynomial to obtain the third polynomial, and generates the first ciphertext polynomial based on the base polynomial ciphertext, the first polynomial corresponding to the dimensional feature and the third 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.

13. The method according to claim 12, 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 mod g(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 held by the data provider, x i is the i-th identifier in the second identifier set, and x is the independent variable.

14. 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 first construction module is configured to construct an interpolation polynomial ciphertext in response to a received base polynomial ciphertext sent by a data requester, based on the base polynomial ciphertext and n locally generated random numbers, wherein the base polynomial ciphertext is generated by the data requester based on n different second data, and n is the number of first data to be requested by the data requester from the data provider; A determination module, for determining, for each dimensional feature of at least some of the dimensional features in the h-dimensional features, the difference between the first polynomial corresponding to the dimensional feature and the interpolation polynomial ciphertext as a first ciphertext polynomial, and determining the n random numbers as a first slice of the dimensional feature corresponding to a second identifier set, wherein the first polynomial is constructed based on the dimensional feature corresponding to each identifier in the first identifier set, the first identifier set is generated based on the index numbers of the multiple first data, the second identifier set is generated by the data requester based on the index numbers 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; a first evaluation module, for calculating, with the data requester, the value of the first ciphertext polynomial on the second identifier set, so that the data requester obtains a second slice of the dimensional feature corresponding to the second identifier set.

15. A data query device, characterized in that: Applied to a data requester, the device comprises: A first 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 second generating module, used for generating a second base polynomial based on n different second data, and performing homomorphic encryption on the second base polynomial to obtain a base polynomial ciphertext, wherein n is the number of first data to be requested from the data provider; a sending module, configured to send the base polynomial ciphertext to the data provider, so that the data provider generates a first ciphertext polynomial for each dimensional feature of at least some of the dimensional features in the h-dimensional features according to the base polynomial ciphertext and a first polynomial corresponding to the dimensional feature, 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 is generated in the same manner as the second identifier set; The second evaluation module is used to calculate the value of the first ciphertext polynomial on the second identification set with the data provider to obtain a second fragment of the dimensional feature corresponding to the second identification set.

16. 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 13 are implemented.

17. 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 13.

18. 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 13 are implemented.