Data Processing Method, Apparatus, Electronic Device, Storage Medium and Product

By constructing and computing the matrix to calculate the data sharding sorting results, the problem of high traffic in joint analysis and processing of multi-party data is solved, and data privacy protection and secure low traffic processing are achieved.

CN118069742BActive Publication Date: 2025-06-27BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410199683.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-22
Publication Date
2025-06-27
Estimated Expiration
2044-02-22

AI Technical Summary

Technical Problem

In the process of joint analysis and processing of multi-party data, how to reduce the traffic volume in multi-party collaboration while ensuring data privacy protection and security is an urgent issue.

Method used

By obtaining multiple shard data of each data in the data set, building a first matrix and performing matrix operations, a second matrix is ​​obtained, and the shard data sorting result of the data is calculated based on both, and the result is sent to the target party to realize the sorting of data.

Benefits of technology

On the premise of ensuring data privacy protection and security, a round of communication interaction is used to process sharded data, reducing the traffic volume during the collaboration between the computing party.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118069742B_ABST
    Figure CN118069742B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, apparatus, electronic device, storage medium and product. By obtaining multiple shard data of each data in a data set, a first matrix is obtained according to the multiple shard data, matrix operations are performed on the first matrix to obtain a second matrix, a shard data sorting result corresponding to the data set is obtained according to the first matrix and the second matrix, and the shard data sorting result is sent to a target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result. Through the above method, on the premise of ensuring the protection and security of data privacy, the processing of shard data is realized through one-round communication interaction between computing parties, and the communication volume in the process of computing party collaboration is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a data processing method, apparatus, electronic device, storage medium, and product. Background Art

[0002] Users can perform data value mining for multi-party collaboration through a privacy computing service platform on the premise that private original data does not leave the domain.

[0003] In some scenarios, it is usually necessary to perform joint analysis and processing on data from different data owners. In the process of joint analysis and processing of multi-party data, how to reduce the communication volume in the multi-party collaboration process while ensuring data privacy protection and security is an urgent problem to be solved. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose a data processing method, apparatus, electronic device, storage medium, and product to solve or partially solve the above problems.

[0005] Based on the above purpose, in the first aspect of this application, a data processing method is provided, which is applied to a computing party, and the method includes:

[0006] Obtain multiple shard data of each data in the data set, where the data set comes from a data owner;

[0007] Obtain a first matrix according to the multiple shard data;

[0008] Perform matrix operations on the first matrix to obtain a second matrix;

[0009] Obtain a shard data sorting result corresponding to the data set according to the first matrix and the second matrix;

[0010] Send the shard data sorting result to a target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result.

[0011] In the second aspect of this application, a data processing method is provided, which is applied to a data owner, and the method includes:

[0012] Obtain a data set;

[0013] Encode each data in the data set into multiple vectors;

[0014] Split the multiple vectors into multiple shard data;

[0015] Send the multiple shard data to the computing party, so that the computing party obtains a first matrix according to the multiple shard data, performs matrix operations on the first matrix to obtain a second matrix, and obtains a sorting result of the shard data corresponding to the data set according to the first matrix and the second matrix, and sends the sorting result of the shard data to the target party, so that the target party determines the sorting result of the data in the data set according to the sorting result of the shard data.

[0016] In a third aspect of the present application, a data processing device is provided, which is applied to a computing party, and the device includes:

[0017] A first acquisition module, configured to acquire multiple shard data of each data in a data set, and the data set comes from a data owner;

[0018] A first calculation module, configured to obtain a first matrix according to the multiple shard data;

[0019] A second calculation module, configured to perform matrix operations on the first matrix to obtain a second matrix;

[0020] A third calculation module, configured to obtain a sorting result of the shard data corresponding to the data set according to the first matrix and the second matrix;

[0021] A first sending module, configured to send the sorting result of the shard data to the target party, so that the target party determines the sorting result of the data in the data set according to the sorting result of the shard data.

[0022] In a fourth aspect of the present application, a data processing device is provided, which is applied to a data owner, and the device includes:

[0023] A second acquisition module, configured to acquire a data set;

[0024] An encoding module, configured to encode each data in the data set into multiple vectors;

[0025] A splitting module, configured to split the multiple vectors into multiple shard data;

[0026] A second sending module, configured to send the multiple shard data to the computing party, so that the computing party obtains a first matrix according to the multiple shard data, performs matrix operations on the first matrix to obtain a second matrix, and obtains a sorting result of the shard data corresponding to the data set according to the first matrix and the second matrix, and sends the sorting result of the shard data to the target party, so that the target party determines the sorting result of the data in the data set according to the sorting result of the shard data.

[0027] In a fifth aspect of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the first aspect is implemented.

[0028] In a sixth aspect of the present application, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method described in the first aspect.

[0029] In a seventh aspect of the present application, a computer program product is provided, including computer program instructions which, when running on a computer, cause the computer to execute the method described in the first aspect.

[0030] As can be seen from the above, the present application provides a data processing method, apparatus, electronic device, storage medium, and product. By obtaining multiple shard data of each data in a data set, a first matrix is obtained based on the multiple shard data, matrix operations are performed on the first matrix to obtain a second matrix, a shard data sorting result corresponding to the data set is obtained based on the first matrix and the second matrix, and the shard data sorting result is sent to a target party so that the target party can determine the sorting result of the data in the data set according to the shard data sorting result. Through the above method, on the premise of ensuring data privacy protection and security, the computing parties achieve the processing of shard data through one-round communication interaction, reducing the communication volume in the cooperation process of the computing parties. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0032] Figure 1 The figure shows a schematic diagram of an exemplary system according to an embodiment of the present application.

[0033] Figure 2 The figure shows a schematic diagram of an exemplary system according to an embodiment of the present application.

[0034] Figure 3A The figure shows a schematic diagram of an exemplary first shard matrix according to an embodiment of the present application.

[0035] Figure 3B The figure shows a schematic diagram of an exemplary second shard matrix according to an embodiment of the present application.

[0036] Figure 4Shows a schematic diagram of an exemplary calculation method according to an embodiment of the present application.

[0037] Figure 5 Shows a schematic diagram of an exemplary system according to an embodiment of the present application.

[0038] Figure 6A Shows a schematic flowchart of an exemplary data processing method according to an embodiment of the present application.

[0039] Figure 6B Shows a schematic flowchart of an exemplary data processing method according to an embodiment of the present application.

[0040] Figure 7A Shows a schematic flowchart of an exemplary data processing device according to an embodiment of the present application.

[0041] Figure 7B Shows a schematic flowchart of an exemplary data processing device according to an embodiment of the present application.

[0042] Figure 8 Shows a schematic diagram of an exemplary electronic device according to an embodiment of the present application. Detailed implementation manners

[0043] To make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to specific embodiments and the accompanying drawings.

[0044] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be of the ordinary meaning understood by those of ordinary skill in the field to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before this term cover the elements or items listed after this term and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0045] It can be understood that, before using the technical solutions of the various embodiments of the present application, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner and the user's authorization will be obtained.

[0046] For example, when 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 executed 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, an application, a server, or a storage medium that executes the technical solution of this application according to the prompt message.

[0047] As an optional but non-limiting implementation manner, the way of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0048] It can be understood that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manner of this application. Other ways that meet relevant laws and regulations can also be applied to the implementation manner of this application.

[0049] Secure Multi-Party Computation (MPC), also known as Secure Multiparty Computation, is an algorithm for protecting data privacy and security. Secure Multi-Party Computation enables multiple participating parties holding data to perform collaborative computational processing without leaking data privacy.

[0050] Secure Multi-Party Computation includes multiple computing parties. Multiple data owners can send the data owned by each party to multiple computing parties, and the multiple computing parties use the multiple-party data for joint analysis and processing.

[0051] As described in the background art, in the process of joint analysis and processing of multi-party data, how to reduce the communication volume in the multi-party collaboration process while ensuring the protection and security of data privacy is an urgent problem to be solved.

[0052] In view of this, this application provides a data processing method, device, electronic device, storage medium, and product. By obtaining multiple shard data of each data in a data set, a first matrix is obtained according to the multiple shard data, matrix operations are performed on the first matrix to obtain a second matrix, a shard data sorting result corresponding to the data set is obtained according to the first matrix and the second matrix, and the shard data sorting result is sent to a target party so that the target party can determine the sorting result of the data in the data set according to the shard data sorting result. Through the above method, while ensuring the protection and security of data privacy, the computing parties achieve the processing of shard data through one round of communication interaction, reducing the communication volume in the collaboration process of the computing parties.

[0053] Figure 1Shows a schematic diagram of an exemplary system 100 according to an embodiment of the present application.

[0054] As Figure 1 shown, the system 100 may include multiple data owners, and the data owners may be terminal systems composed of terminal devices, servers, and databases. Taking the first data owner 102 and the second data owner 106 included in the system 100 as an example, the first data owner 102 and the second data owner 106 may be individuals, enterprises, universities, governments, or other organizations or entities that maintain data, respectively. The first data owner 102 and the second data owner 106 are generally separated from each other and manage their data independently of the other party.

[0055] The first data owner 102, the second data owner 106, or other target parties may expect to perform joint analysis on the data of the first data owner 102 and the data of the second data owner 106 (for example, sorting multiple data held by the data owners), without disclosing the data of each data owner to the other party. The first data owner 102 and the second data owner 106 may send the data they hold to the computing party 104, and the computing party 104 performs secure computing on the data and returns the computing result to the first data owner 102, the second data owner 106, or other target parties that expect to perform data analysis.

[0056] The computing party 104 may be a privacy computing service platform composed of multiple servers, which performs data computing on the premise of ensuring the protection of data privacy and security.

[0057] Figure 2 Shows a schematic diagram of an exemplary system 200 according to an embodiment of the present application.

[0058] As Figure 2 shown, in the system 200, the computing party 104 may include multiple computing parties, and the multiple computing parties may cooperate to perform secure computing on the data. In some embodiments, the computing party 104 may include three computing parties (the first computing party P0, the second computing party P1, and the third computing party P2). In three-party secure computing, the data owner 202 may send the data to the three computing parties, and the three computing parties cooperate to perform secure computing on the data. It should be noted that the number of data owners 202 may be one or more, and the present application does not limit this. One or more data owners 202 may hold data sets. One data owner holds all n data in the data set, and each data owner among multiple data owners holds a data set, and each data set includes some of the n data.

[0059] Taking the example that a data owner holds all the n data in the data set, the n data can be expressed as where represents the residue class ring. where the addition is defined as integer addition mod N, and the multiplication is defined as integer multiplication mod N. N represents natural numbers. represents the integer ring. A ring refers to a set that defines two operations, addition and multiplication, and forms a commutative group for addition, and the elements other than 0 form a semigroup for multiplication, and multiplication satisfies the distributive law for addition. For the integer ring the addition and multiplication are the addition and multiplication in the usual sense.

[0060] Taking the example that the target party expects to obtain the sorting result of the n data in the data set, in some embodiments, the data owner 202 can encode each data in the data set it owns into multiple vectors, and split the multiple vectors into multiple secret shards (multiple shard data) and send them to the computing party. In some embodiments, the data owner 202 can use one-hot encoding technology to encode the data.

[0061] In one-hot encoding, if a data a has K possible values, then this data can be one-hot encoded, and the encoded vector One-Hot(x) is a K-dimensional vector. In this K-dimensional vector, the a-th bit is 1, and the rest of the bits are 0. Among them, the dimension K of the vector can be determined according to the user's needs.

[0062] For example, taking the example of encoding the data into a 5-dimensional vector, for the data in, the one-hot encoding results are as follows:

[0063] For the data 0, it can be encoded as (1, 0, 0, 0, 0), for the data 1, it can be encoded as (0, 1, 0, 0, 0), for the data 2, it can be encoded as (0, 0, 1, 0, 0), for the data 3, it can be encoded as (0, 0, 0, 1, 0), for the data 4, it can be encoded as (0, 0, 0, 0, 1).

[0064] After encoding the n data in the data set, the data owner 202 can obtain n vectors. In some embodiments, the data owner 202 can use the Replicated Secret Sharing technology to secretly shard each of the n vectors and send them to the computing party.

[0065] In the replicated secret sharing technique, data x is stored in the first computing party P0, the second computing party P1, and the third computing party P2 in the form of secret shards. Data x can be split into the first shard data x0, the second shard data x1, and the third shard data x2, where x = x0 + x1 + x2, and x0, x1, x2 ∈ R, where R represents real numbers.

[0066] For the encoded vectors in the embodiments of the present application, taking the encoding of data 2 as a 5-dimensional vector (0, 0, 1, 0, 0) as an example, the vector (0, 0, 1, 0, 0) can be split into the first shard data (0, 0, 0.2, 0, 0), the second shard data (0, 0, 0.4, 0, 0), and the third shard data (0, 0, 0.4, 0, 0) by using the replicated secret sharing technique.

[0067] After splitting each of the n vectors, the data owner 202 can obtain n first shard data, n second shard data, and n third shard data. The data owner 202 can send the split shard data to the computing party. The computing party P i holds x i , x i+1mod3 , where the value of i can be 1, 2, or 3, and mod represents taking the remainder.

[0068] As Figure 2 shown, in some embodiments, the first computing party P0 can hold the first shard data x0 and the second shard data x1; the second computing party P1 can hold the second shard data x1 and the third shard data x2; the third computing party P2 can hold the first shard data x0 and the third shard data x2.

[0069] After each computing party receives multiple shard data, in some embodiments, it can use the multiple shard data to form a matrix A (for example, the first matrix). The dimension (number of columns) of matrix A is the same as the dimension of the encoded vector of the data, and the number of rows of matrix A is the same as the number of n data. Since the data owner 202 holds multiple data, multiple shard data (for example, multiple first shard data, multiple second shard data, and multiple third shard data) can be obtained after the multiple data are encoded and split. After the data owner 202 sends the multiple shard data to the computing party, each computing party can respectively hold multiple shard data.

[0070] For example, the first computing party P0 can hold multiple first shard data x0 and multiple second shard data x1; the second computing party P1 can hold multiple second shard data x1 and multiple third shard data x2; the third computing party P2 can hold multiple first shard data x0 and multiple third shard data x2.

[0071] Taking the multiple first shard data x0 and multiple second shard data x1 held by the first computing party P0 as an example, the first computing party P0 may hold 6 first shard data and 6 second shard data. In some embodiments, the first computing party P0 may use the multiple first shard data to form a first shard matrix and use the second shard data to form a second shard matrix.

[0072] For example, the 6 first shard data may be 6 vectors (0, 0, 0.2, 0, 0), (0, 0.2, 0, 0, 0), (0.2, 0, 0, 0, 0), (0, 0, 0, 0, 0.2), (0, 0, 0, 0.2, 0), (0, 0, 0.2, 0, 0), and the first shard matrix formed thereby may be as follows:

[0073] (0, 0, 0.2, 0, 0)

[0074] (0, 0.2, 0, 0, 0)

[0075] (0.2, 0, 0, 0, 0)

[0076] (0, 0, 0, 0, 0.2)

[0077] (0, 0, 0, 0.2, 0)

[0078] (0, 0, 0.2, 0, 0).

[0079] The 6 second shard data may be 6 vectors (0, 0, 0.4, 0, 0), (0, 0.4, 0, 0, 0), (0.4, 0, 0, 0, 0), (0, 0, 0, 0, 0.4), (0, 0, 0, 0.4, 0), (0, 0, 0.4, 0, 0), and the second shard matrix formed thereby may be as follows:

[0080] (0, 0, 0.4, 0, 0)

[0081] (0, 0.4, 0, 0, 0)

[0082] (0.4, 0, 0, 0, 0)

[0083] (0, 0, 0, 0, 0.4)

[0084] (0, 0, 0, 0.4, 0)

[0085] (0, 0, 0.4, 0, 0).

[0086] The first computing party P0 may perform matrix operations on matrix A respectively to obtain matrix B (for example, the second matrix). In some embodiments, the first computing party P0 may perform column-first accumulation on the elements in matrix A.

[0087] For example, the first computing party P0 uses the first element of the first column of matrix A as the first element of the first column of matrix B, adds the first and second elements of the first column of matrix A, and uses the resulting value as the second element of the first column of matrix B, and so on.

[0088] After the elements of the first column of matrix A are accumulated, add the value obtained by accumulating the first column of matrix A to the first element of the second column of matrix A, and use the resulting value as the first element of the second column of matrix B.

[0089] For the first sharded matrix and the second sharded matrix, in some embodiments, the first computing party P0 can perform matrix operations on the first sharded matrix to obtain a third sharded matrix, and perform matrix operations on the second sharded matrix to obtain a fourth sharded matrix.

[0090] Figure 3A The figure shows a schematic diagram of an exemplary first sharded matrix according to an embodiment of the present application. Figure 3B The figure shows a schematic diagram of an exemplary second sharded matrix according to an embodiment of the present application.

[0091] Combined Figure 3A and Figure 3B , in some embodiments, when the first computing party P0 accumulates the elements in the first sharded matrix column by column, it can use the first element 0 of the first column in the first sharded matrix as the first element 0 of the first column in the third sharded matrix. Add the first element 0 of the first column in the first sharded matrix and the second element 0 of the first column to obtain a first accumulated value 0. Use the value 0 as the second element 0 of the first column in the third sharded matrix. Add the third element 0.2 of the first column in the first sharded matrix to the first accumulated value 0 to obtain a second accumulated value 0.2. Use the second accumulated value 0.2 as the third element 0.2 of the first column in the third sharded matrix. And so on.

[0092] Thus, the third accumulated value 0.2 can be obtained by accumulating the first column of the first sharded matrix to the 6th element. Use the third accumulated value 0.2 as the 6th element 0.2 of the first column in the third sharded matrix.

[0093] After the elements of the first column of the first sharded matrix are accumulated, add the third accumulated value 0.2 obtained by accumulation to the first element 0 of the second column of the first sharded matrix to obtain a fourth accumulated value 0.2. Use the fourth accumulated value 0.2 as the first element 0.2 of the second column in the third sharded matrix. Add the second element 0.2 of the second column in the first sharded matrix to the fourth accumulated value 0.2 to obtain a fifth accumulated value 0.4. Use the fifth accumulated value 0.4 as the second element 0.4 of the second column in the third sharded matrix. And so on.

[0094] Thus, the sum of the elements in the second column of the first sub - matrix up to the 6th element gives the sixth cumulative value of 0.4. Take the sixth cumulative value of 0.4 as the 6th element 0.4 in the second column of the third sub - matrix.

[0095] After the elements in the second column of the first sub - matrix are all added up, add the obtained sixth cumulative value of 0.4 to the 1st element 0.2 in the third column of the first sub - matrix to get the seventh cumulative value of 0.6. Take the seventh cumulative value of 0.6 as the 1st element 0.6 in the third column of the third sub - matrix. Add the 2nd element 0 in the third column of the first sub - matrix to the seventh cumulative value of 0.6 to get the eighth cumulative value of 0.6. Take the eighth cumulative value of 0.6 as the 2nd element 0.6 in the third column of the third sub - matrix. And so on.

[0096] Thus, the sum of the elements in the third column of the first sub - matrix up to the 6th element gives the ninth cumulative value of 0.8. Take the ninth cumulative value of 0.8 as the 6th element 0.8 in the third column of the third sub - matrix.

[0097] After the elements in the third column of the first sub - matrix are all added up, add the obtained ninth cumulative value of 0.8 to the 1st element 0 in the fourth column of the first sub - matrix to get the tenth cumulative value of 0.8. Take the tenth cumulative value of 0.8 as the 1st element 0.8 in the fourth column of the third sub - matrix. Add the 2nd element 0 in the fourth column of the first sub - matrix to the tenth cumulative value of 0.8 to get the eleventh cumulative value of 0.8. Take the eleventh cumulative value of 0.8 as the 2nd element 0.8 in the fourth column of the third sub - matrix. And so on.

[0098] Thus, the sum of the elements in the fourth column of the first sub - matrix up to the 6th element gives the twelfth cumulative value of 1. Take the twelfth cumulative value of 1 as the 6th element 1 in the fourth column of the third sub - matrix.

[0099] After the elements in the fourth column of the first sub - matrix are all added up, add the obtained twelfth cumulative value of 1 to the 1st element 0 in the fifth column of the first sub - matrix to get the thirteenth cumulative value of 1. Take the thirteenth cumulative value of 1 as the 1st element 1 in the fifth column of the third sub - matrix. Add the 2nd element 0 in the fifth column of the first sub - matrix to the thirteenth cumulative value of 1 to get the fourteenth cumulative value of 1. Take the fourteenth cumulative value of 1 as the 2nd element 1 in the fifth column of the third sub - matrix. And so on.

[0100] Thus, the sum of the elements in the fifth column of the first sub - matrix up to the 6th element gives the fifteenth cumulative value of 1.2. Take the fifteenth cumulative value of 1.2 as the 6th element 1.2 in the fifth column of the third sub - matrix.

[0101] It should be noted that in the above embodiments, only the matrix operation on the first shard matrix to obtain the third shard matrix is taken as an example to illustrate the method of matrix operation. The matrix operation methods for performing matrix operation on the second shard matrix to obtain the fourth shard matrix and for performing matrix operation on the first matrix to obtain the second matrix are the same as those in the above embodiments, and are not elaborated herein.

[0102] After obtaining matrix B through matrix operation, in some embodiments, the computing party can obtain the sorting result of P data based on matrix A and matrix B.

[0103] Figure 4 FIG. shows a schematic diagram of an exemplary computing party 104 according to an embodiment of the present application.

[0104] The computing party 104 can perform addition and multiplication based on the replicated secret sharing technology. For addition based on the replicated secret sharing technology, the shard data held by each computing party can be added correspondingly.

[0105] In some embodiments, after the first computing party P0 performs matrix operation to obtain matrix B, the computing party P0 can perform row-by-row inner product on matrix A and matrix B, so as to obtain the sorting result of shard data corresponding to n data.

[0106] For example, the first computing party P0 can multiply each element in the first row of matrix A by each element in the first row of matrix B correspondingly, and then add the results of multiplying each element, so as to obtain the sorting result of shard data corresponding to n data.

[0107] For the first shard matrix and the second shard matrix in the first computing party P0, in some embodiments, after the first computing party P0 performs matrix operation to obtain the third shard matrix and the fourth shard matrix, the computing party P0 can obtain the sorting result of shard data according to the first shard matrix, the second shard matrix, the third shard matrix, and the fourth shard matrix.

[0108] For the row-by-row inner product operation of the first shard matrix, the second shard matrix, the third shard matrix, and the fourth shard matrix, in some embodiments, the first computing party P0 can calculate based on the multiplication of the replicated secret sharing technology by using the following protocol.

[0109] The first step: The computing party P i Calculate the sorting result u of shard data i : = x i y i + x i y (i+1mod3) + x (i+1mod3) y i ,

[0110] wherein, x and y can respectively represent the shard matrices held by each computing party.

[0111] Taking the per-line inner product operation in the first computing party P0 as an example, in some embodiments, the first computing party P0 may calculate the sorted result u0 of the sharded data: u0 := x0y0 + x0y1 + x1y0

[0112] Wherein, x0 may be the first sharded matrix, y0 may be the third sharded matrix, x1 may be the second sharded matrix, and y1 may be the fourth sharded matrix.

[0113] Step 2: The computing party P i Generates a random number r i Satisfying r0 + r1 + r2 = 0.

[0114] Taking the first computing party P0 as an example, in some embodiments, the first computing party P0 may generate a random number r0.

[0115] Step 3: The computing party P i Calculates z i := u i + r i .

[0116] Taking the first computing party P0 as an example, in some embodiments, the first computing party P0 may calculate the value z0 obtained by adding the sorted result u0 of the sharded data and the random number r0.

[0117] Step 4: The computing party P i Sends z i To P (i-1mod3) .

[0118] Taking the first computing party P0 as an example, as Figure 4 Shown, in some embodiments, the first computing party P0 may send the value z0 to the second computing party P2. In some embodiments, the second computing party P2 may send the calculation result z2 to the third computing party P1. The third computing party P1 may send the calculation result z1 to the first computing party P0.

[0119] It should be noted that in the above embodiments, the multiplication in the calculation process may be scalar multiplication, or may be vector multiplication, vector inner product, polynomial multiplication, matrix multiplication, etc. Different calculation methods adopted for different forms of corresponding variables (for example, matrix or vector) should all fall within the protection scope of the present application.

[0120] Figure 5 Shows a schematic diagram of an exemplary system 500 according to an embodiment of the present application.

[0121] Since each computing party receives the sharded data sent by the data owner 202, therefore, the sorted result calculated by each computing party is the sorted result R of the sharded data i . AsFigure 5 As shown, in some embodiments, each computing party may send the sorting result R of the shard data it owns i to the target party 502, so that the user can obtain the sorting result E of the n data that the target party 502 wants to view based on the sorting results of multiple shard data. Among them, the target party 502 may be the data owner 202 or other target parties 502.

[0122] For example, the first computing party P0 may send the sorting result R0 of the shard data it owns to the target party 502. The second computing party P1 may send the sorting result R1 of the shard data it owns to the target party 502. The third computing party P2 may send the sorting result R2 of the shard data it owns to the target party 502. After the target party 502 receives the sorting results of the shard data from the three parties, it can obtain the sorting result R of the n data according to R = R0 + R1 + R2.

[0123] In this way, during the data processing, since the data owner needs to send the shard data to multiple computing parties after encoding and splitting the multiple data it holds into shard data. In the communication volume generated by this round of communication interaction, the communication volume of each computing party is: 2nKlog|R|. Where R represents a ring. After each computing party calculates the sorting result of the shard data, it sends the sorting result of the shard data to the target party. In the communication volume generated by this round of communication interaction, the communication volume of each computing party is: nlog|R|. Random number r i and the sorting result u of the shard data i During the process of sending among multiple computing parties, in the communication volume generated by this round of communication interaction, the communication volume of each computing party is: nlog|R|. It can be seen from this that through the method provided by the embodiments of the present application, the processing of shard data with multi-party collaboration can be realized at the cost of one-round communication. The data processing with multi-party collaboration can be realized at the cost of a constant number of rounds of communication. In this way, on the premise of ensuring the protection and security of data privacy, the data processing with multi-party collaboration is realized through a relatively low communication volume.

[0124] Figure 6A shows a schematic flowchart of an exemplary data processing method 600 according to an embodiment of the present application. The method 600 may be implemented by the system 100 (for example, Figure 1 the system 100 in Figure 2 ). More specifically, the method 600 may be executed by the data owner in the system 100 (for example,

[0125] In step 602, obtain a data set.

[0126] In step 604, encode each data in the data set into multiple vectors.

[0127] In some embodiments, further comprising encoding the plurality of data into a plurality of vectors: determining the dimension of the vectors (e.g., K - dimension), the dimension being greater than or equal to the data; encoding elements at positions corresponding to the data in the vectors into a fourth numerical value according to the data; encoding elements at other positions in the vectors into a fifth numerical value; and obtaining the vectors according to the fourth numerical value and the fifth data.

[0128] In step 606, the plurality of vectors are split into a plurality of shard data (e.g., first shard data x0, second shard data x1, and third shard data x2).

[0129] In some embodiments, further comprising splitting the plurality of vectors into a plurality of shard data: splitting the vectors into a plurality of shard vectors such that the sum of the plurality of shard vectors is equal to the vectors (e.g., x = x0 + x1 + x2); and using the shard vectors as the shard data.

[0130] In step 608, the plurality of shard data are sent to computing parties (e.g., Figure 2 the first computing party P0, the second computing party P1, and the third computing party P2 in Figure 5 ), so that the computing parties obtain a first matrix (e.g., matrix A) according to the plurality of shard data, perform matrix operations on the first matrix to obtain a second matrix (e.g., matrix B), obtain a shard data sorting result corresponding to the data set according to the first matrix and the second matrix, and send the shard data sorting result to the target party (e.g.,

[0131] the target party 502 in

[0132] Figure 6B ), so that the target party determines the sorting result of the data in the data set according to the shard data sorting result. Figure 1 A data processing method, apparatus, electronic device, storage medium, and product provided by the present application. By obtaining a plurality of shard data for each data in a data set, obtaining a first matrix according to the plurality of shard data, performing matrix operations on the first matrix to obtain a second matrix, obtaining a shard data sorting result corresponding to the data set according to the first matrix and the second matrix, and sending the shard data sorting result to the target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result. Through the above - mentioned method, on the premise of ensuring data privacy protection and security, the computing parties achieve the processing of shard data through one - round communication interaction, reducing the communication volume in the process of computing party collaboration. A schematic flowchart of an exemplary data processing method 610 according to an embodiment of the present application is shown. Method 610 may be performed by system 100 (e.g., Figure 1implemented by the system 100 in it. More specifically, the method 610 can be executed by the computing party 104 in the system 100 (e.g., Figure 1 any one of the computing parties 104 in it; or for another example, Figure 2 the first computing party P0, the second computing party P1, or the third computing party P2 in it). The method 600 may include the following steps.

[0133] In step 612, obtain multiple shard data for each data in the data set, and the data set comes from the data owner (e.g., Figure 2 the data owner 202 in it).

[0134] In step 614, according to the multiple shard data (e.g., the first shard data x0, the second shard data x1, and the third shard data x2), obtain a first matrix (e.g., matrix A).

[0135] In some embodiments, the multiple shard data includes multiple first shard data and multiple second shard data, the first matrix includes a first shard matrix and a second shard matrix, and obtaining the first matrix according to the multiple shard data further includes: obtaining the first shard matrix according to the multiple first shard data; obtaining the second shard matrix according to the multiple second shard data.

[0136] In step 616, perform matrix operations on the first matrix to obtain a second matrix (e.g., matrix B).

[0137] In some embodiments, the second matrix includes a third shard matrix and a fourth shard matrix, and performing matrix operations on the first matrix to obtain the second matrix further includes: performing matrix operations on the first shard matrix to obtain the third shard matrix; performing matrix operations on the second shard matrix to obtain the fourth shard matrix.

[0138] In some embodiments, performing matrix operations on the first matrix to obtain the second matrix further includes: accumulating the elements of the first matrix along the column direction to obtain the second matrix.

[0139] In some embodiments, accumulating the elements of the first matrix along the column direction to obtain the second matrix further includes: using the first element of the first column of the first matrix as the first element of the first column of the second matrix; adding the first element and the second element of the first column of the first matrix to obtain a first value; using the first value as the second element of the first column of the second matrix.

[0140] In some embodiments, the accumulating the elements of the first matrix in the column direction to obtain the second matrix further includes: accumulating the elements of the first column of the first matrix to obtain a second value; adding the second value to the first element of the second column of the first matrix to obtain a third value; using the third value as the first element of the second column of the second matrix.

[0141] In step 618, according to the first matrix and the second matrix, obtain the sorted result of the sharded data corresponding to the data set.

[0142] In some embodiments, the obtaining the sorted result of the sharded data corresponding to the data set according to the first matrix and the second matrix further includes: obtaining the sorted result of the sharded data according to the first sharded matrix, the second sharded matrix, the third sharded matrix, and the fourth sharded matrix.

[0143] In some embodiments, the obtaining the sorted result of the sharded data corresponding to the data set according to the first matrix and the second matrix further includes: performing a row-wise inner product on the first matrix and the second matrix to obtain the sorted result of the sharded data corresponding to the data set.

[0144] In some embodiments, the performing a row-wise inner product on the first matrix and the second matrix to obtain the sorted result of the sharded data corresponding to the data set further includes: multiplying the first sharded matrix and the third sharded matrix to obtain a first value; multiplying the first sharded matrix and the fourth sharded matrix to obtain a second value; multiplying the second sharded matrix and the third sharded matrix to obtain a third value; adding the first value, the second value, and the third value to obtain the sorted result of the sharded data (for example, the sorted result of the sharded data u i )

[0145] In step 620, send the sorted result of the sharded data to the target party (for example, Figure 5 the target party 502 in

[0146] ), so that the target party determines the sorted result of the data in the data set according to the sorted result of the sharded data (for example, the sorted result R of n data). i )

[0147] A data processing method, apparatus, electronic device, storage medium, and product provided by this application. By obtaining multiple shard data of each data in a data set, a first matrix is obtained according to the multiple shard data, matrix operations are performed on the first matrix to obtain a second matrix, a shard data sorting result corresponding to the data set is obtained according to the first matrix and the second matrix, and the shard data sorting result is sent to a target party so that the target party can determine the sorting result of the data in the data set according to the shard data sorting result. Through the above method, on the premise of ensuring data privacy protection and security, the computing parties achieve the processing of shard data through one round of communication interaction, reducing the communication volume in the process of cooperation among the computing parties.

[0148] It should be noted that the method of the embodiments of this application can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and completed by the cooperation of multiple devices. In this case of a distributed scenario, one of these multiple devices can only execute one or more steps of the method of the embodiments of this application, and these multiple devices will interact with each other to complete the described method.

[0149] It should be noted that some embodiments of this application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in a different order from that in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0150] Based on the same inventive concept, corresponding to the method of any of the above embodiments, this application also provides a data processing apparatus 700.

[0151] Refer to Figure 7A , the apparatus 700 may include:

[0152] A first acquisition module 702, configured to acquire multiple shard data of each data in a data set, and the data set comes from a data owner.

[0153] A first calculation module 704, configured to obtain a first matrix according to the multiple shard data.

[0154] The first calculation module 704 is further configured to obtain the first shard matrix according to the multiple first shard data; and obtain the second shard matrix according to the multiple second shard data.

[0155] A second calculation module 706, configured to perform matrix operations on the first matrix to obtain a second matrix.

[0156] The second computing module 706 is further configured to perform matrix operations on the first sharded matrix to obtain a third sharded matrix; and perform matrix operations on the second sharded matrix to obtain a fourth sharded matrix.

[0157] The second computing module 706 is further configured to accumulate the elements of the first matrix in the column direction to obtain the second matrix.

[0158] The second computing module 706 is further configured to use the first element of the first column of the first matrix as the first element of the first column of the second matrix; add the first element and the second element of the first column of the first matrix to obtain a first value; and use the first value as the second element of the first column of the second matrix.

[0159] The second computing module 706 is further configured to accumulate the elements of the first column of the first matrix to obtain a second value; add the second value to the first element of the second column of the first matrix to obtain a third value; and use the third value as the first element of the second column of the second matrix.

[0160] The third computing module 708 is configured to obtain a sorted result of the sharded data corresponding to the data set according to the first matrix and the second matrix.

[0161] The third computing module 708 is further configured to obtain the sorted result of the sharded data according to the first sharded matrix, the second sharded matrix, the third sharded matrix, and the fourth sharded matrix.

[0162] The third computing module 708 is further configured to perform a row-wise inner product of the first matrix and the second matrix to obtain a sorted result of the sharded data corresponding to the data set.

[0163] The third computing module 708 is further configured to multiply the first sharded matrix and the third sharded matrix to obtain a first value; multiply the first sharded matrix and the fourth sharded matrix to obtain a second value; multiply the second sharded matrix and the third sharded matrix to obtain a third value; and add the first value, the second value, and the third value to obtain the sorted result of the sharded data.

[0164] The first sending module 710 is configured to send the sorted result of the sharded data to the target party, so that the target party determines the sorted result of the data in the data set according to the sorted result of the sharded data.

[0165] The first sending module 710 is further configured to generate a random number, and send the random number and the sorted result of the sharded data to the target party.

[0166] For convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present application, the functions of each module can be implemented in one or more software and / or hardware.

[0167] The device in the above embodiment is used to implement the corresponding method 610 in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0168] Based on the same technical concept, corresponding to the method in any of the above embodiments, the present application further provides a data processing device 720.

[0169] Refer to Figure 7B , the device 720 may include:

[0170] The second acquisition module 722 is configured to acquire a data set.

[0171] The encoding module 724 is configured to encode each data in the data set into a plurality of vectors.

[0172] The encoding module 724 is further configured to determine the dimension of the vector, where the dimension is greater than or equal to the data; according to the data, encode the elements at the positions corresponding to the data in the vector into a fourth numerical value; encode the elements at other positions in the vector into a fifth numerical value; and obtain the vector according to the fourth numerical value and the fifth data.

[0173] The splitting module 726 is configured to split the plurality of vectors into a plurality of sharded data.

[0174] The splitting module 726 is further configured to split the vector into a plurality of sharded vectors such that the sum of the plurality of sharded vectors is equal to the vector; and use the sharded vectors as the sharded data.

[0175] The second sending module 728 is configured to send the plurality of sharded data to a computing party, so that the computing party obtains a first matrix according to the plurality of sharded data, performs matrix operations on the first matrix to obtain a second matrix, and obtains a sorted result of the sharded data corresponding to the data set according to the first matrix and the second matrix, and sends the sorted result of the sharded data to the target party, so that the target party determines the sorted result of the data in the data set according to the sorted result of the sharded data.

[0176] For the convenience of description, when describing the above device, it is divided into various modules according to functions for separate description. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0177] The device of the above embodiment is used to implement the corresponding method 600 in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0178] Based on the same technical concept, corresponding to the method of any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method 600 or method 610 described in any of the above embodiments.

[0179] Figure 8 The figure shows a schematic diagram of an exemplary electronic device according to an embodiment of the present application. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0180] The processor 1010 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0181] The memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0182] The input / output interface 1030 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0183] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to achieve communication interaction between this device and other devices. The communication module can communicate through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0184] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0185] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0186] The electronic device of the above embodiment is used to implement the corresponding method 600 or method 610 in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0187] Based on the same technical concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the method 600 or method 610 described in any of the foregoing embodiments.

[0188] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0189] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute method 600 or method 610 described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0190] Based on the same inventive concept, corresponding to method 600 or method 610 described in any of the above embodiments, the present application further provides a computer program product, including computer program instructions. When the computer program instructions run on a computer, the computer is caused to execute method 600 or method 610 described in any of the above embodiments. In some embodiments, the computer program instructions may be executed by one or more processors of the computer to cause the computer and / or the processor to execute method 600 or method 610. Corresponding to the execution subject of each step in method 600 or method 610, the processor that executes the corresponding step may belong to the corresponding execution subject.

[0191] The computer program product of the above embodiments is used to cause the computer and / or the processor to execute method 600 or method 610 described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0192] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.

[0193] In addition, for simplicity of explanation and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the devices may be shown in block diagram form to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application may be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0194] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0195] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. A data processing method, applied to a computing party, wherein the computing party is a privacy computing service platform composed of multiple servers, and multiple computing parties collaborate to perform data processing, the method comprising: Acquire multiple shard data of each data in a data set, the data set comes from a data owner, the data owner is a system consisting of a terminal device, a server, and a database, the multiple shard data are obtained by encoding each data in the data set into multiple vectors; Obtaining a first matrix according to the plurality of sliced ​​data, wherein the dimension of the first matrix is ​​the same as the dimension of the plurality of vectors, and the number of rows of the first matrix is ​​the same as the number of data in the data set; Performing a matrix operation on the first matrix to obtain a second matrix; Obtaining a sorting result of the shard data corresponding to the data set according to the first matrix and the second matrix; Sending the shard data sorting result to the target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result; The performing matrix operation on the first matrix to obtain a second matrix further comprises: Accumulate the elements of the first matrix along the column direction to obtain the second matrix; specifically, use the first element of the first column of the first matrix as the first element of the first column of the second matrix; add the first element and the second element of the first column of the first matrix to obtain a first value; use the first value as the second element of the first column of the second matrix; accumulate the elements of the first column of the first matrix to obtain a second value; add the second value and the first element of the second column of the first matrix to obtain a third value; use the third value as the first element of the second column of the second matrix; Wherein, obtaining the shard data sorting result corresponding to the data set according to the first matrix and the second matrix further includes: Perform row-by-row inner product on the first matrix and the second matrix to obtain the shard data sorting result corresponding to the data set; specifically, multiply each element of the first row in the first matrix with each element of the first row in the second matrix, and add the multiplication results to obtain the shard data sorting result corresponding to the data set.

2. The method of claim 1, wherein: The plurality of slice data include a plurality of first slice data and a plurality of second slice data, the first matrix includes a first slice matrix and a second slice matrix, and obtaining the first matrix according to the plurality of slice data further includes: Obtaining the first slice matrix according to the plurality of first slice data; The second slice matrix is ​​obtained according to the plurality of second slice data.

3. The method of claim 2, wherein: The second matrix includes a third slice matrix and a fourth slice matrix, and performing a matrix operation on the first matrix to obtain the second matrix further includes: Performing a matrix operation on the first slice matrix to obtain a third slice matrix; A matrix operation is performed on the second slice matrix to obtain a fourth slice matrix.

4. The method of claim 3, wherein: The obtaining, according to the first matrix and the second matrix, a sorting result of the shard data corresponding to the data set further comprises: The shard data sorting result is obtained according to the first shard matrix, the second shard matrix, the third shard matrix and the fourth shard matrix.

5. The method of claim 3, wherein: The performing row-by-row inner product of the first matrix and the second matrix to obtain the shard data sorting result corresponding to the data set further includes: Multiplying the first slice matrix and the third slice matrix to obtain a first value; Multiplying the first slice matrix and the fourth slice matrix to obtain a second value; Multiplying the second slice matrix and the third slice matrix to obtain a third value; The first value, the second value, and the third value are added to obtain the shard data sorting result.

6. The method of claim 5, wherein: The sending of the shard data sorting result to the target party further comprises: Generate a random number, and send the random number and the shard data sorting result to the target party.

7. A data processing method, applied to a data owner, wherein the data owner is a system consisting of a terminal device, a server and a database, the method comprising: Get the data set; Encode each data in the data set into multiple vectors; Splitting the multiple vectors into multiple slice data; The multiple shard data are sent to a computing party, so that the computing party obtains a first matrix according to the multiple shard data, performs a matrix operation on the first matrix to obtain a second matrix, obtains a shard data sorting result corresponding to the data set according to the first matrix and the second matrix, and sends the shard data sorting result to a target party, so that the target party determines a sorting result of data in the data set according to the shard data sorting result. The computing party is a privacy computing service platform composed of multiple servers, and the multiple computing parties collaborate to process data; The dimension of the first matrix is ​​the same as the dimension of the plurality of vectors, and the number of rows of the first matrix is ​​the same as the number of data in the data set; The performing matrix operation on the first matrix to obtain a second matrix further comprises: Accumulate the elements of the first matrix along the column direction to obtain the second matrix; specifically, use the first element of the first column of the first matrix as the first element of the first column of the second matrix; add the first element and the second element of the first column of the first matrix to obtain a first value; use the first value as the second element of the first column of the second matrix; accumulate the elements of the first column of the first matrix to obtain a second value; add the second value and the first element of the second column of the first matrix to obtain a third value; use the third value as the first element of the second column of the second matrix; Wherein, obtaining the shard data sorting result corresponding to the data set according to the first matrix and the second matrix further includes: Perform row-by-row inner product on the first matrix and the second matrix to obtain the shard data sorting result corresponding to the data set; specifically, multiply each element of the first row in the first matrix with each element of the first row in the second matrix, and add the multiplication results to obtain the shard data sorting result corresponding to the data set.

8. The method of claim 7, wherein: The encoding of each data into a plurality of vectors further comprises: Determine a dimension of the vector, the dimension being greater than or equal to the data; According to the data, encoding the element at the position corresponding to the data in the vector into a fourth value; Encoding elements at other positions in the vector as fifth values; The vector is obtained according to the fourth value and the fifth value.

9. The method of claim 7, wherein: The step of splitting the plurality of vectors into a plurality of slice data further comprises: Splitting the vector into a plurality of slice vectors such that a sum of the plurality of slice vectors is equal to the vector; The slice vector is used as the slice data.

10. A data processing device, applied to a computing party, wherein the computing party is a privacy computing service platform composed of multiple servers, and multiple computing parties collaborate to perform data processing, the device comprising: A first acquisition module is configured to acquire multiple shard data of each data in a data set, wherein the data set comes from a data owner, and the data owner is a system composed of a terminal device, a server, and a database, and the multiple shard data are obtained by encoding each data in the data set into multiple vectors; A first calculation module is configured to obtain a first matrix according to the plurality of sliced ​​data, wherein the dimension of the first matrix is ​​the same as the dimension of the plurality of vectors, and the number of rows of the first matrix is ​​the same as the number of data in the data set; A second calculation module is configured to perform a matrix operation on the first matrix to obtain a second matrix; A third calculation module is configured to obtain a shard data sorting result corresponding to the data set according to the first matrix and the second matrix; A first sending module is configured to send the shard data sorting result to a target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result; The second calculation module is further configured to accumulate the elements of the first matrix along the column direction to obtain the second matrix; specifically, the first element of the first column of the first matrix is ​​used as the first element of the first column of the second matrix; the first element and the second element of the first column of the first matrix are added to obtain a first value; the first value is used as the second element of the first column of the second matrix; the elements of the first column of the first matrix are accumulated to obtain a second value; the second value is added to the first element of the second column of the first matrix to obtain a third value; the third value is used as the first element of the second column of the second matrix; The third computing module is also configured to perform row-by-row inner product on the first matrix and the second matrix to obtain the shard data sorting result corresponding to the data set; specifically, each element of the first row in the first matrix is ​​multiplied by each element of the first row in the second matrix, and the multiplication results are added to obtain the shard data sorting result corresponding to the data set.

11. A data processing device, applied to a data owner, wherein the data owner is a system consisting of a terminal device, a server and a database, and the device comprises: A second acquisition module is configured as an acquisition module to acquire a data set; An encoding module, configured to encode each data in the data set into multiple vectors; A splitting module, configured to split the plurality of vectors into a plurality of slice data; A second sending module is configured to send the multiple shard data to a computing party, so that the computing party obtains a first matrix according to the multiple shard data, performs a matrix operation on the first matrix to obtain a second matrix, obtains a shard data sorting result corresponding to the data set according to the first matrix and the second matrix, and sends the shard data sorting result to a target party, so that the target party determines the sorting result of the data in the data set according to the shard data sorting result. The computing party is a privacy computing service platform composed of multiple servers, and the multiple computing parties collaborate to process data; The dimension of the first matrix is ​​the same as the dimension of the plurality of vectors, and the number of rows of the first matrix is ​​the same as the number of data in the data set; The performing matrix operation on the first matrix to obtain a second matrix further comprises: Accumulate the elements of the first matrix along the column direction to obtain the second matrix; specifically, use the first element of the first column of the first matrix as the first element of the first column of the second matrix; add the first element and the second element of the first column of the first matrix to obtain a first value; use the first value as the second element of the first column of the second matrix; accumulate the elements of the first column of the first matrix to obtain a second value; add the second value and the first element of the second column of the first matrix to obtain a third value; use the third value as the first element of the second column of the second matrix; Wherein, obtaining the shard data sorting result corresponding to the data set according to the first matrix and the second matrix further includes: Perform row-by-row inner product on the first matrix and the second matrix to obtain the shard data sorting result corresponding to the data set; specifically, multiply each element of the first row in the first matrix with each element of the first row in the second matrix, and add the multiplication results to obtain the shard data sorting result corresponding to the data set.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

14. A computer program product, wherein: The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data processing method and device based on privacy protection and server

    CN112800466A

  • Security calculation method and device, equipment and storage medium

    CN114418830A

  • Casual disruption method and system based on secret sharing

    CN115396101A