Data processing method, device, equipment, medium and program product

By generating and distributing random arrays and using trusted third-party devices to determine the maximum value, the problems of low efficiency and insufficient security in the existing technology of secure multi-party maximum value determination are solved, and security and efficiency are improved.

CN115982744BActive Publication Date: 2025-09-30CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310097807.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-01
Publication Date
2025-09-30
Estimated Expiration
2043-02-01

AI Technical Summary

Technical Problem

In the existing technology, the method of secure multi-party maximum value calculation is inefficient and insecure. In particular, different calculation methods are required when calculating the maximum and minimum values, which leads to complex communication topology and the risk of privacy data leakage.

Method used

By generating primary and secondary random arrays, using trusted third-party devices to generate and distribute random numbers, the participating devices calculate secret values, and the trusted third-party device determines the maximum value, ensuring communication confidentiality and simplified calculations.

Benefits of technology

It improves the security and efficiency of determining the maximum value, simplifies the communication process, and can handle the determination of maximum and minimum values ​​at the same time, reducing the risk of participants and trusted third parties obtaining secret values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115982744B_ABST
    Figure CN115982744B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, device, equipment, medium and program product, which belongs to the field of big data data security technology. The method includes: generating a first-level random array according to the number of participants; sending an m-dimensional first-level random number corresponding to the main participant, the number of participants and a first instruction to the main participant device; obtaining multiple m-dimensional second-level random numbers sent by the main participant device and the second m-dimensional secret value of the main participant; sending the corresponding m-dimensional first-level random number and m-dimensional second-level random number to each slave participant device; obtaining the second m-dimensional secret value sent by the slave participant device; calculating the third m-dimensional secret value according to the second m-dimensional secret value and the first-level random array of the participant; determining the position of the maximum value of the participant secret value in the preset secret value set according to the third m-dimensional secret value to determine the maximum value; determining the participant corresponding to the maximum value as the target participant. The embodiment of the present application can improve the security and efficiency of the determination of the maximum value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data security technology, and in particular relates to a data processing method, apparatus, device, computer storage medium, and computer program product. Background Art

[0002] Secure multi-party maximum value search means: Assume there are n participants P1, P2, ..., P n Hold private secrets x1, x2, ..., x n , it is known that the private secrets of all participants are within the data range U={v1,…,v m}, that is, x1,…,x n ∈U, it is necessary to obtain the maximum and / or minimum value of the private secret without revealing the private secrets of each participant, and no other information will be leaked.

[0003] Secure multi-party maximum value search has important applications in privacy-preserving computing. For example, electronic bidding that protects user privacy requires finding the minimum value, and auctions require finding the maximum value.

[0004] In related technologies, secure multi-party maximum value determination usually requires the application of complex encryption schemes and communication processes, and the maximum and minimum values ​​usually need to be solved in two different ways, resulting in low efficiency in determining the maximum value. Summary of the Invention

[0005] The embodiments of the present application provide a data processing method, apparatus, device, computer storage medium, and computer program product, which can improve the efficiency of maximum value determination while improving the security of maximum value determination.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, applied to a trusted third-party device, comprising:

[0007] Generate a primary random array based on the number of participants, where the participants include a master participant and a slave participant. The primary random array includes multiple m-dimensional primary random numbers corresponding to the participants, where m is the number of secret values ​​in a preset secret value set. The preset secret value set includes multiple secret values ​​sorted by numerical value, and the participant's secret value set is a subset of the preset secret value set.

[0008] Sending an m-dimensional primary random number corresponding to the primary participant, the number of participants, and a first instruction to the primary participant device, the first instruction being used to instruct the primary participant device to generate a secondary random number array based on the number of participants, and instructing the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the primary participant's first m-dimensional secret value, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers equals 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on its own secret value and a preset secret value set;

[0009] Obtain multiple encrypted m-dimensional secondary random numbers corresponding to the slave participants and sent by the master participant device, as well as the master participant's second m-dimensional secret value;

[0010] Sending an m-dimensional primary random number and an m-dimensional secondary random number corresponding to each slave participant to each slave participant device, so that the slave participant device calculates a second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value of the slave participant;

[0011] Obtaining a second m-dimensional secret value sent from a participant device;

[0012] Calculate the third m-dimensional secret value based on the second m-dimensional secret value and the first-level random array of the participants;

[0013] Determine, based on the third m-dimensional secret value, the position of the maximum value of the participant's secret value in the preset secret value set to determine the maximum value, where the maximum value includes the minimum value and / or the maximum value among the participant's secret values;

[0014] The participant corresponding to the maximum value is determined as the target participant.

[0015] In an optional embodiment, sending an m-dimensional primary random number corresponding to the primary participant, the number of participants, and a first instruction to the primary participant device includes:

[0016] Randomly select a target participant from the participants and determine the target participant as the main participant;

[0017] Send the m-dimensional primary random number corresponding to the main participant, the number of participants, and the first instruction to the main participant device.

[0018] In an optional embodiment, the second-dimensional secret value of the participant is the sum of the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value corresponding to the participant;

[0019] Calculate the third m-dimensional secret value based on the second m-dimensional secret value and the first-level random array of the participants, including:

[0020] Add the second m-dimensional secret values ​​of the participants to obtain the fourth m-dimensional secret value;

[0021] The third m-dimensional secret value is obtained by subtracting multiple m-dimensional primary random numbers from the fourth m-dimensional secret value.

[0022] In an optional embodiment, the first m-dimensional secret value is an m-dimensional random number generated by the participant based on the position of its own secret value in the preset secret value set, and each first m-dimensional secret value includes 1 non-zero value element and (m-1) zero value elements;

[0023] According to the third m-dimensional secret value, the maximum value of the participant's secret value is determined from the preset secret value set, including:

[0024] Determining a first position of a non-zero value element in the third m-dimensional secret value in the third m-dimensional secret value;

[0025] Determine, based on the first position, a second position of the maximum value of the participant's secret value in the preset secret value set;

[0026] The secret value corresponding to the second position is determined as the maximum value of the participant's secret value.

[0027] In an optional implementation, determining the participant corresponding to the maximum value as the target participant includes:

[0028] Receiving a first hash commitment and a first m-dimensional secret value sent by a device of each participant, where the first hash commitment includes a hash value calculated by the device of the participant based on the device's own secret value and the first m-dimensional secret value;

[0029] Calculate the second hash commitment corresponding to each participant based on the maximum value and the first m-dimensional secret value of each participant;

[0030] Compare each participant's first hash commitment with the participant's second hash commitment;

[0031] When the first hash commitment is consistent with the second hash commitment, the participant is determined to be the target participant.

[0032] In a second aspect, an embodiment of the present application provides a data processing method, applied to a primary participant device, comprising:

[0033] Generate m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value, where the preset secret value set includes multiple secret values ​​sorted by numerical value, the secret value of each participant is included in the preset secret value set, and the participants include a master participant and a slave participant, where m is the number of secret values ​​in the preset secret value set;

[0034] Receiving an m-dimensional primary random number, the number of participants, and a first instruction sent by a trusted third-party device, the first instruction being used to instruct the primary participant device to generate a secondary random array based on the number of participants, and instructing the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, an m-dimensional secondary random number corresponding to the primary participant in the secondary random array, and the primary participant's first m-dimensional secret value, wherein the secondary random array includes multiple m-dimensional secondary random numbers corresponding to the participants, and the sum of the multiple m-dimensional secondary random numbers is equal to 0;

[0035] In response to the first instruction, generating an m-dimensional secondary random array;

[0036] In response to the first instruction, calculating a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value;

[0037] Sending a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and a second m-dimensional secret value to a trusted third-party device.

[0038] In an optional embodiment, generating m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value includes:

[0039] According to the position of its own secret value in the preset secret value set, m-dimensional random data is generated to obtain a first m-dimensional secret value, which includes 1 non-zero value element and (m-1) zero value elements.

[0040] In an optional embodiment, calculating the second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value includes:

[0041] The m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant, and the first m-dimensional secret value are added to obtain the second m-dimensional secret value of the main participant.

[0042] In an optional embodiment, the method further includes:

[0043] A first hash commitment and a first m-dimensional secret value are sent to a trusted third-party device for the trusted third-party device to determine the target participant. The first hash commitment includes a hash value calculated by the main participant based on its own secret value and the first m-dimensional secret value. The target participant is the participant corresponding to the maximum value, and the maximum value includes the minimum value and / or maximum value among the secret values ​​of the participants.

[0044] In a third aspect, an embodiment of the present application provides a data processing apparatus, applied to a trusted third-party device, comprising:

[0045] a generation module, configured to generate a primary random array based on the number of participants, the participants including a master participant and a slave participant, the primary random array including a plurality of m-dimensional primary random numbers corresponding to the participants, where m is the number of secret values ​​in a preset secret value set, the preset secret value set including a plurality of secret values ​​sorted by numerical value, and the secret value set of the participant being a subset of the preset secret value set;

[0046] a sending module, configured to send an m-dimensional primary random number corresponding to a primary participant, the number of participants, and a first instruction to a primary participant device, wherein the first instruction is configured to instruct the primary participant device to generate a secondary random number array based on the number of participants, and to instruct the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers equals 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on the participant's own secret value and the preset secret value set;

[0047] an acquisition module, configured to acquire a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave parties and sent by the master party device, and a second m-dimensional secret value of the master party;

[0048] The sending module is further configured to send the m-dimensional primary random number and the m-dimensional secondary random number corresponding to each slave participant to each slave participant device, so that the slave participant device calculates the second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value of the slave participant;

[0049] The acquisition module is further configured to acquire the second m-dimensional secret value sent from the participant device;

[0050] a calculation module, configured to calculate a third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array;

[0051] a determination module, configured to determine, based on the third m-dimensional secret value, a position of a maximum value of the participant's secret value in the preset secret value set, so as to determine the maximum value, wherein the maximum value includes a minimum value and / or a maximum value among the participant's secret values;

[0052] The determining module is further configured to determine the participant corresponding to the maximum value as the target participant.

[0053] In a fourth aspect, an embodiment of the present application provides a data processing apparatus, applied to a primary participant device, comprising:

[0054] a generation module, configured to generate m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value, wherein the preset secret value set includes a plurality of secret values ​​sorted by numerical value, the secret values ​​of the participants are included in the preset secret value set, the participants include the master participant and the slave participant, and m is the number of secret values ​​in the preset secret value set;

[0055] a receiving module, configured to receive an m-dimensional primary random number, the number of participants, and a first instruction sent by a trusted third-party device, wherein the first instruction is configured to instruct the primary participant device to generate a secondary random number array based on the number of participants, and to instruct the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, an m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, and the sum of the multiple m-dimensional secondary random numbers is equal to 0;

[0056] The generating module is further configured to generate the m-dimensional secondary random array in response to the first instruction;

[0057] a calculation module, configured to, in response to the first instruction, calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value;

[0058] A sending module is used to send a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and the second m-dimensional secret value to the trusted third-party device.

[0059] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0060] When the processor executes the computer program instructions, it implements the data processing method of any optional embodiment of the first aspect or the second aspect of the present application.

[0061] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a data processing method as in any optional implementation of the first aspect or the second aspect of the present application is implemented.

[0062] In the seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes a data processing method as any optional implementation method of the first aspect or the second aspect of the present application.

[0063] The data processing method, apparatus, device, computer storage medium, and computer program product of the embodiments of the present application generate a primary random number array corresponding to each participant through a trusted third-party device, and a secondary random number array corresponding to each participant through a master participant device. The trusted third party then forwards the secondary random number encrypted by the master participant device to the slave participant device. Each participant device can calculate a second m-dimensional secret value based on the primary random number, the secondary random number, and its own calculated first m-dimensional secret value. The trusted third-party device then calculates the second m-dimensional secret value to obtain a third m-dimensional secret value. By comparing the third m-dimensional secret value with a preset set of secret values, the maximum value of the participant's secret can be determined, thereby determining the target participant corresponding to the maximum value. In this way, for each participant, the primary random number and third m-dimensional secret value of other participants remain confidential, thereby reducing the risk of several participants colluding to obtain the secret value of one party. For the trusted third party, the secondary random number remains confidential, thereby reducing the risk of the trusted third party obtaining the secret value of each participant. In this way, the security of determining the maximum value can be improved. Furthermore, on the one hand, in the embodiments of the present application, each participant's device communicates directly with a trusted third-party device, and the participant's devices do not communicate with each other, thereby simplifying the communication process. On the other hand, the embodiments of the present application can be applied to both maximum and minimum value determination, thereby simplifying the calculation process. This can improve the simplicity and efficiency of data processing in the maximum value determination scenario. In this way, the efficiency of the maximum value determination can be improved while improving the security of the maximum value determination. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0065] Figure 1 This is a schematic diagram of a data processing method provided by an embodiment of the present application.

[0066] Figure 2 is a schematic diagram of the architecture of a data processing method provided by another embodiment of the present application;

[0067] Figure 3 is a flowchart of a data processing method provided by yet another embodiment of the present application;

[0068] Figure 4 is a structural diagram of a data processing device provided in yet another embodiment of the present application;

[0069] Figure 5 is a structural diagram of a data processing device provided in yet another embodiment of the present application;

[0070] Figure 6 It is a structural diagram of a data processing device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0071] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0072] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.

[0073] The acquisition, storage, use, and processing of data in this application's technical solution comply with relevant national laws and regulations.

[0074] As described in the background art, secure multi-party optimization is of great significance to privacy-preserving computing and is extremely important for protecting user privacy in bidding activities such as electronic bidding and auctions.

[0075] In related technologies, secure multi-party optimization solutions are mainly divided into three categories.

[0076] The first type of solution achieves sorting through pairwise comparison. This requires multiple rounds of pairwise communication between the participating parties, comparing the sizes of the secret values ​​held by each participant. This results in a complex communication topology and low efficiency. Furthermore, multiple executions of the protocol may allow some participants to obtain additional information, such as which data are equal and the data size, leading to the risk of leaking user privacy data.

[0077] The second type of solution is for scenarios where the data range is known and small. First, the private data of each party is encoded into a 0 / 1 array through a 0-1 encoding scheme. Then, the arrays are bit-wise multiplied to obtain the position of the minimum value within the value range. If the arrays are bit-wise XORed, the position of the maximum value within the value range can be obtained. The minimum and maximum values ​​can be obtained by obtaining the corresponding values ​​from the corresponding positions in the value range.

[0078] In 0-1 encoding schemes, the Number Theory Research Unit (NTRU) encryption system is often used. The NTRU encryption system is a public key cryptosystem first proposed by Hoffstein et al. in 1996 and officially published in 1998. The NTRU encryption algorithm uses only modular multiplication and modular inverse operations, resulting in extremely fast decryption speed. It is as secure as algorithms such as RSA and elliptic curve cryptography (ECC).

[0079] NTRU also implements multi-key fully homomorphic encryption, which allows homomorphic operations to be performed on ciphertext from different parties, with the result decrypted using the joint keys of all participating parties. Compared to traditional single-key fully homomorphic encryption, multi-key homomorphic encryption is more suitable for protecting and processing the privacy of multi-user data in cloud environments.

[0080] The following examples illustrate the encryption and decryption schemes in a multi-key fully homomorphic encryption scheme.

[0081] Encryption schemes include:

[0082] KeyGen.: Let κ be the security parameter, generate (pk i ,sk i ,ek)(i∈[t]), where h i =pk i and f i =sk i are the public key and private key of each participant, ek represents the public evaluation key, and [t] represents the set of participants.

[0083] Enc.: Let pk i and m i They are the public key and the plaintext message, which can generate the ciphertext c i =(pk i ,mi )(i∈[t]).

[0084] Dec.: Assume that t participants hold the private key sk i (i∈[t]) and ciphertext c ** , Boolean circuit C, where c ** represents the ciphertext owned by t participants after multi-key fully homomorphic operation, then c ** The corresponding plaintext message output by decryption is Dec(sk1,…,sk i ,c ** )=C(m1,m2,…,m t ).

[0085] Eval.: Given a Boolean circuit C, after homomorphic operation on t ciphertexts, the output is: c ** =Eval(C,(c1,pk1,ek1),…,(c t ,pk t ,ek t )).

[0086] Decryption solutions include:

[0087] Take the decryption process when t = 2 as an example. (h1, f1) and (h2, f2) are two different sets of public and private key pairs. c1 and c2 are encrypted from plaintext m1 and m2 using public keys h1 and h2: c1 = Enc(m1, h1) = h1s1 + 2e1 + m1, c2 = Enc(m2, h2) = h2s2 + 2e2 + m2. s1, s2, e1, and e2 are the preset encryption parameters. The common decryption key f1f2 is used to decrypt c1. add =c1+c2 and c mul =c1·c2, the calculation process can be simplified to the following steps (1) to (2).

[0088] (1) Additive homomorphic decryption operation:

[0089] f1f2(c add )=f1f2(c1+c2)

[0090] =2(f1f2(e1+e2)+f2g1s1+f1g2s2)+f1f2(m1+m2)(mod 2)

[0091] =m1+m2(mod 2)

[0092] (2) Multiplication Homomorphic Decryption Operation

[0093] f1f2(c mul )=f1f2(c1·c2)

[0094] =2(2g1g2s1s2+g1s1f2(2e2+m2)+g2s2f1(2e1+m1)+f1f2(e1m2+e2m1+2e1e2))+f1f2(m1·m2)(mod 2)

[0095] =m1·m2(mod 2)

[0096] Among them, g1 and g2 can represent preset decryption parameters.

[0097] When t≥3, the decryption operation process is similar to the above case when t=2.

[0098] As an example, let x1,…,x N ∈{v1,…,v m}=U, U represents a total ordered set that satisfies v1 <v2<…<v m , each participant P i The secret value x i Encoded into an m-dimensional 0-1 array X i ={α i1 ,…,α im}, X i The construction method is as follows:

[0099]

[0100] In this way, P i The secret value x i With the array X encoded by the above formula i =(α i1 ,…,α im ) are one-to-one corresponding, and these N arrays X1, X2, ..., X N Do the product, that is, multiply the corresponding elements of the array, and then get a new array Y=(y1,…,y m ),in Then add all the elements of the newly obtained array Y to get Right now: From the above two expressions, it is easy to prove that min{x1,x2,…,x N}=v k .

[0101] As an example of finding the minimum value of a 0-1 coding scheme, suppose the total ordered set U = {1, 3, 5, 7, 9, 11}, P1, P2, and P3 have x1 = 3, x2 = 7, and x3 = 9 respectively. Following the above protocol, the minimum value of these three numbers is calculated, and the following Table 1 is obtained.

[0102] Table 1

[0103]

[0104] As an example, we can also encode the N arrays X1, X2, ..., X N Perform an OR operation, that is, perform an OR operation on the corresponding elements of the array, so as to obtain a new array Y=(y1,…,y m ),in Then add all the elements of the newly obtained array Y to get Right now: From the above two expressions, it is easy to prove that max{x1,x2,…,x N}=v k .

[0105] As an example of finding the maximum value in a 0-1 coding scheme, suppose the total ordered set U = {1, 3, 5, 7, 9, 11}, P1, P2, and P3 have x1 = 3, x2 = 7, and x3 = 9, respectively. Following the above protocol, the maximum value of these three numbers is calculated, and the following Table 2 is obtained.

[0106] Table 2

[0107]

[0108] All of the above secure multi-party computation methods require the use of homomorphic encryption schemes. Taking the multi-party secure multiplication operation for finding the minimum value as an example, the protocol process is as follows.

[0109] Each participant P i (i=[N]) Use the following formula to convert your own confidential data x i Encoded into array X i ={α i1 ,…,α im}.

[0110]

[0111] Each participant P i (i=[N]) Execute the key generation system in the multi-key NTRU encryption algorithm to generate the public key pk i =h i and private key pk i =f i Each uses its own generated public key to encrypt the encoded array and obtains: E(X i )=(E(α i1 ),…,E(α im )).

[0112] Each participant P i (i=[N]) sends its own self-encrypted array to the third-party center CS, and CS uses multi-key NTRU fully homomorphic computing And send E(k) to any participant. Take participant P1 as an example. After P1 receives E(k) from CS, it calculates u1=E(k)f1 and sends u1 to P2. P2 receives u1 and calculates u2=u1f2=E(k)f1f2. This process continues until P N Calculate k = u N =u N-1 f N =E(k)f1f2…f N At this point, you can determine v k =min{x1,…,x N}, and through P N Set the minimum value min{x1,…,x N Tell the other parties.

[0113] In the second type of solution mentioned above, each participant’s N arrays X1, X2,…, X N When performing multiplication or OR operations, secure multi-party computation is required; otherwise, the secrets of the participating parties may be leaked. Furthermore, in the second type of solution, the secure multi-party computation algorithms required for maximum and minimum values ​​are different. Maximum value requires secure multi-party OR, while minimum value requires secure multi-party multiplication, significantly increasing computational complexity. Furthermore, the second type of solution also suffers from complex communication topology and low efficiency. Therefore, secure multi-party maximum value calculation using the second type of solution still suffers from insufficient security and low computational efficiency.

[0114] The third approach is to implement sorting by bucketing. The basic idea is to divide the numerical interval to be sorted into multiple equal-sized subintervals (i.e., buckets), and then place the n inputs into corresponding buckets. To obtain the final result, the elements in each bucket must first be sorted, and then the maximum value from the bucket with the largest interval and the minimum value from the bucket with the smallest interval must be found.

[0115] As an example, Figure 1 As shown, for the set of secret values ​​{22, 5, 11, 41, 45, 26, 29, 10, 7, 8, 30, 27, 42, 43, 40} held by each participant, a bucketing method can be used to divide them into buckets 0-9, 10-19, 20-29, 30-39, and 40-49, respectively, which are constructed according to the known value range. When it is necessary to determine the minimum value in the set of secret values, the minimum value in the bucket 0-9 can be found, thus obtaining the minimum value in the set of secret values. Similarly, when it is necessary to determine the maximum value in the set of secret values, the maximum value in the bucket 40-49 can be found, thus obtaining the maximum value in the set of secret values.

[0116] However, when the value range of the secret value is large and unevenly distributed, bucket sorting requires increasing the number of rounds, thereby reducing the efficiency of determining the minimum value.

[0117] In summary, the security and efficiency of existing secure multi-party optimization methods need to be improved, and they are difficult to meet the needs of privacy-preserving computing, such as electronic bidding and auctions that protect user privacy.

[0118] In light of this, the inventors, after thorough consideration, have ingeniously designed a data processing method, apparatus, device, computer storage medium, and computer program product. This data processing method, in privacy-preserving computing scenarios, can improve the efficiency of determining the maximum value while enhancing its security.

[0119] The following describes the data processing method provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings. The data processing method provided in the embodiments of the present application, the device for executing the method can be a data processing device, or a partial module of the data processing device for executing the data processing method. In the embodiments of the present application, the data processing method provided in the embodiments of the present application is described in detail by taking the data processing device executing the data processing method as an example.

[0120] The data processing method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0121] Figure 2 FIG. 1 shows a schematic diagram of the architecture of a data processing method in one embodiment. Figure 2 As shown, each participant can communicate using a star topology with a trusted third-party device as the center. Each participant's device is directly connected only to the trusted third-party device, and no connections are required between the participating devices. When communication is required between participants, the trusted third-party device can forward the communication content sent by the participating devices. The participating devices can perform end-to-end encryption on the communication content, making it invisible to the forwarding trusted third party.

[0122] Figure 3 FIG. 1 is a flow chart showing a data processing method according to an embodiment of the present application. Figure 3 As shown, the data processing method may specifically include the following steps S101 to S114.

[0123] S101. The trusted third-party device generates a first-level random array based on the number of participants. The participants include a master participant and a slave participant. The first-level random array includes multiple m-dimensional first-level random numbers corresponding to the participants. m is the number of secret values ​​in a preset secret value set. The preset secret value set includes multiple secret values ​​sorted by numerical value. The secret value set of the participant is a subset of the preset secret value set.

[0124] In step S101, the first-level random number array can be generated in a variety of ways. For example, it can be obtained from a preset first-level random number set, or it can be generated and a random array is generated according to a trusted random generation function. As an example, the first-level random number array can be generated according to a trusted random generation function. Specifically, before generating the first-level random number array, the trusted third-party device can send a query signal to all participants to obtain response data fed back by the participants. Based on the response data, the number of participants participating in the cooperative calculation and the corresponding data address can be determined, including the IP, http, ID or URL of the participant device and other unique data with identity information. Based on the above response data, the trusted third-party device can generate a first-level random number array corresponding to the participant according to the trusted random generation function.

[0125] S102, the trusted third-party device sends the m-dimensional primary random number corresponding to the main participant, the number of participants and the first instruction to the main participant device, the first instruction is used to instruct the main participant device to generate a secondary random array according to the number of participants, and instruct the main participant device to calculate the second m-dimensional secret value of the main participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant in the secondary random array and the first m-dimensional secret value of the main participant, wherein the secondary random array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers is equal to 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on its own secret value and a preset secret value set.

[0126] Correspondingly, the main participant device receives the m-dimensional primary random number, the number of participants and the first instruction sent by the trusted third-party device.

[0127] S103, the main participant device generates m-dimensional random data according to its own secret value and a preset secret value set to obtain a first m-dimensional secret value.

[0128] In one embodiment, the main participant device can compare the main participant secret value with a preset secret value set, and convert the main participant secret value into the first m-dimensional secret value corresponding to the main participant according to the position of the main participant secret value in the preset secret value set.

[0129] S104: The primary participant device generates an m-dimensional secondary random array in response to the first instruction.

[0130] S105, the main participant device responds to the first instruction and calculates the second m-dimensional secret value of the main participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant and the first m-dimensional secret value.

[0131] S106: The master participant device sends a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave participants and a second m-dimensional secret value to the trusted third-party device.

[0132] Correspondingly, the trusted third-party device obtains multiple encrypted m-dimensional secondary random numbers corresponding to the slave parties and sent by the master party device, as well as the master party's second m-dimensional secret value.

[0133] S107, the trusted third-party device sends the m-dimensional primary random number corresponding to the slave participant and the encrypted m-dimensional secondary random number to each slave participant device respectively, so that the slave participant device can calculate the second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number and the first m-dimensional secret value of the slave participant.

[0134] Accordingly, the participant device receives the m-dimensional primary random number and the encrypted m-dimensional secondary random number sent by the trusted third-party device.

[0135] S108, the slave participant device generates m-dimensional random data according to its own secret value and a preset secret value set to obtain a first m-dimensional secret value.

[0136] In step S108, the calculation process of the first m-dimensional secret value corresponding to the slave participant may be the same as the calculation process of the first m-dimensional secret value corresponding to the master participant, and will not be described in detail here.

[0137] S109, the slave participant device decrypts the encrypted m-dimensional secondary random number using its own key to obtain a decrypted m-dimensional secondary random number.

[0138] S110, the slave device calculates the second m-dimensional secret value of the slave based on the m-dimensional primary random number, the decrypted m-dimensional secondary random number, and the first m-dimensional secret value of the slave.

[0139] S111, the slave device sends the slave's second m-dimensional secret value to the trusted third-party device.

[0140] Accordingly, the trusted third-party device obtains the second m-dimensional secret value sent from the participant device.

[0141] S112, the trusted third-party device calculates a third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array.

[0142] S113, the trusted third-party device determines the position of the maximum value of the participant's secret value in the preset secret value set based on the third m-dimensional secret value to determine the maximum value, which includes the minimum value and / or maximum value of the participant's secret value.

[0143] S114: The trusted third-party device determines the participant corresponding to the maximum value as the target participant.

[0144] In step S114, the target participant can be determined based on the specific application scenario. For example, in a bidding scenario that protects user privacy, the participant corresponding to the minimum value can be determined as the target participant; in an auction scenario that protects user privacy, the participant corresponding to the maximum value can be determined as the target participant.

[0145] The data processing method of the embodiment of the present application generates a primary random number array corresponding to each participant through a trusted third-party device, and generates a secondary random number array corresponding to each participant through a master participant device. The trusted third party then forwards the secondary random number encrypted by the master participant device to the slave participant device. Each participant device can calculate a second m-dimensional secret value based on the primary random number, the secondary random number, and the first m-dimensional secret value calculated by itself. Then, the trusted third-party device calculates the second m-dimensional secret value to obtain a third m-dimensional secret value. By comparing the third m-dimensional secret value with a preset secret value set, the maximum value of the participant's secret can be determined, thereby determining the target participant corresponding to the maximum value. In this way, for each participant, the primary random number and third m-dimensional secret value of other participants are kept confidential, thereby reducing the risk of several participants colluding to obtain the secret value of one party. For the trusted third party, the secondary random number is kept confidential, thereby reducing the risk of the trusted third party obtaining the secret value of each participant. In this way, the security of determining the maximum value can be improved. Furthermore, on the one hand, in the embodiments of the present application, each participant's device communicates directly with a trusted third-party device, and the participant's devices do not communicate with each other, thereby simplifying the communication process. On the other hand, the embodiments of the present application can be applied to both maximum and minimum value determination, thereby simplifying the calculation process. This can improve the simplicity and efficiency of data processing in the maximum value determination scenario. In this way, the efficiency of the maximum value determination can be improved while improving the security of the maximum value determination.

[0146] In one embodiment, the trusted third-party device sends the m-dimensional primary random number corresponding to the primary participant, the number of participants, and the first instruction to the primary participant device, which may specifically include the following steps performed by the trusted third-party device:

[0147] A target participant is randomly selected from the participants, and the target participant is determined as the main participant.

[0148] Send the m-dimensional primary random number corresponding to the main participant, the number of participants, and the first instruction to the main participant device.

[0149] In this embodiment, a target participant from among the participants can be randomly selected using methods known in the art. As an example, the master participant can be selected by the following steps: sorting and numbering all participants; generating a random number; performing a remainder operation on the random number and the number of participants; and selecting the participant whose number corresponds to the remainder as the master participant, and the remaining participants as slave participants.

[0150] In this embodiment, by randomly selecting participants, any participant has the same probability of being the primary participant, making it difficult to directly steal the specific value of the m-dimensional secondary random number. In particular, when there are many participants, the probability of multiple participants conspiring to steal the second-level random number is further reduced, thereby improving the security of the secondary random number array and, in turn, the security of the maximum value determination.

[0151] In one embodiment, the second-dimensional secret value of the participant may be the sum of the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value corresponding to the participant.

[0152] The trusted third-party device calculates the third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array, which may specifically include the following steps performed by the trusted third-party device:

[0153] The second m-dimensional secret values ​​of the participants are added together to obtain the fourth m-dimensional secret value.

[0154] The third m-dimensional secret value is obtained by subtracting multiple m-dimensional primary random numbers from the fourth m-dimensional secret value.

[0155] It's easy to understand that the aforementioned third m-dimensional secret value can be equal to the sum of the first m-dimensional secret values ​​of each participant. In this way, by adding the second m-dimensional secret values ​​of the participants, the influence of the m-dimensional secondary random number on the third m-dimensional secret value can be eliminated. Because the m-dimensional primary random number is known to the trusted third-party device, the trusted third-party device can calculate the sum of the first m-dimensional secret values ​​of each participant without obtaining the m-dimensional secondary random number. This allows the maximum value of each participant's secret value to be determined without revealing the secret value of each participant to the trusted third-party device, further enhancing the security of the maximum value determination.

[0156] In one embodiment, the first m-dimensional secret value can be an m-dimensional random number generated by the participant based on the position of its own secret value in the preset secret value set, and each first m-dimensional secret value includes 1 non-zero value element and (m-1) zero value elements.

[0157] The trusted third-party device determines the maximum value of the participant's secret value from a preset secret value set based on the third m-dimensional secret value, which may specifically include the following steps performed by the trusted third-party device:

[0158] A first position of a non-zero valued element in the third m-dimensional secret value is determined.

[0159] According to the first position, determine the second position of the maximum value of the participant's secret value in the preset secret value set.

[0160] The secret value corresponding to the second position is determined as the maximum value of the participant's secret value.

[0161] In the first m-dimensional secret value, there may be m elements, and the position of each element can be considered to correspond to the position of a secret value in the preset secret value set. A participant can determine the position of the element corresponding to the target position in the first m-dimensional secret value based on the target position of their own secret value in the preset secret value set, and set the corresponding element to a random non-zero value element, while setting the remaining elements to zero value elements. It is easy to understand that the non-zero value elements in each participant's first m-dimensional secret value can be both positive and negative. Thus, based on the distribution of the non-zero value elements in the third m-dimensional secret value, the position of each party's secret value in the preset secret value set can be determined. For example, when the secret values ​​in the preset secret value set are arranged in ascending order, the secret value corresponding to the first non-zero value element in the third m-dimensional secret value is the minimum value of the participant's secret value; when the secret values ​​in the preset secret value set are arranged in descending order, the secret value corresponding to the first non-zero value element in the third m-dimensional secret value is the maximum value of the participant's secret value. In this way, the maximum value of the secret value of each party can be determined while reducing the risk of leaking the secret value of each party, thereby improving the security of the maximum value determination.

[0162] In one embodiment, the trusted third-party device determines the participant corresponding to the maximum value as the target participant, which may specifically include the following steps performed by the trusted third-party device:

[0163] A first hash commitment and a first m-dimensional secret value sent by a device of each participant are received, where the first hash commitment includes a hash value calculated by the device of the participant based on its own secret value and the first m-dimensional secret value.

[0164] Calculate the second hash commitment corresponding to each participant based on the maximum value and the first m-dimensional secret value of each participant.

[0165] Compare each participant's first hash commitment with the participant's second hash commitment.

[0166] When the first hash commitment is consistent with the second hash commitment, the participant is determined to be the target participant.

[0167] The first and second hash commitments described above can be implemented using algorithms known in the art and will not be detailed here. By comparing the second hash commitments corresponding to the participating parties with the first hash commitments, the maximum value holder can be determined without each participating party revealing its secret value to a trusted third-party device, thereby further improving the security of maximum value determination in privacy-preserving computing scenarios.

[0168] In one embodiment, the master device generates m-dimensional random data based on its own secret value and a set of preset secret values ​​to obtain a first m-dimensional secret value. Specifically, the master device may include the following steps:

[0169] According to the position of its own secret value in the preset secret value set, m-dimensional random data is generated to obtain a first m-dimensional secret value, which includes 1 non-zero value element and (m-1) zero value elements.

[0170] In this way, it is helpful to convert the secret value of the main participant into m-dimensional random data, which is conducive to determining the position of the maximum value of the participant's secret value in the preset secret value set without leaking the secret value of the main participant, thereby helping to improve the security of maximum value determination in privacy-preserving computing scenarios.

[0171] In one embodiment, the master participant device calculates the master participant's second m-dimensional secret value based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the master participant, and the first m-dimensional secret value. Specifically, the master participant device may include the following steps:

[0172] The m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant, and the first m-dimensional secret value are added to obtain the second m-dimensional secret value of the main participant.

[0173] This facilitates the subsequent calculation of the third m-dimensional secret value by eliminating the m-dimensional secondary random number through summation. This allows the determination of the maximum value of each participant's secret value without leaking the m-dimensional secondary random number to a trusted third-party device. This helps improve the security of determining the maximum value in privacy-preserving computing scenarios.

[0174] In one embodiment, the method may further include the following steps performed by the host participant device:

[0175] A first hash commitment and a first m-dimensional secret value are sent to a trusted third-party device for the trusted third-party device to determine the target participant. The first hash commitment includes a hash value calculated by the main participant based on its own secret value and the first m-dimensional secret value. The target participant is the participant corresponding to the maximum value, and the maximum value includes the minimum value and / or maximum value among the secret values ​​of the participants.

[0176] In order to better describe the entire solution, a specific example is given based on the above embodiments, and this is explained in detail below.

[0177] Assume there are n participants P1, P2, ..., P n Hold secret values ​​x1, x2, ..., x n , and x1,…,x n ∈{v1,v2,…,v m}=U, where U is a set of preset secret values, v1, v2,…, v m They can be arranged in descending order. Now we want to calculate the maximum value max(x1,x2,…,x n ) and the minimum value min(x1,x2,…,x n ).

[0178] Each participant P i According to the secret value x held by the party i At the position in U, the corresponding first m-dimensional secret value X is generated by the rule shown in the following formula 1: i ={α i1 ,…,α im}.

[0179]

[0180] Among them, r i is a positive random number.

[0181] Taking the determination of the target participant corresponding to the maximum value of the secret values ​​held by the four participants as an example, the secrets of the four participants P1, P2, P3, and P4 can be α1, α2, α3, and α4 respectively.

[0182] The trusted third-party device can randomly designate a participant (such as P2) as the master participant (Master) and the remaining participants as slave participants (Slave).

[0183] Trusted third-party devices can generate and save 4 m-dimensional first-level random numbers r 11 ,r 12 ,r 13 ,r 14 .

[0184] Subsequently, the trusted third-party device can send the m-dimensional first-level random number r corresponding to P2 to P2 12 , the number of participants and the first instruction, which is used to instruct the Master to generate an m-dimensional secondary random number corresponding to the degree of participation, and to instruct P2 to generate an m-dimensional secondary random number based on its own first m-dimensional secret value, r 12 And the m-dimensional secondary random number corresponding to itself, calculate the corresponding second m-dimensional secret value.

[0185] P2 can generate an m-dimensional secondary random number r in response to the first instruction. 21 ,r 22 ,r 23 ,r 24 , where r 21 +r 22 +r 23 +r 24 =0, and calculate the second m-dimensional secret value α2+r corresponding to P2 12 +r 22 .

[0186] Then, P2 can send α2+r to the trusted third-party device 12 +r 22 , and the encrypted m-dimensional secondary random number corresponding to each Slave [{P1,enc(r 21 )},{P3,enc(r 23 )},{P4,enc(r 24 )}].

[0187] Trusted third-party devices can store α2+r 12 +r 22 , and forwards the encrypted m-dimensional secondary random number to the target slave corresponding to the encrypted m-dimensional secondary random number. For each m-dimensional secondary random number, only the corresponding target slave has the decryption key and can decrypt it to obtain the corresponding m-dimensional secondary random number.

[0188] Each Slave can receive the corresponding encrypted m-dimensional secondary random number and decrypt it to obtain the corresponding m-dimensional secondary random number plaintext, that is, P1 obtains r 21 , that is, P3 gets r 23 , that is, P4 gets r 24 .

[0189] Then, each slave can calculate the second m-dimensional secret value based on the m-dimensional primary random number, m-dimensional secondary random number plaintext and its own first m-dimensional secret value obtained from the trusted third-party device, and send it to the trusted third-party device, that is, P1 sends α1+r to the trusted third-party device. 11 +r 21 , P3 sends α3+r to the trusted third-party device 13 +r 23 , P4 sends α4+r to the trusted third-party device 14 +r 24 The m-dimensional primary random number can be generated by a trusted third-party device and sent directly to the corresponding Slave, or it can be generated by a trusted third-party device and sent to the corresponding Slave together with the encrypted m-dimensional secondary random number.

[0190] As shown in Equation 2, the trusted third-party device accumulates the second m-dimensional secret values ​​sent by each participant and subtracts the previously generated primary random number to obtain the third m-dimensional secret value. Specifically, the calculation process shown in Equation 2 can be repeated m times in parallel or serially for each of the m elements corresponding to the second m-dimensional secret values ​​to complete the calculation of the third m-dimensional secret value.

[0191] β=(α1+r 11 +r 21 )+(α2+r 12 +r 22 )+(α3+r 13 +r 23 )+(α4+r 14 +r 24 )-(r 11 +r 12 +r 13 +r 14 )=(α1+α2+α3+α4)+(r 21 +r 22 +r 23 +r 24 ) Formula 2

[0192] Because r 21 +r 22 +r 23 +r 24 =0, and r 11 ,r 12 ,r 13 ,r 14 It is known to the trusted third party device that the third m-dimensional secret value may be equal to α1+α2+α3+α4.

[0193] The third m-dimensional secret value can also be expressed as Find the position k0 and k1 of the first non-zero value in X from left to right and from right to left respectively, then the value v at the corresponding position in U k0 ,v k1 That is, the maximum and minimum values ​​of each party respectively.

[0194] When confirming the target participant, each Slave can send its own first m-dimensional secret value to the trusted third-party device, and the trusted third party can use the first m-dimensional secret value r to confirm the target participant. i Calculate the hash value C′=H(r i ,Min or Max), and the commitment value C sent by each party before i =H(r i ,α i) to confirm the target participant corresponding to the maximum or minimum value.

[0195] Based on the same inventive concept, the embodiment of the present application further provides a data processing device 200. The data processing device 200 can be applied to a trusted third-party device.

[0196] like Figure 4 As shown, the data processing device 200 may include a generating module 201 , a sending module 202 , an acquiring module 203 , a calculating module 204 and a determining module 205 .

[0197] Generation module 201 is used to generate a first-level random array based on the number of participants, where the participants include a master participant and a slave participant. The first-level random array includes multiple m-dimensional first-level random numbers corresponding to the participants, where m is the number of secret values ​​in a preset secret value set. The preset secret value set includes multiple secret values ​​sorted by numerical value, and the secret value set of the participant is a subset of the preset secret value set.

[0198] A sending module 202 is used to send an m-dimensional primary random number corresponding to the main participant, the number of participants, and a first instruction to the main participant device, where the first instruction is used to instruct the main participant device to generate a secondary random array based on the number of participants, and to instruct the main participant device to calculate the second m-dimensional secret value of the main participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant in the secondary random array, and the first m-dimensional secret value of the main participant, wherein the secondary random array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers is equal to 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on its own secret value and a preset secret value set.

[0199] An acquisition module 203 is configured to acquire a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave parties and sent by the master party device, as well as a second m-dimensional secret value of the master party;

[0200] The sending module 202 is also used to send the m-dimensional primary random number and the m-dimensional secondary random number corresponding to the slave participant to each slave participant device respectively, so that the slave participant device can calculate the second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number and the first m-dimensional secret value of the slave participant.

[0201] The acquisition module 203 is further configured to acquire a second m-dimensional secret value sent from the participant device.

[0202] The calculation module 204 is used to calculate the third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array.

[0203] A determination module 205 is configured to determine, based on the third m-dimensional secret value, a position of a maximum value of the participant's secret value in a preset secret value set, so as to determine a maximum value, where the maximum value includes a minimum value and / or a maximum value among the participant's secret values;

[0204] The determination module 205 is further configured to determine the participant corresponding to the maximum value as the target participant.

[0205] The data processing device of the embodiment of the present application generates a primary random number array corresponding to each participant through a trusted third-party device, and generates a secondary random number array corresponding to each participant through a master participant device. The trusted third party then forwards the secondary random number encrypted by the master participant device to the slave participant device. Each participant device can calculate a second m-dimensional secret value based on the primary random number, the secondary random number, and the first m-dimensional secret value calculated by itself. The trusted third-party device then calculates the second m-dimensional secret value to obtain a third m-dimensional secret value. By comparing the third m-dimensional secret value with a preset secret value set, the maximum value of the participant's secret can be determined, thereby determining the target participant corresponding to the maximum value. In this way, for each participant, the primary random number and third m-dimensional secret value of other participants remain confidential, thereby reducing the risk of several participants colluding to obtain the secret value of one party. For the trusted third party, the secondary random number remains confidential, thereby reducing the risk of the trusted third party obtaining the secret value of each participant. In this way, the security of determining the maximum value can be improved. Furthermore, on the one hand, in the embodiments of the present application, each participant's device communicates directly with a trusted third-party device, and the participant's devices do not communicate with each other, thereby simplifying the communication process. On the other hand, the embodiments of the present application can be applied to both maximum and minimum value determination, thereby simplifying the calculation process. This can improve the simplicity and efficiency of data processing in the maximum value determination scenario. In this way, the efficiency of the maximum value determination can be improved while improving the security of the maximum value determination.

[0206] In one embodiment, the sending module is used to send the m-dimensional primary random number corresponding to the primary participant, the number of participants, and the first instruction to the primary participant device, which may specifically include:

[0207] The determination module is used to randomly select a target participant from the participants and determine the target participant as the main participant.

[0208] The sending module is used to send the m-dimensional primary random number corresponding to the main participant, the number of participants and the first instruction to the main participant device.

[0209] In one embodiment, the second-dimensional secret value of the participant is the sum of the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value corresponding to the participant.

[0210] The calculation module is used to calculate the third m-dimensional secret value based on the second m-dimensional secret value and the first-level random array of the participant, which may specifically include:

[0211] The calculation module is used to add the second m-dimensional secret values ​​of the participants to obtain a fourth m-dimensional secret value.

[0212] The calculation module is used to subtract multiple m-dimensional primary random numbers from the fourth m-dimensional secret value to obtain a third m-dimensional secret value.

[0213] In one embodiment, the first m-dimensional secret value can be an m-dimensional random number generated by the participant based on the position of its own secret value in the preset secret value set, and each first m-dimensional secret value includes 1 non-zero value element and (m-1) zero value elements.

[0214] The determination module is used to determine the maximum value of the participant's secret value from a preset secret value set based on the third m-dimensional secret value, which may specifically include:

[0215] The determination module is used to determine the first position of the non-zero value element in the third m-dimensional secret value.

[0216] The determination module is used to determine, based on the first position, a second position of the maximum value of the participant's secret value in the preset secret value set.

[0217] The determination module is used to determine the secret value corresponding to the second position as the maximum value of the secret value of the participant.

[0218] In one embodiment, the determination module is used to determine the participant corresponding to the maximum value as the target participant, which may specifically include:

[0219] The receiving module is used to receive a first hash commitment and a first m-dimensional secret value sent by a device of each participant, where the first hash commitment includes a hash value calculated by the device of the participant based on its own secret value and the first m-dimensional secret value.

[0220] The calculation module is used to calculate the second hash commitment corresponding to the participant based on the maximum value and the first m-dimensional secret value of each participant.

[0221] The comparison module is used to compare the first hash commitment of each participant with the second hash commitment of the participant.

[0222] A determination module is used to determine that a participant is a target participant when the first hash commitment is consistent with the second hash commitment.

[0223] The data processing device provided in the embodiment of the present application can realize Figure 2 In the method embodiment, the various processes implemented by the trusted third-party device are not described here in detail to avoid repetition.

[0224] Based on the same inventive concept, the embodiment of the present application further provides a data processing device 300. The data processing device 300 can be applied to a primary participant device.

[0225] like Figure 5 As shown, the data processing device 300 may include a generating module 301 , a receiving module 302 , a calculating module 303 and a sending module 304 .

[0226] The generation module 301 is used to generate m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value. The preset secret value set includes multiple secret values ​​sorted by numerical value. The secret value of the participant is included in the preset secret value set. The participant includes a master participant and a slave participant. m is the number of secret values ​​in the preset secret value set.

[0227] The receiving module 302 is used to receive an m-dimensional primary random number, the number of participants and a first instruction sent by a trusted third-party device. The first instruction is used to instruct the main participant device to generate a secondary random array based on the number of participants, and to instruct the main participant device to calculate the second m-dimensional secret value of the main participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant in the secondary random array and the first m-dimensional secret value of the main participant, wherein the secondary random array includes multiple m-dimensional secondary random numbers corresponding to the participants, and the sum of the multiple m-dimensional secondary random numbers is equal to 0.

[0228] The generating module 301 is further configured to generate an m-dimensional secondary random array in response to the first instruction.

[0229] The calculation module 303 is used to respond to the first instruction and calculate the second m-dimensional secret value of the main participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant and the first m-dimensional secret value.

[0230] The sending module 304 is configured to send a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and a second m-dimensional secret value to a trusted third-party device.

[0231] The data processing device of an embodiment of the present application generates, via a master participant device, a secondary random number array corresponding to each participant, and a second m-secret value corresponding to the master participant, based on an m-dimensional primary random number sent by a trusted third-party device, the number of participants, and a first instruction. The trusted third party then forwards the secondary random number, encrypted by the master participant device, to the slave participant device. Each participant device can calculate a second m-secret value based on the primary random number, the secondary random number, and its own calculated first m-secret value. This allows the trusted third-party device to calculate the second m-secret value to obtain a third m-secret value. By comparing the third m-secret value with a preset set of secret values, the maximum value of the participant's secret can be determined, thereby identifying the target participant corresponding to the maximum value. This ensures that the primary random number and third m-secret value of each participant remain confidential to each participant, thereby reducing the risk of collusion between several participants to obtain the secret value of one party. The secondary random number remains confidential to the trusted third party, thereby reducing the risk of the trusted third party obtaining the secret value of each participant. This improves the security of determining the maximum value. Furthermore, on the one hand, in the embodiments of the present application, each participant's device communicates directly with a trusted third-party device, and the participant's devices do not communicate with each other, thereby simplifying the communication process. On the other hand, the embodiments of the present application can be applied to both maximum and minimum value determination, thereby simplifying the calculation process. This can improve the simplicity and efficiency of data processing in the maximum value determination scenario. In this way, the efficiency of the maximum value determination can be improved while improving the security of the maximum value determination.

[0232] In one embodiment, the generation module is configured to generate m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value, which may specifically include:

[0233] The generation module is used to generate m-dimensional random data according to the position of its own secret value in the preset secret value set to obtain a first m-dimensional secret value, where the first m-dimensional secret value includes 1 non-zero value element and (m-1) zero value elements.

[0234] In one embodiment, the calculation module is configured to calculate the second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value, which may specifically include:

[0235] The calculation module is used to add the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant, and the first m-dimensional secret value to obtain the second m-dimensional secret value of the main participant.

[0236] In one embodiment, the data processing device 300 may further include:

[0237] A sending module is used to send a first hash commitment and a first m-dimensional secret value to a trusted third-party device, so that the trusted third-party device can determine the target participant. The first hash commitment includes a hash value calculated by the main participant based on its own secret value and the first m-dimensional secret value. The target participant is the participant corresponding to the maximum value, and the maximum value includes the minimum value and / or maximum value among the secret values ​​of the participants.

[0238] The data processing device provided in the embodiment of the present application can realize Figure 2 In the method embodiment, the various processes implemented by the main participant device are not described here in detail to avoid repetition.

[0239] Figure 6 A schematic diagram of the hardware structure of a data processing device provided in an embodiment of the present application is shown.

[0240] The data processing device may include a processor 401 and a memory 402 storing computer program instructions.

[0241] Specifically, the processor 401 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0242] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.

[0243] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0244] The processor 401 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .

[0245] In one example, the data processing device may further include a communication interface 404 and a bus 410. Figure 5 As shown, the processor 401 , the memory 402 , and the communication interface 404 are connected via a bus 410 and communicate with each other.

[0246] The communication interface 404 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0247] Bus 410 includes hardware, software or both, and the components of online data flow metering equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0248] The data processing device can execute the data processing method in the embodiment of the present application, thereby realizing the combination Figure 3 、 Figure 4 and Figure 5 Described data processing method and device.

[0249] In addition, in conjunction with the data processing methods in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data processing methods in the above embodiments is implemented.

[0250] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0251] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0252] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0253] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0254] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: Applicable to trusted third-party devices, including: Generate a primary random array based on the number of participants, the participants including a master participant and a slave participant, the primary random array including a plurality of m-dimensional primary random numbers corresponding to the participants, where m is the number of secret values ​​in a preset secret value set, the preset secret value set including a plurality of secret values ​​sorted by numerical value, and the secret value set of the participant being a subset of the preset secret value set; Sending an m-dimensional primary random number corresponding to the primary participant, the number of participants, and a first instruction to the primary participant device, wherein the first instruction is used to instruct the primary participant device to generate a secondary random number array based on the number of participants, and instruct the primary participant device to calculate the second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers is equal to 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on the participant's own secret value and the preset secret value set; Obtaining a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and sent by the master party device, as well as a second m-dimensional secret value of the master party; sending the m-dimensional primary random number and the m-dimensional secondary random number corresponding to each slave participant to each slave participant device, so that the slave participant device calculates the second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value of the slave participant; Obtaining the second m-dimensional secret value sent from the participant device; Calculating a third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array; Determining, based on the third m-dimensional secret value, a position of a maximum value of the participant's secret value in the preset secret value set to determine the maximum value, wherein the maximum value includes a minimum value and / or a maximum value among the participant's secret values; The participant corresponding to the maximum value is determined as the target participant.

2. The method according to claim 1, characterized in that The sending of the m-dimensional primary random number corresponding to the primary participant, the number of participants, and the first instruction to the primary participant device includes: Randomly selecting a target participant from the participants, and determining the target participant as the main participant; Sending an m-dimensional primary random number corresponding to the main participant, the number of participants, and the first instruction to the main participant device.

3. The method according to claim 1, characterized in that The second-dimensional secret value of the participant is the sum of the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value corresponding to the participant; The calculating of a third m-dimensional secret value according to the second m-dimensional secret value of the participant and the first-level random array includes: Adding the second m-dimensional secret values ​​of the participants to obtain a fourth m-dimensional secret value; The third m-dimensional secret value is obtained by subtracting the multiple m-dimensional primary random numbers from the fourth m-dimensional secret value.

4. The method according to any one of claims 1 to 3, characterized in that The first m-dimensional secret value is an m-dimensional random number generated by a participant according to the position of its own secret value in the preset secret value set, and each of the first m-dimensional secret values ​​includes one non-zero value element and (m-1) zero value elements; Determining the maximum value of the participant's secret value from the preset secret value set according to the third m-dimensional secret value includes: Determining a first position of a non-zero value element in the third m-dimensional secret value in the third m-dimensional secret value; Determine, based on the first position, a second position of the maximum value of the participant's secret value in the preset secret value set; The secret value corresponding to the second position is determined as the maximum value of the participant's secret value.

5. The method according to claim 1, wherein Determining the participant corresponding to the maximum value as the target participant includes: Receiving a first hash commitment and a first m-dimensional secret value sent by a device of each of the participants, where the first hash commitment includes a hash value calculated by the device of the participant based on its own secret value and the first m-dimensional secret value; Calculating a second hash commitment corresponding to each participant based on the maximum value and the first m-dimensional secret value of each participant; Comparing the first hash commitment of each participant with the second hash commitment of the participant; When the first hash commitment is consistent with the second hash commitment, the participant is determined to be the target participant.

6. A data processing method, characterized in that: Applicable to the main participant's equipment, including: Generate m-dimensional random data based on the user's secret value and a preset secret value set to obtain a first m-dimensional secret value, wherein the preset secret value set includes a plurality of secret values ​​sorted by numerical value, the secret value of each participant is included in the preset secret value set, and the participants include the master participant and the slave participant, and m is the number of secret values ​​in the preset secret value set; Receiving an m-dimensional primary random number, the number of participants, and a first instruction sent by a trusted third-party device, wherein the first instruction is used to instruct the primary participant device to generate a secondary random number array based on the number of participants, and instruct the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, an m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, and the sum of the multiple m-dimensional secondary random numbers is equal to 0; In response to the first instruction, generating the m-dimensional secondary random array; In response to the first instruction, calculating a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value; Sending a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and the second m-dimensional secret value to the trusted third-party device.

7. The method according to claim 6, characterized in that The generating of m-dimensional random data according to the own secret value and the preset secret value set to obtain a first m-dimensional secret value includes: According to the position of the secret value of the self in the preset secret value set, m-dimensional random data is generated to obtain the first m-dimensional secret value, which includes 1 non-zero value element and (m-1) zero value elements.

8. The method according to claim 6, characterized in that The calculating the second m-dimensional secret value of the main participant according to the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant, and the first m-dimensional secret value includes: The m-dimensional primary random number, the m-dimensional secondary random number corresponding to the main participant, and the first m-dimensional secret value are added to obtain a second m-dimensional secret value of the main participant.

9. The method according to any one of claims 6 to 8, characterized in that The method further comprises: A first hash commitment and the first m-dimensional secret value are sent to the trusted third-party device for the trusted third-party device to determine the target participant, the first hash commitment including the hash value calculated by the main participant based on its own secret value and the first m-dimensional secret value, the target participant is the participant corresponding to the maximum value, and the maximum value includes the minimum value and / or maximum value among the secret values ​​of the participants.

10. A data processing device, characterized in that: Applicable to trusted third-party devices, including: a generation module, configured to generate a primary random array based on the number of participants, the participants including a master participant and a slave participant, the primary random array including a plurality of m-dimensional primary random numbers corresponding to the participants, where m is the number of secret values ​​in a preset secret value set, the preset secret value set including a plurality of secret values ​​sorted by numerical value, and the secret value set of the participant being a subset of the preset secret value set; a sending module, configured to send an m-dimensional primary random number corresponding to a primary participant, the number of participants, and a first instruction to a primary participant device, wherein the first instruction is configured to instruct the primary participant device to generate a secondary random number array based on the number of participants, and to instruct the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, the sum of the multiple m-dimensional secondary random numbers equals 0, and the first m-dimensional secret value is an m-dimensional random number generated by the participant based on the participant's own secret value and the preset secret value set; an acquisition module, configured to acquire a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave parties and sent by the master party device, and a second m-dimensional secret value of the master party; The sending module is further configured to send the m-dimensional primary random number and the m-dimensional secondary random number corresponding to each slave participant to each slave participant device, so that the slave participant device calculates the second m-dimensional secret value of the slave participant based on the m-dimensional primary random number, the m-dimensional secondary random number, and the first m-dimensional secret value of the slave participant; The acquisition module is further configured to acquire the second m-dimensional secret value sent from the participant device; a calculation module, configured to calculate a third m-dimensional secret value based on the second m-dimensional secret value of the participant and the first-level random array; a determination module, configured to determine, based on the third m-dimensional secret value, a position of a maximum value of the participant's secret value in the preset secret value set, so as to determine the maximum value, wherein the maximum value includes a minimum value and / or a maximum value among the participant's secret values; The determining module is further configured to determine the participant corresponding to the maximum value as the target participant.

11. A data processing device, characterized in that: Applicable to the main participant's equipment, including: a generation module, configured to generate m-dimensional random data based on its own secret value and a preset secret value set to obtain a first m-dimensional secret value, wherein the preset secret value set includes a plurality of secret values ​​sorted by numerical value, the secret values ​​of the participants are included in the preset secret value set, the participants include the master participant and the slave participant, and m is the number of secret values ​​in the preset secret value set; a receiving module, configured to receive an m-dimensional primary random number, the number of participants, and a first instruction sent by a trusted third-party device, wherein the first instruction is configured to instruct the primary participant device to generate a secondary random number array based on the number of participants, and to instruct the primary participant device to calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, an m-dimensional secondary random number corresponding to the primary participant in the secondary random number array, and the first m-dimensional secret value of the primary participant, wherein the secondary random number array includes multiple m-dimensional secondary random numbers corresponding to the participants, and the sum of the multiple m-dimensional secondary random numbers is equal to 0; The generating module is further configured to generate the m-dimensional secondary random array in response to the first instruction; a calculation module, configured to, in response to the first instruction, calculate a second m-dimensional secret value of the primary participant based on the m-dimensional primary random number, the m-dimensional secondary random number corresponding to the primary participant, and the first m-dimensional secret value; A sending module is used to send a plurality of encrypted m-dimensional secondary random numbers corresponding to the slave party and the second m-dimensional secret value to the trusted third-party device.

12. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 9 is implemented.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 9 is implemented.

14. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the data processing method according to any one of claims 1 to 9.