CN112580064B - Data processing method and device and data processing device - Google Patents

Data processing method and device and data processing device Download PDF

Info

Publication number
CN112580064B
CN112580064B CN201910927870.6A CN201910927870A CN112580064B CN 112580064 B CN112580064 B CN 112580064B CN 201910927870 A CN201910927870 A CN 201910927870A CN 112580064 B CN112580064 B CN 112580064B
Authority
CN
China
Prior art keywords
ciphertext
ciphertext data
data
calculation
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910927870.6A
Other languages
Chinese (zh)
Other versions
CN112580064A (en
Inventor
何旭
王蜀洪
王国赛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huakong Tsingjiao Information Technology Beijing Co Ltd
Original Assignee
Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huakong Tsingjiao Information Technology Beijing Co Ltd filed Critical Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority to CN201910927870.6A priority Critical patent/CN112580064B/en
Publication of CN112580064A publication Critical patent/CN112580064A/en
Application granted granted Critical
Publication of CN112580064B publication Critical patent/CN112580064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention provides a data processing method and device and a device for data processing. The method comprises the following steps: generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation; performing ciphertext-based computations on the operation object. The calculation operation in the embodiment of the invention can be ciphertext-based calculation operation, and in the ciphertext-based calculation process, data plaintext is not exposed, so that the information security can be ensured. In addition, the embodiment of the invention can convert the operation process of respectively executing the same calculation on at least two ciphertext data into the operation process of executing one calculation on the operation object, and in the calculation process based on the ciphertext, not only can the calculation cost be reduced, but also the communication cost among the calculation nodes can be greatly reduced, and further, the calculation efficiency can be improved.

Description

Data processing method and device and data processing device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, and an apparatus for data processing.
Background
At present, for the consideration of information security, data to be transmitted is usually protected by encryption, for example, in the process of transmitting data between servers, between terminals, and between a terminal and a server, data is encrypted into a ciphertext and then the ciphertext is transmitted, so as to prevent important information from leaking and causing loss to individuals or enterprises.
However, the current encryption protection strategy is usually limited to the process of data transmission or data storage, and when data is calculated, the ciphertext of the data needs to be decrypted to obtain the plaintext of the data, and then corresponding calculation operation is performed on the plaintext. Therefore, the hidden danger of information leakage can be brought, and the information safety can not be ensured.
Disclosure of Invention
Embodiments of the present invention provide a data processing method and apparatus, and an apparatus for data processing, which can perform calculation on data based on ciphertext data, and can improve the calculation efficiency of ciphertext data on the basis of ensuring information security.
In order to solve the above problem, an embodiment of the present invention discloses a data processing method, where the method includes:
generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operation object.
In another aspect, an embodiment of the present invention discloses a data processing apparatus, where the apparatus includes:
the object generation module is used for generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation;
and the object calculation module is used for executing calculation based on the ciphertext on the operation object.
In yet another aspect, an embodiment of the present invention discloses an apparatus for data processing, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors includes instructions for:
generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operation object.
In yet another aspect, an embodiment of the invention discloses a machine-readable medium having stored thereon instructions, which, when executed by one or more processors, cause an apparatus to perform a data processing method as described in one or more of the preceding.
The embodiment of the invention has the following advantages:
firstly, generating an operation object containing ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation; ciphertext-based computations are then performed on the operands. The calculation operation in the embodiment of the invention can be ciphertext-based calculation operation, and in the ciphertext-based calculation process, data plaintext is not exposed, so that the information security can be ensured. In addition, the embodiment of the invention can convert the operation process of respectively executing the same calculation on at least two ciphertext data into the operation process of executing one calculation on the operation object, and in the calculation process based on the ciphertext, not only can the calculation cost be reduced, but also the communication cost among the calculation nodes can be greatly reduced, and further, the calculation efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of the steps of one embodiment of a data processing method of the present invention;
FIG. 2 is a block diagram of an embodiment of a data processing apparatus according to the present invention;
FIG. 3 is a block diagram of an apparatus 800 for data processing of the present invention; and
fig. 4 is a schematic diagram of a server in some embodiments of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this embodiment of the present invention, a device for executing the data processing method may provide a multi-party secure computing service, and the multi-party secure computing may be abstractly understood as: the two parties respectively have respective private data, and under the condition that the respective private data are not leaked, the result about the public function can be calculated; when the whole calculation is finished, only the calculation result is known to both sides, and both sides do not know the corresponding data and the intermediate data in the calculation process. Wherein the common function may implement a variety of computational functions such as addition, subtraction, multiplication, division, and the like; and at least one of the private data of the two parties is the ciphertext, so that the calculation between the ciphertext and the ciphertext can be carried out, and the calculation between the ciphertext and the plaintext can also be carried out. The scheme of the invention is realized on the basis of realizing the calculation based on the ciphertext, and the calculation method based on the ciphertext can refer to the realization scheme introduced in the application number 201910252632 of the applicant, and is not described in detail herein.
Method embodiment
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a data processing method according to the present invention is shown, which may specifically include the following steps:
step 101, generating an operation object containing ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
and 102, performing calculation based on the ciphertext on the operation object.
In the embodiment of the invention, the calculation can be multi-party safe calculation based on the ciphertext, in the calculation process based on the ciphertext, the data participating in the calculation comprises ciphertext data, and an intermediate result generated in the calculation process and a final calculation result can also be the ciphertext data.
In an alternative embodiment of the present invention, the ciphertext-based computation may be performed by at least two of the four compute nodes that communicate with other compute nodes participating in the ciphertext computation based on a multi-party secure computing protocol to perform the computation task.
In the embodiment of the present invention, a multi-party secure computing task may be allocated to four computing nodes to complete the four computing nodes in cooperation, which are respectively referred to as S1, S2, sa, and Sb. For part of multi-party safe computing tasks, only two computing nodes are needed to complete the tasks in a cooperation mode, only two computing nodes S1 and S2 are needed to participate, and for example, addition computing only needs two computing nodes to perform computing. The scheme of the invention does not limit the number of the computing nodes.
The calculation is used for data processing of the ciphertext data. In some examples, the ciphertext data is a private data, and the technician stores a program containing a business logic for processing the private data in the task management platform in advance, wherein the business logic describes a processing process of the private data through a computer program language, and the processing process can contain one or more computing tasks. The business logic refers to a process that a technician performs data processing on private data by using one or more computing tasks and obtains the private data according to a natural law. For example, one business logic comprises: and (3) confirming the evaluation process of the repayment capacity of the user A by utilizing the bank deposit quantity, the bank loan quantity, the bank repayment history record and the like of the user A in the banks B1 and B2. As another example, a business logic includes: and providing a distance prompting flow of distance and route information between P1 and P2 to the terminal equipment held by the user P1 by using the current position information of the users P1 and P2. The scheme of the invention is suitable for any scene of calculation based on the ciphertext. The method comprises the scenes of fusion calculation and the like of the private data.
In an optional embodiment of the present invention, the ciphertext data is obtained by performing a decentralized processing on plaintext data, where the decentralized processing includes: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments, and dispersedly storing the at least two ciphertext fragments in at least two storage nodes.
In order to ensure the security of information, the data participating in the multi-party security computing task may be ciphertext data, and the ciphertext data is obtained by encrypting plaintext data. For example, as for the plaintext data x, ciphertext data x ' is obtained through encryption processing, if the ciphertext data x ' is leaked, x ' may be decrypted to recover the plaintext data x, and the plaintext data x is leaked.
In order to avoid the above situation, the embodiments of the present invention may perform a distributed process on plaintext data. The distributed processing is used for encrypting and storing data in a distributed mode, so that the risk that all ciphertext data are stored in the same computing node to cause data leakage is reduced. Specifically, the plaintext data may be sliced to obtain at least two ciphertext slices.
The embodiment of the invention can utilize the encryption algorithm to carry out the fragmentation processing on the plaintext data to obtain at least two ciphertext fragments. For example, for plaintext data x, an encryption algorithm may be used to perform fragmentation processing on the plaintext data x to obtain two ciphertext fragments x1 and x2, and only by obtaining x1 and x2 at the same time, the plaintext data x may be obtained through decryption.
In the ciphertext-based calculation process, it may happen that the same calculation is performed on at least two pieces of ciphertext data, for example, a square root calculation is performed on 300 pieces of ciphertext data; alternatively, the calculation of exponentiation is performed on each of the 500 pieces of ciphertext data. However, the calculation of one ciphertext data requires four calculation nodes to be completed through at least one round of communication, and if the same calculation is performed on n (n is a positive integer greater than or equal to 2) ciphertext data in sequence, the calculation needs four calculation nodes to be completed through at least n rounds of communication, which results in low calculation efficiency.
The core idea of the invention is to generate an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation, and convert an operation process of respectively performing the same calculation on the at least two ciphertext data into an operation process of performing one calculation on the operation object, so as to improve the calculation efficiency.
In an optional embodiment of the present invention, the step 101, according to at least two ciphertext data to be subjected to the same computation, generates an operation object including the ciphertext data, and specifically may include:
and generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
The embodiment of the invention can improve the calculation efficiency of executing the same calculation on a plurality of ciphertext data by reducing the calculation objects in the calculation process. Specifically, the operation objects including the ciphertext data may be generated according to at least two pieces of ciphertext data to be subjected to the same calculation, and the number of generated operation objects is less than the number of ciphertext data.
For example, for 10 pieces of ciphertext data a1, a2, …, a10 to be subjected to the same calculation, operation objects containing these 10 pieces of ciphertext data may be generated, and the number of operation objects is less than 10. In a preferred embodiment, an operation object is generated according to the 10 ciphertext data, and the generated operation object comprises the 10 ciphertext data; in another example, 3 operands are generated based on the 10 ciphertext data: d1, D2, D3, D1 including ciphertext data a1, a2, a3, a4, D2 including ciphertext data a5, a6, a7, D3 including ciphertext data a8, a9, a10. It can be seen that the 3 operation objects include the above 10 ciphertext data, and therefore, the above operation of performing the same calculation on the 10 ciphertext data may be converted into an operation of performing the same calculation on the 3 operation objects. Therefore, the operation process that 10 times of identical ciphertext calculation needs to be executed originally can be reduced to the operation process that 3 times of identical ciphertext calculation needs to be executed, the calculation times can be reduced, and the calculation efficiency is improved.
In an optional embodiment of the present invention, the step 102 of executing a ciphertext-based calculation operation on the operation object may specifically include: and performing ciphertext calculation aiming at the operation object based on the communication of the multi-party secure calculation protocol and other calculation nodes participating in the ciphertext calculation.
In the ciphertext-based computation process, the time overhead mainly comes from the computation overhead and the communication overhead between the computation nodes. The embodiment of the invention converts N ciphertext data which need to execute the same calculation into one operation object, converts the respective sequential calculation process of the N ciphertext data into a one-time calculation process of only one operation object, and the four calculation nodes execute the calculation based on the ciphertext on one operation object by only one round of communication.
In an optional embodiment of the present invention, the step 101, according to at least two ciphertext data to be subjected to the same computation, generates an operation object including the ciphertext data, and specifically may include:
s11, organizing the at least two ciphertext data as elements in an array to obtain the array;
and S12, taking the array as a generated operation object.
In the embodiment of the present invention, the operation object may be an array. According to the embodiment of the invention, an array containing at least two ciphertext data is generated according to at least two ciphertext data to be subjected to the same calculation, and then the calculation based on the ciphertext is performed on the array.
For example, n ciphertext data to be subjected to the same calculation include: a1 and a2 … an, if it is assumed that the n ciphertext data need to be subjected to calculation of first calculating the reciprocal and then calculating the cube root, if each ciphertext data needs to be subjected to calculation of first calculating the reciprocal and then calculating the cube root twice, the n ciphertext data need to be subjected to calculation of 2n times.
In the embodiment of the present invention, if the process of executing the same calculation on the n pieces of ciphertext data does not limit the calculation order, the n pieces of ciphertext data may be used as elements in an array, the array may be organized to obtain an array, for example, a = [ a1, a2 … an ], and the array may be used as a generated operation object, and then a calculation of calculating the reciprocal first and then calculating the cubic root may be performed on the array, where the number of calculation objects is reduced from n to 1, and therefore, 2n calculation operations on the n pieces of ciphertext data are reduced to 2 calculation operations, and the calculation efficiency may be greatly improved. If the process of executing the same calculation on the n pieces of ciphertext data has a limitation on the calculation order, the elements of the array may be formed according to the limited order.
It can be understood that the above-mentioned array containing at least two ciphertext data to be subjected to the same calculation is used as an operation object, and is only an application example of the present invention, and the embodiment of the present invention does not limit the specific form of the operation object. For example, the n ciphertext data may be organized to obtain a linked list. For another example, if the process of executing the same computation on the n pieces of ciphertext data has a limitation on the computation order, a queue or the like may be generated by using the n pieces of ciphertext data as elements in the queue according to the computation order.
In an optional embodiment of the present invention, the step 101, according to at least two ciphertext data to be subjected to the same computation, generates an operation object including the ciphertext data, and specifically may include:
s21, determining the order of magnitude of the ciphertext data;
and step S22, generating an operation object by using the ciphertext data with the same order of magnitude.
In the embodiment of the present invention, the same calculation to be performed on the at least two pieces of ciphertext data may include square root calculation, reciprocal calculation, exponential calculation, logarithm calculation, and the like. The calculations of square root, reciprocal, etc. can be solved by Newton's method, which is a method proposed by Newton in the 17 th century to approximately solve equations in real and complex fields.
Specifically, the newton iteration method is to perform the calculation of the corresponding number of iterations on the data to be calculated according to a given estimated value. Common calculations using newton's iteration methods include reciprocal and square root calculations. Taking reciprocal calculation as an example, the calculation expression may be:
reciprocal(x,appro,time) (1)
wherein, the apro is an estimated value, the x is data to be calculated, and the time is iteration times. The calculation process of the above calculation expression (1) is a process of performing time iterations according to the estimated value appro. The estimated value needs to be less than 1/x, and the closer the estimated value is, the fewer the iteration times are, the higher the calculation efficiency is.
However, for ciphertext data, since the order of magnitude of the ciphertext data cannot be intuitively known, a reasonable prediction value of the ciphertext data cannot be directly obtained, a smaller prediction value needs to be set for each ciphertext data, and a higher iteration number needs to be set in order to meet the accuracy requirement of a calculation result, so that the problem of lower calculation efficiency exists.
In order to solve the above problems, for ciphertext data that needs to be calculated by a newton iteration method, the embodiment of the present invention may determine the order of magnitude of the ciphertext data first, and obtain a reasonable estimated value according to the determined order of magnitude, so as to reduce the number of iterations, and further effectively improve the efficiency of ciphertext calculation.
Further, in the case that the number of ciphertext data is multiple, after the order of magnitude of the ciphertext data is determined, the ciphertext data of the same order of magnitude may be generated into an operation object, and then a pre-estimation value corresponding to the operation object may be determined according to the order of magnitude corresponding to the operation object, and finally, a newton's iteration method calculation operation based on a ciphertext may be performed on the operation object according to the pre-estimation value, so as to obtain a privacy calculation result.
In an optional embodiment of the present invention, the step S21 of determining the order of magnitude of the ciphertext data may specifically include:
s31, constructing a first array according to a preset array magnitude range; the first array comprises division points for dividing the preset magnitude range into different intervals;
step S32, performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
step S33, converting the result smaller than 1 in the first result into a first ciphertext corresponding to a value 1, and converting the result larger than 1 in the first result into a second ciphertext corresponding to a value 0, so as to obtain a second array composed of the first ciphertext and the second ciphertext;
step S34, carrying out privacy subtraction calculation on the former element and the adjacent latter element in the second array to obtain a third array containing each subtraction calculation difference value;
and step S35, performing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
Wherein the preset order range refers to the order range supported by the system based on the ciphertext calculation, for example, the order range supported by the system is 10 -9 ~10 9 Then, a first array may be constructed according to the preset magnitude range, where the first array includes division points that divide the preset magnitude range into different intervals.
Specifically, an order of magnitude may be taken from each order of magnitude within the preset order of magnitude range, respectively, to constitute the first array. For example, the first array may be: array1= [ a1, a2 … an]In a preset order of magnitude range 10 -9 ~10 9 For example, then array1= [10 = -9 ,10 -8 ,10 -7 …10 8 ,10 9 ]. It should be noted that, in the embodiment of the present invention, the order range supported by the system is plaintext data.
Then, step S32 is executed to perform multiplication calculation on the first array and the operand, so as to obtain a first result. Assuming that the ciphertext data is x, performing a multiplication operation on the first array1 and the ciphertext data x, that is, performing a ciphertext-based multiplication operation on each element in the first array1 and the ciphertext data x to obtain a first result.
Step S33 is executed to convert the result smaller than 1 in the first result into a first ciphertext corresponding to a value 1, and convert the result larger than 1 in the first result into a second ciphertext corresponding to a value 0, so as to obtain a second array composed of the first ciphertext and the second ciphertext.
Specifically, cipher-text-based multiplication calculation is performed on each element in the first array1 and cipher-text data x, privacy comparison is performed on each product with 1, if the current product is smaller than 1, the current product is converted into a first cipher-text corresponding to a numerical value 1, if the current product is larger than 1, the current product is converted into a second cipher-text corresponding to a numerical value 0, and finally, a second array consisting of the first cipher-text and the second cipher-text can be obtained.
In an optional embodiment of the present invention, before converting the result smaller than 1 in the first result into the first ciphertext corresponding to the value 1 and converting the result greater than 1 in the first result into the second ciphertext corresponding to the value 0, in step S33, the method may further include:
and carrying out privacy comparison on the result value in the first result and the value 1 to obtain a privacy comparison result.
The privacy comparison refers to comparing the sizes of the two ciphertext data, and the ciphertext data is not required to be restored into plaintext data in the comparison process.
In an optional embodiment of the present invention, the privacy comparing the result value in the first result with the value 1 to obtain a privacy comparison result specifically may include:
s41, performing subtraction calculation on the result numerical value and the numerical value 1 to obtain a subtraction calculation result;
step S42, performing bit extraction calculation on the subtraction calculation result to obtain a bit extraction calculation result;
and S43, according to the bit extraction calculation result, determining the privacy comparison result of the result value and the value 1.
The compute nodes in embodiments of the present invention may be used to perform compute tasks based on input data, including but not limited to: digital computation processes such as addition, subtraction, multiplication and division, and logical computation of AND, OR and NOT, etc. The input data may be ciphertext fragments obtained from each storage node.
In the embodiment of the present invention, the comparing calculation task of the two input data A1 and A3 may be converted into the subtracting calculation task of (A1-A3) and the bit extracting calculation task of extracting the highest value in the calculation result of the binary representation (A1-A3).
For example, a part of the four computing nodes may execute a subtraction computing task to obtain subtraction computing results held by the part of the four computing nodes, and then use the subtraction computing results held by the part of the four computing nodes as input data of the bit extraction computing task to perform highest bit extraction by using data exchanged once (k = 1) bit positions to obtain a bit extraction computing result. The result of the bit extraction calculation can be used as the result of the privacy comparison of A1 and A3.
The bit extraction calculation process may specifically be as follows: the four computing nodes obtain respective supported computing results by utilizing data interaction of k rounds of 1-bit replacement data, wherein the computing results are used for extracting binary bits in the input data X; and k is the binary digit number to be extracted corresponding to the input data X in the calculation task. Here, the four computing nodes generate intermediate data (1 bit) including a random number capable of canceling 1 bit by performing bit computation locally, and obtain a computation result through data interaction of the intermediate data of k rounds.
It should be noted that the subtraction calculation and the bit extraction calculation are both performed on the basis of ciphertext data, and both the obtained subtraction calculation result and the obtained bit extraction calculation result are ciphertext data, so that no plaintext data appears in the privacy comparison process, and the information security can be ensured.
The second array is composed of a first ciphertext with a value of 1 and a second ciphertext with a value of 0, and since the predicted value apro needs to satisfy the condition that apro is less than 1/x, the result of multiplying the ciphertext data x by apro needs to satisfy less than 1, it can be known that, in the second array, an element in array1 corresponding to a ciphertext with a value of 1 adjacent to the value of 0 is the predicted value to be determined, because the value is closest to 1/x.
To further determine which of the elements in the second array is ciphertext for the value 1 adjacent to the value 0, steps S34 and S35 may be performed.
The elements of the second array2 only contain the value 0 or the value 1, and the first half and the second half of the second array2 are both 1 and 0. To obtain the position of the last value 1 in the second array2, i.e. the position of the value 1 adjacent to the value 0, a subtraction can be performed between the previous element and the next element in the second array2 to obtain a third array3. The third array3 only contains one element with a value of 1, and the values of the other elements are all 0.
Specifically, an inner product calculation may be performed on the third array and the first array to obtain an inner product calculation result, and the inner product calculation result may be used as an order of magnitude corresponding to the ciphertext data.
After obtaining the third array3, an inner product calculation may be performed on the third array3 and the first array1 to obtain an inner product calculation result. Because the inner product operation of the two arrays is to multiply the numerical values of the corresponding positions of the two arrays and then sum, and the numerical value of only one position in the third array3 is 1, and the numerical values of other positions are all 0, the inner product calculation result obtained after the inner product calculation is performed on the first array1 and the third array3 is the element of the position corresponding to the numerical value 1 in the third array3 in the first array1, namely the order of magnitude required to be determined.
It is to be understood that the embodiments of the present invention are applicable to all computing operations that require computation using estimated values, for example, besides newton iterative computing operations, the embodiments of the present invention are also applicable to computing operations such as a ciphertext-based taylor expansion method.
In an optional embodiment of the present invention, after the step S21 determines the order of magnitude of the ciphertext data, the method may further include:
step S51, determining the magnitude as a scaling coefficient;
and S52, carrying out scaling operation on the ciphertext data according to the scaling coefficient to enable the ciphertext data to meet the requirement of a numerical range.
Taking logarithm calculation logx as an example, the numerical range requirement of x in logarithm calculation is 0< -x < -1, assuming that x is ciphertext data with a numerical value 13, performing scaling operation on the ciphertext data according to the determined scaling coefficient of the ciphertext data to enable the ciphertext data to meet the numerical range requirement of logarithm calculation, and then performing logarithm calculation on the scaled ciphertext data.
In an optional embodiment of the present invention, the scaling operation on the ciphertext data may specifically include: and performing multiplication calculation on the scaling coefficient corresponding to the ciphertext data and the ciphertext data.
In the above example, it is necessary to perform logx calculation, where x is ciphertext data of a value 13. According to the above steps S31 to S35, the order of magnitude of the ciphertext data may be determined, and the order of magnitude may be determined as a scaling factor. Specifically, assume that the order of magnitude range supported by the system is 10 -3 ~10 3 Then step S31 is executed to construct a first array1= [10 = -3 ,10 -2 ,10 -1 ,10 0 ,10 1 ,10 2 ,10 3 ](ii) a By performing steps S32 and S33, a second array2= [1,1,0,0,0,0,0 ] can be obtained](ii) a Step S34 is executed to obtain a third array3= [0,1,0,0,0,0,0 =](ii) a Step S35 is executed, and the scaling factor corresponding to the ciphertext data is obtained as follows: array3 · array =10 -2 (ii) a The ciphertext data may be scaled by multiplying the scaling factor with the ciphertext data, specifically, by 13 × 10 -2 =0.13, the ciphertext data obtained after scaling is the ciphertext data with the numerical value of 0.13, and the numerical value range requirement of logarithmic computation can be met (0)<0.13<1) Accordingly, a logarithmic calculation can be performed on the ciphertext data after scaling.
To sum up, the embodiment of the present invention first generates an operation object including ciphertext data according to at least two ciphertext data to be subjected to the same computation; ciphertext-based computations are then performed on the operands. Therefore, the embodiment of the invention can convert the operation process of respectively executing the same calculation on at least two ciphertext data into the operation process of executing one calculation on the operation object, and in the calculation process based on the ciphertext, not only can the calculation cost be reduced, but also the communication cost among the calculation nodes can be greatly reduced, and further the calculation efficiency can be improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Device embodiment
Referring to fig. 2, a block diagram of a data processing apparatus according to an embodiment of the present invention is shown, where the apparatus may specifically include:
an object generating module 201, configured to generate an operation object including ciphertext data according to at least two pieces of ciphertext data to be subjected to the same computation;
an object computation module 202, configured to perform ciphertext-based computation on the operation object.
Optionally, the object generating module 201 may specifically include:
the element determining submodule is used for taking the at least two ciphertext data as elements in an array and organizing the elements in a disordered form to obtain the array;
and the first generation submodule is used for taking the array as a generated operation object.
Optionally, the object generating module 201 may specifically include:
and the second generation submodule is used for generating operation objects less than the number of the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation.
Optionally, the object generating module 201 may specifically include:
the order-magnitude determining submodule is used for determining the order magnitude of the ciphertext data;
and the third generation submodule is used for generating the ciphertext data of the same order of magnitude into an operation object.
Optionally, the apparatus may further include:
a coefficient determination module for determining the magnitude as a scaling coefficient;
and the data scaling module is used for scaling the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
Optionally, the order-magnitude determining sub-module may specifically include:
the array construction unit is used for constructing a first array according to a preset magnitude range; the first array comprises division points for dividing the preset numerical range into different intervals;
the first calculation unit is used for performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
a result conversion unit, configured to convert a result smaller than 1 in the first result into a first ciphertext corresponding to a value 1, and convert a result larger than 1 in the first result into a second ciphertext corresponding to a value 0, so as to obtain a second array composed of the first ciphertext and the second ciphertext;
the second calculation unit is used for executing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and the third calculation unit is used for executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
Optionally, the data scaling module is specifically configured to perform multiplication on a scaling coefficient corresponding to the ciphertext data and the ciphertext data.
Optionally, the object computation module includes four computation nodes, at least two computation nodes of the four computation nodes execute the ciphertext-based computation, and the at least two computation nodes are specifically configured to: and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
Optionally, the apparatus may further include: the distributed processing module is used for carrying out distributed processing on plaintext data to obtain the ciphertext data; the decentralized processing module is specifically configured to: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
With regard to the apparatus 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 described in detail here.
An embodiment of the present invention provides an apparatus for data processing, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for: generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation; performing ciphertext-based computations on the operation object.
Fig. 3 is a block diagram illustrating an apparatus 800 for data processing in accordance with an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a Microphone (MIC) configured to receive external audio signals when apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice information processing mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 4 is a schematic diagram of a server in some embodiments of the invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
A non-transitory computer-readable storage medium in which instructions, when executed by a processor of an apparatus (server or terminal), enable the apparatus to perform the data processing method shown in fig. 1.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an apparatus (server or terminal), enable the apparatus to perform a data processing method, the method comprising: generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation; performing ciphertext-based computations on the operation object.
The embodiment of the invention discloses A1 and a data processing method, which comprises the following steps:
generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operation object.
A2, according to the method described in A1, the step of generating an operation object including ciphertext data according to at least two ciphertext data to be subjected to the same calculation includes:
taking the at least two ciphertext data as elements in an array, and organizing according to a disordered form to obtain the array;
and taking the array as a generated operation object.
A3, according to the method described in A1, the step of generating an operation object including ciphertext data according to at least two ciphertext data to be subjected to the same calculation includes:
and generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
A4, according to the method of A1, the step of generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation includes:
determining an order of magnitude of the ciphertext data;
and generating an operation object by using the ciphertext data of the same order of magnitude.
A5, according to the method described in A4, after the order of magnitude of the ciphertext data is determined, the method further includes:
determining the order of magnitude as a scaling factor; and carrying out scaling operation on the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
A6, according to the method described in A5, the step of determining the order of magnitude of the ciphertext data includes:
constructing a first array according to a preset magnitude range; the first array comprises division points for dividing the preset numerical range into different intervals;
performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
converting a result smaller than 1 in the first result into a first ciphertext corresponding to a numerical value 1, and converting a result larger than 1 in the first result into a second ciphertext corresponding to a numerical value 0, so as to obtain a second array consisting of the first ciphertext and the second ciphertext;
performing private subtraction calculation on the former element and the adjacent latter element in the second array to obtain a third array containing each subtraction calculation difference value;
and executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
A7, according to the method described in A6, the step of performing scaling operation on the ciphertext data includes:
and performing multiplication calculation on the scaling coefficient corresponding to the ciphertext data and the ciphertext data.
A8, performing the ciphertext-based computation by at least two of the four compute nodes according to the method of any of A1 to A7, the performing the ciphertext-based computation on the operand including:
and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
A9, according to the method described in A1, the ciphertext data is obtained by performing dispersion processing on plaintext data, and the dispersion processing includes: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
The embodiment of the invention discloses B10, a data processing device, comprising:
the object generation module is used for generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
and the object calculation module is used for executing calculation based on the ciphertext on the operation object.
The apparatus of B11, the object generation module, comprising:
the element determining submodule is used for taking the at least two ciphertext data as elements in an array and organizing the elements in a disordered form to obtain the array;
and the first generation submodule is used for taking the array as a generated operation object.
The apparatus of B12, the object generation module, comprising:
and the second generation submodule is used for generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
B13, the apparatus of B10, the object generation module, comprising:
the order-magnitude determining submodule is used for determining the order magnitude of the ciphertext data;
and the third generation submodule is used for generating the ciphertext data of the same order of magnitude into an operation object.
B14, the device according to B13, further comprising:
a coefficient determination module for determining the magnitude as a scaling coefficient;
and the data scaling module is used for scaling the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
B15, the apparatus according to B14, the order determination submodule includes:
the array construction unit is used for constructing a first array according to a preset magnitude range; the first array comprises division points for dividing the preset numerical range into different intervals;
a first calculation unit, configured to perform multiplication calculation on the first array and the ciphertext data to obtain a first result;
a result conversion unit, configured to convert a result smaller than 1 in the first result into a first ciphertext corresponding to a value 1, and convert a result larger than 1 in the first result into a second ciphertext corresponding to a value 0, so as to obtain a second array composed of the first ciphertext and the second ciphertext;
the second calculation unit is used for executing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and the third calculation unit is used for executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
B16, the apparatus according to B15, and the data scaling module are specifically configured to perform multiplication on the ciphertext data and a scaling coefficient corresponding to the ciphertext data.
B17, the apparatus according to any one of B10 to B16, wherein the object computation module includes four computation nodes, and at least two computation nodes of the four computation nodes execute the ciphertext-based computation, and the at least two computation nodes are specifically configured to: and communicating with other computing nodes participating in ciphertext computation based on the multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
B18, the device according to B10, further comprising: the distributed processing module is used for carrying out distributed processing on plaintext data to obtain the ciphertext data; the decentralized processing module is specifically configured to: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
The embodiment of the invention discloses C19, a device for data processing, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the one or more processors and comprise instructions for:
generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operation object.
C20, according to the apparatus described in C19, the step of generating an operation object including ciphertext data according to at least two pieces of ciphertext data to be subjected to the same computation includes:
taking the at least two ciphertext data as elements in an array, and organizing the elements according to a disordered form to obtain the array;
and taking the array as a generated operation object.
C21, the step of generating an operation object including ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation according to the apparatus described in C19, includes:
and generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
C22, according to the apparatus described in C19, the step of generating an operation object including ciphertext data according to at least two pieces of ciphertext data to be subjected to the same computation includes:
determining an order of magnitude of the ciphertext data;
and generating an operation object by using the ciphertext data of the same order of magnitude.
C23, the device of C22, the device also configured to execute the one or more programs by the one or more processors including instructions for:
determining the order of magnitude as a scaling factor;
and carrying out scaling operation on the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
C24, according to the apparatus of C23, the step of determining the order of magnitude of the ciphertext data includes:
constructing a first array according to a preset number order range; the first array comprises division points for dividing the preset numerical range into different intervals;
performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
converting a result smaller than 1 in the first result into a first ciphertext corresponding to a numerical value 1, and converting a result larger than 1 in the first result into a second ciphertext corresponding to a numerical value 0, so as to obtain a second array consisting of the first ciphertext and the second ciphertext;
performing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
C25, according to the apparatus of C24, the step of performing scaling operation on the ciphertext data includes:
and performing multiplication calculation on the scaling coefficient corresponding to the ciphertext data and the ciphertext data.
C26, the apparatus according to any one of C19 to C25, the ciphertext-based computation being performed by at least two of four compute nodes, the performing the ciphertext-based computation on the operand comprising:
and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
C27, the apparatus according to C19, wherein the ciphertext data is obtained by performing a hash process on plaintext data, and the hash process includes: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
The embodiment of the invention discloses a D28 machine readable medium, which stores instructions that when executed by one or more processors, make the device execute the data processing method as described in one or more of A1 to A9.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
The data processing method, the data processing apparatus and the apparatus for data processing provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (25)

1. A method of data processing, the method comprising:
generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operands;
the step of generating an operation object including ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation includes:
determining an order of magnitude of the ciphertext data;
and generating an operation object by using the ciphertext data of the same order of magnitude.
2. The method according to claim 1, wherein the step of generating an operation object containing ciphertext data from at least two pieces of ciphertext data to be subjected to the same computation comprises:
taking the at least two ciphertext data as elements in an array, and organizing to obtain the array;
and taking the array as a generated operation object.
3. The method according to claim 1, wherein the step of generating an operation object containing ciphertext data from at least two pieces of ciphertext data to be subjected to the same computation comprises:
and generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
4. The method of claim 1, wherein after determining the order of magnitude of the ciphertext data, the method further comprises:
determining the order of magnitude as a scaling factor;
and carrying out scaling operation on the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
5. The method of claim 4, wherein the step of determining the order of magnitude of the ciphertext data comprises:
constructing a first array according to a preset number order range; the first array comprises division points for dividing the preset numerical range into different intervals;
performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
converting a result smaller than 1 in the first result into a first ciphertext corresponding to a numerical value 1, and converting a result larger than 1 in the first result into a second ciphertext corresponding to a numerical value 0, so as to obtain a second array consisting of the first ciphertext and the second ciphertext;
performing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
6. The method of claim 5, wherein the step of scaling the ciphertext data comprises:
and performing multiplication calculation on the scaling coefficient corresponding to the ciphertext data and the ciphertext data.
7. The method of any of claims 1 to 6, wherein the ciphertext-based computation is performed by at least two of four compute nodes, and wherein performing the ciphertext-based computation on the operand comprises:
and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
8. The method according to claim 1, wherein the ciphertext data is obtained by performing a scatter process on plaintext data, the scatter process comprising: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
9. A data processing apparatus, characterized in that the apparatus comprises:
the object generation module is used for generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation;
an object calculation module for performing ciphertext-based calculation on the operation object;
wherein the object generation module comprises:
the order-magnitude determining submodule is used for determining the order magnitude of the ciphertext data;
and the third generation submodule is used for generating the ciphertext data of the same order of magnitude into an operation object.
10. The apparatus of claim 9, wherein the object generation module comprises:
the element determining submodule is used for taking the at least two ciphertext data as elements in an array and organizing the elements in a disordered form to obtain the array;
and the first generation submodule is used for taking the array as a generated operation object.
11. The apparatus of claim 9, wherein the object generation module comprises:
and the second generation submodule is used for generating operation objects less than the number of the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation.
12. The apparatus of claim 9, further comprising:
a coefficient determination module for determining the magnitude as a scaling coefficient;
and the data scaling module is used for scaling the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
13. The apparatus of claim 12, wherein the order of magnitude determination submodule comprises:
the array construction unit is used for constructing a first array according to a preset magnitude range; the first array comprises division points for dividing the preset numerical range into different intervals;
the first calculation unit is used for performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
a result conversion unit, configured to convert a result smaller than 1 in the first result into a first ciphertext corresponding to a value 1, and convert a result larger than 1 in the first result into a second ciphertext corresponding to a value 0, so as to obtain a second array composed of the first ciphertext and the second ciphertext;
the second calculation unit is used for executing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and the third calculation unit is used for executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
14. The apparatus according to claim 13, wherein the data scaling module is specifically configured to perform a multiplication on the ciphertext data and a scaling coefficient corresponding to the ciphertext data.
15. The apparatus according to any one of claims 9 to 14, wherein the object computation module comprises four computation nodes, and wherein the ciphertext-based computation is performed by at least two of the four computation nodes, the at least two computation nodes being specifically configured to: and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
16. The apparatus of claim 9, further comprising: the distributed processing module is used for carrying out distributed processing on plaintext data to obtain the ciphertext data; the decentralized processing module is specifically configured to: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
17. An apparatus for data processing, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs are configured to be executed by the one or more processors include instructions for:
generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation;
performing ciphertext-based computations on the operands;
wherein, the step of generating an operation object containing the ciphertext data according to at least two pieces of ciphertext data to be subjected to the same calculation comprises:
determining an order of magnitude of the ciphertext data;
and generating an operation object by using the ciphertext data of the same order of magnitude.
18. The apparatus according to claim 17, wherein the step of generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation comprises:
taking the at least two ciphertext data as elements in an array, and organizing to obtain the array;
and taking the array as a generated operation object.
19. The apparatus according to claim 17, wherein the step of generating an operation object containing the ciphertext data according to at least two ciphertext data to be subjected to the same calculation comprises:
and generating operation objects less than the number of the ciphertext data according to at least two ciphertext data to be subjected to the same calculation.
20. The apparatus of claim 17, wherein the apparatus is also configured to execute the one or more programs by one or more processors includes instructions for:
determining the order of magnitude as a scaling factor;
and carrying out scaling operation on the ciphertext data according to the scaling coefficient so as to enable the ciphertext data to meet the requirement of a numerical range.
21. The apparatus of claim 20, wherein the step of determining the magnitude of the ciphertext data comprises:
constructing a first array according to a preset number order range; the first array comprises division points for dividing the preset numerical range into different intervals;
performing multiplication calculation on the first array and the ciphertext data to obtain a first result;
converting a result smaller than 1 in the first result into a first ciphertext corresponding to a numerical value 1, and converting a result larger than 1 in the first result into a second ciphertext corresponding to a numerical value 0 to obtain a second array consisting of the first ciphertext and the second ciphertext;
performing privacy subtraction calculation on the previous element and the adjacent next element in the second array to obtain a third array containing each subtraction calculation difference value;
and executing inner product calculation on the third array and the first array to obtain the magnitude corresponding to the ciphertext data.
22. The apparatus of claim 21, wherein the scaling of the ciphertext data comprises:
and performing multiplication calculation on the scaling coefficient corresponding to the ciphertext data and the ciphertext data.
23. The apparatus according to any one of claims 17 to 22, wherein the ciphertext-based computation is performed by at least two of four compute nodes, and wherein performing the ciphertext-based computation on the operand comprises:
and communicating with other computing nodes participating in ciphertext computation based on a multi-party secure computing protocol, and executing the ciphertext computation aiming at the operation object.
24. The apparatus according to claim 17, wherein the ciphertext data is obtained by performing a hash process on plaintext data, the hash process including: and carrying out fragmentation processing on the plaintext data to obtain at least two ciphertext fragments.
25. A machine-readable medium having stored thereon instructions which, when executed by one or more processors, cause an apparatus to perform a data processing method as claimed in one or more of claims 1 to 8.
CN201910927870.6A 2019-09-27 2019-09-27 Data processing method and device and data processing device Active CN112580064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910927870.6A CN112580064B (en) 2019-09-27 2019-09-27 Data processing method and device and data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910927870.6A CN112580064B (en) 2019-09-27 2019-09-27 Data processing method and device and data processing device

Publications (2)

Publication Number Publication Date
CN112580064A CN112580064A (en) 2021-03-30
CN112580064B true CN112580064B (en) 2023-01-13

Family

ID=75110144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910927870.6A Active CN112580064B (en) 2019-09-27 2019-09-27 Data processing method and device and data processing device

Country Status (1)

Country Link
CN (1) CN112580064B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113489752B (en) * 2021-09-07 2021-11-19 华控清交信息科技(北京)有限公司 Bright and ciphertext hybrid computing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986574A (en) * 2014-05-16 2014-08-13 北京航空航天大学 Hierarchical identity-based broadcast encryption method
CN106131801A (en) * 2016-06-30 2016-11-16 成都西可科技有限公司 A kind of based on android system without JA(junction ambient) enciphered data transmission method
CN108830284A (en) * 2018-06-27 2018-11-16 电子科技大学 Image-recognizing method based on ciphertext image grey level histogram vector
CN109241016A (en) * 2018-08-14 2019-01-18 阿里巴巴集团控股有限公司 Secure calculation method and device, electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3228044B1 (en) * 2014-12-03 2019-02-20 Nagravision S.A. Block cryptographic method for encrypting/decrypting messages and cryptographic devices for implementing this method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986574A (en) * 2014-05-16 2014-08-13 北京航空航天大学 Hierarchical identity-based broadcast encryption method
CN106131801A (en) * 2016-06-30 2016-11-16 成都西可科技有限公司 A kind of based on android system without JA(junction ambient) enciphered data transmission method
CN108830284A (en) * 2018-06-27 2018-11-16 电子科技大学 Image-recognizing method based on ciphertext image grey level histogram vector
CN109241016A (en) * 2018-08-14 2019-01-18 阿里巴巴集团控股有限公司 Secure calculation method and device, electronic equipment

Also Published As

Publication number Publication date
CN112580064A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN113315631B (en) Data processing method and device and data processing device
CN113449325B (en) Data processing method and device and data processing device
CN111859035B (en) Data processing method and device
CN112667674B (en) Data processing method and device and data processing device
CN115396100B (en) Careless random disorganizing method and system based on secret sharing
CN112241250B (en) Data processing method and device and data processing device
CN112487415B (en) Method and device for detecting security of computing task
CN112307056A (en) Data processing method and device and data processing device
CN114884645A (en) Privacy calculation method and device and readable storage medium
CN115085912A (en) Ciphertext computing method and device for ciphertext computing
CN117319086B (en) System, method, electronic device and storage medium for inadvertent transmission
CN112464257B (en) Data detection method and device for data detection
CN112861145B (en) Data processing method and device for data processing
CN112580064B (en) Data processing method and device and data processing device
CN112583764B (en) Data processing method and device and data processing device
CN115617897B (en) Data type conversion method and multi-party secure computing system
CN114885038B (en) Encryption protocol conversion method, result acquisition node and privacy calculation node
CN113239389B (en) Data processing method and device and data processing device
CN113779500B (en) Data processing method and device for data processing
CN113779501B (en) Data processing method and device for data processing
CN112468290B (en) Data processing method and device and data processing device
CN112685747B (en) Data processing method and device and data processing device
CN112580063B (en) Data processing method and device and data processing device
CN112668015B (en) Data processing method and device and data processing device
CN116684094B (en) Data processing method, device and system and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant