Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification one or more embodiment.Phase
Instead, they are only some aspects phases with the one or more embodiments of as detailed in the attached claim, this specification
The example of consistent device and method.
It should be understood that the sequence that might not show and describe according to this specification in other embodiments executes
The step of correlation method.In some other embodiments, step included by method can than described in this specification more
It is more or less.In addition, single step described in this specification, may be broken down into other embodiments multiple steps into
Row description;And multiple steps described in this specification, it may also be merged into single step progress in other embodiments
Description.
Fig. 1 is a kind of configuration diagram for Secure extremal system that an exemplary embodiment provides.As shown in Figure 1,
The system may include issuer 11, network 12 and several data sides, such as data side 13, data side 14 and data side 15 etc..
Issuer, data side are respectively the different role in this specification technical solution, for example data side 13-15 holds simultaneously
Data (such as private data or other kinds of private data) disclosed in maintenance inconvenience, and issuer 11 is used to initiate to data side
It requests, to know the extreme value in the held data in each data side.
Issuer 11, data side 13-15, which can be specifically carried on, to be calculated in equipment.The calculating equipment may include server
Or user equipment.For example, server can be able to be host for the physical server comprising a unique host or the server
The virtual server of cluster carrying;User equipment may include mobile phone, tablet device, laptop, palm PC (PDAs,
PersonalDigital Assistants), wearable device (such as smart glasses, smart watches), PC etc., this specification one
A or multiple embodiments are limited not to this.And the network 12 interacted between data side 13-15, issuer 11, it can
To include a plurality of types of wired or wireless networks.In one embodiment, which may include internet.
Fig. 2 is the configuration diagram for another Secure extremal system that an exemplary embodiment provides.Such as Fig. 2 institute
Show, which may include network 21 and several data sides, such as data side 22, data side 23 and data side 24 etc..
Data side 22-24 holds and safeguards data disclosed in inconvenience (such as private data or other kinds of private data).
Other than as this role of data side, the data side 22-24 in the present embodiment is also used as this role of issuer, i.e.,
It can mutually initiate to request between data side 22-24, to know the extreme value in the held data of data side 22-24.
Data side 22-24, which can be specifically carried on, to be calculated in equipment.The calculating equipment may include that server or user set
It is standby.For example, server can be able to be mainframe cluster carrying for the physical server comprising a unique host or the server
Virtual server;User equipment may include mobile phone, tablet device, laptop, palm PC, wearable device (such as
Smart glasses, smart watches etc.), PC etc., this specification one or more embodiment is limited not to this.And data side
The network 21 interacted between 22-24 may include a plurality of types of wired or wireless networks.In one embodiment, the net
Network 21 may include internet.
Fig. 3 is that a kind of extreme value for data side side that an exemplary embodiment provides determines the flow chart of method.Such as Fig. 3 institute
Show, this method is applied to any data side i in 1~n of data side;The method may include following steps:
Step 302, data side i is directed to the data Si itself held, generates corresponding character string group Xi.
In one embodiment, character string group Xi may include Ti sections and meet the first kind character string of the first value rule, H-
Ti sections of the second class character strings for meeting the second value rule, Ti and Si meet default value relationship, 1≤i≤n and 0≤Ti≤H.
In one embodiment, data side i is any data side in 1~n of data side, i.e. 1~n of data side actually needs
Implement the relevant operation implemented needed for data side i respectively.For example, 1~n of data side needs respectively for the data S1 itself held
~Sn and generate corresponding character string group X1~Xn.
In one embodiment, according to the value condition of Si itself, there may be not for the default value relationship between Si and Ti
Together.For example, the default value relationship can be Ti=Si when the value of S1~Sn is non-negative;For another example when S1~Sn's
Value is non-timing, which can be Ti=-Si;In another example when the value of S1~Sn, which has, just has negative, one
The default value relationship can be Ti=Si+a in the case of kind, and wherein S1+a~Sn+a is non-negative, this is pre- in another case
If numerical relation can be Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just.As it can be seen that compare for the ease of implementing numerical value,
, so that S1~Sn to be uniformly transformed to non-negative value, correlation values can be then participated in by the way that Si is converted to corresponding Ti
In comparing.
In one embodiment, H can be for any integer for being not less than Ti, and the value to ensure H-Ti is non-negative.For example, working as Ti
Value when being 8 bit, can determine that the value of Ti is necessarily not more than 28=256, thus H=256 can be chosen.
In the case where ensuring H not less than Ti, by choosing H value as small as possible, the entire length of character string group Xi can be limited
Relatively smaller (length H) is made, to reduce the traffic generated in subsequent comparison procedure, helps to be promoted to extreme value
Determine efficiency.
Step 304, data side i by character string group Xi be provided to other data sides generate character string group X1~Xi-1,
Xi+1~Xn carries out multi-party computations, so that issuer is obtained the output of the multi-party computations, to determine in S1~Sn
Extreme value.
In one embodiment, the value of the output is COMPREHENSIVE CALCULATING knot of the character string group X1~Xn based on preset algorithm
Fruit, the COMPREHENSIVE CALCULATING result are matched with the first value rule and second value rule.Correspondingly, the issuer
Can the first kind character string according to contained by the COMPREHENSIVE CALCULATING result quantity and the default value relationship, determine in S1~Sn
Extreme value.
In one embodiment, by the way that data S1~Sn is converted to corresponding character string group X1~Xn, so that data side 1~
Relatively more simply processing logic, less traffic relatively is (for example and based entirely on obscuring circuit between n and issuer
Extreme value determines that scheme is compared), it can accurately know the extreme value in S1~Sn, facilitate the beam worker for greatly simplifying early period
Make, and treatment effeciency can be promoted significantly.Meanwhile by providing 1~data side, data side n by character string group X1~Xn
To multi-party calculating with high safety, so that issuer is without in the case where knowing each character string group X1~Xn respectively, it is only necessary to
Output, i.e. COMPREHENSIVE CALCULATING of the character string group X1~Xn based on preset algorithm that is obtained according to the multi-party computations as a result,
Determine the extreme value in S1~Sn, it can be ensured that the value leakage that not will cause X1~Xn or S1~Sn in calculating process has
High Information Security.
In one embodiment, the algorithm of multi-party computations used by the type of the preset algorithm can be matched with,
So that the output of multi-party computations is COMPREHENSIVE CALCULATING result of the character string group X1~Xn based on preset algorithm.For example, working as institute
State multi-party computations be Secure read group total when, the preset algorithm can for summation algorithm;For another example working as the peace
When being calculated as the calculating of Secure exclusive or in many ways entirely, the preset algorithm can be exclusive or algorithm;Certainly, this specification is not right
This is limited.
In one embodiment, data side i can be handled character string group Xi as character string group Mi after corresponding cover;It is practical
On, 1~n of data side is both needed to respectively handle character string group X1~Xn for character string group M1~Mn after corresponding cover.Wherein, right
The processing mode of character string group Xi depends on the algorithm of used multi-party computations, and the processing mode is pre- with subsequent use
It cooperates between imputation method, after ensuring that character string group M1~Mn is respectively sent to issuer by 1~n of data side after covering,
Issuer can based on the preset algorithm to after cover character string group M1~Mn carry out COMPREHENSIVE CALCULATING, obtain character string group X1~
COMPREHENSIVE CALCULATING result of the Xn based on the preset algorithm.
For example, can share two-by-two between 1~n of data side has preset secret random number, such as in data side 1 and data
Sharing between side 2 has random number R12, shared between data side 2 and data side 3 and have random number R23, data side 1 and data side 3 it
Between share have random number R13Deng.It, can be by the way that character string group Xi and data side i be shared when using Secure read group total
Random number be added or subtracted each other, character string group Mi after corresponding cover can be obtained;For example, working as M1=X1+R12+R13、M2
=X2-R12+R23, M3=X3-R13-R23When, M1+M2+M3=X1+R12+R13+X2-R12+R23+X3-R13-R23=X1+X2+X3,
So that issuer only needs for character string group M1~Mn after cover to be added the summation knot that can be obtained character string group X1~Xn
Fruit, using as above-mentioned COMPREHENSIVE CALCULATING result.It, can be by by character string group Xi and number when being calculated using Secure exclusive or
Exclusive or calculating is carried out according to the random number that square i shares, character string group Mi after corresponding cover can be obtained;For example, working as When,
So that issuer, which only needs to carry out character string group M1~Mn after cover exclusive or calculating, can be obtained character string group X1~Xn
Exclusive or as a result, using as above-mentioned COMPREHENSIVE CALCULATING result.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the first kind character string.For example, first kind character string can (value be non-for random string
Zero), the second class character string can be zero-value word symbol string, and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy:
The result that summation or exclusive or obtain between random string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between value character string remains as to be asked between zero character string, random string and zero character string
And/or the result that exclusive or obtains is random string.Certainly, by formulating appropriate value rule and/or preset algorithm, may be used also
With using first kind character string, the second class character string of other forms, this specification is limited not to this.
By taking first kind character string is random string, the second class character string is zero character string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti=Si, and the quantity of random string contained by COMPREHENSIVE CALCULATING result is in T1~Tn
Maximum value, thus may finally determine the maximum value in S1~Sn.When S1~Sn is non-timing, the default value is closed
System shows Ti=-Si, and the quantity of random string contained by COMPREHENSIVE CALCULATING result is the maximum value in T1~Tn, thus may finally
Determine the minimum value in S1~Sn, the i.e. corresponding negative of quantity of random string contained by COMPREHENSIVE CALCULATING result.As S1~Sn
Have when just having negative, it is assumed that default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-negative, COMPREHENSIVE CALCULATING result institute
Quantity containing random string is the maximum value in T1~Tn, thus may finally determine the maximum value in S1~Sn, i.e., comprehensive
The difference of the quantity and a of closing random string contained by calculated result (eliminates the value offset a) between Ti and Si;Or, it is assumed that
Default value relationship shows Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, random string contained by COMPREHENSIVE CALCULATING result
Quantity be maximum value in T1~Tn, thus may finally determine the minimum value in S1~Sn, i.e. COMPREHENSIVE CALCULATING result institute
The corresponding negative of the difference of quantity and b containing random string (eliminates the value offset b and sign symbol between Ti and Si
Variation).
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the second class character string.For example, first kind character string can be zero-value word symbol string, the second class word
Symbol string can be random string (value non-zero), and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy: with
The result that summation or exclusive or obtain between machine character string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between character string remains as sums between zero character string, random string and zero character string
Or the result that exclusive or obtains is random string.It certainly, can be with by formulating appropriate value rule and/or preset algorithm
Using the first kind character string of other forms, the second class character string, this specification is limited not to this.
By taking first kind character string is zero character string, the second class character string is random string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti=Si, and the quantity of zero character string contained by COMPREHENSIVE CALCULATING result is in T1~Tn
Minimum value, thus may finally determine the minimum value in S1~Sn.When S1~Sn is non-timing, the default value is closed
System shows Ti=-Si, and the quantity of zero character string contained by COMPREHENSIVE CALCULATING result is the minimum value in T1~Tn, thus may finally
Determine the maximum value in S1~Sn, the i.e. corresponding negative of quantity of zero character string contained by COMPREHENSIVE CALCULATING result.As S1~Sn
Have when just having negative, it is assumed that default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-negative, COMPREHENSIVE CALCULATING result institute
The quantity of the character string containing zero is the minimum value in T1~Tn, thus may finally determine the minimum value in S1~Sn, i.e., comprehensive
The difference of the quantity and a of closing zero character string contained by calculated result (eliminates the value offset a) between Ti and Si;Or, it is assumed that
Default value relationship shows Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, zero character string contained by COMPREHENSIVE CALCULATING result
Quantity be minimum value in T1~Tn, thus may finally determine the maximum value in S1~Sn, i.e. COMPREHENSIVE CALCULATING result institute
The corresponding negative of the difference of quantity and b of the character string containing zero (eliminates the value offset b and sign symbol between Ti and Si
Variation).
Fig. 4 is that a kind of extreme value for issuer side that an exemplary embodiment provides determines the flow chart of method.Such as Fig. 4 institute
Show, this method is applied to issuer;The method may include following steps:
Step 402, issuer obtains the output that multi-party computations are carried out to character string group X1~Xn, and the output takes
Value is COMPREHENSIVE CALCULATING result of the character string group X1~Xn based on preset algorithm.
In one embodiment, the character string group X1~Xn be directed to respectively by 1~n of data side the data S1 that itself holds~
Sn and generate, character string group Xi include Ti sections meet the first kind character string of the first value rule, H-Ti sections meet the second value
Second class character string of rule, Ti and Si meet default value relationship, 1≤i≤n and 0≤Ti≤H;Wherein, the COMPREHENSIVE CALCULATING
As a result the first value rule and second value rule are matched with.
In one embodiment, character string group Xi is generated by data side i, and data side i is any number in 1~n of data side
According to side.In fact, 1~n of data side needs to implement respectively the relevant operation implemented needed for data side i, to generate corresponding character
String group X1~Xn, such as character string group X1~Xn separately include T1~Tn sections of first kind character strings, H-T1~H-Tn the second class of section
Character string.
In one embodiment, according to the value condition of Si itself, there may be not for the default value relationship between Si and Ti
Together.For example, the default value relationship can be Ti=Si when the value of S1~Sn is non-negative;For another example when S1~Sn's
Value is non-timing, which can be Ti=-Si;In another example when the value of S1~Sn, which has, just has negative, one
The default value relationship can be Ti=Si+a in the case of kind, and wherein S1+a~Sn+a is non-negative, this is pre- in another case
If numerical relation can be Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just.As it can be seen that compare for the ease of implementing numerical value,
, so that S1~Sn to be uniformly transformed to non-negative value, correlation values can be then participated in by the way that Si is converted to corresponding Ti
In comparing.
In one embodiment, H can be for any integer for being not less than Ti, and the value to ensure H-Ti is non-negative.For example, working as Ti
Value when being 8 bit, can determine that the value of Ti is necessarily not more than 28=256, thus H=256 can be chosen.
In the case where ensuring H not less than Ti, by choosing H value as small as possible, the entire length of character string group Xi can be limited
Relatively smaller (length H) is made, to reduce the traffic generated in subsequent comparison procedure, helps to be promoted to extreme value
Determine efficiency.
Step 404, the quantity of issuer first kind character string according to contained by the COMPREHENSIVE CALCULATING result and described pre-
If numerical relation, the extreme value in S1~Sn is determined.
In one embodiment, the value of the output is COMPREHENSIVE CALCULATING knot of the character string group X1~Xn based on preset algorithm
Fruit, the COMPREHENSIVE CALCULATING result are matched with the first value rule and second value rule.Correspondingly, the issuer
Can the first kind character string according to contained by the COMPREHENSIVE CALCULATING result quantity and the default value relationship, determine in S1~Sn
Extreme value.
In one embodiment, by the way that data S1~Sn is converted to corresponding character string group X1~Xn, so that data side 1~
Relatively more simply processing logic, less traffic relatively is (for example and based entirely on obscuring circuit between n and issuer
Extreme value determines that scheme is compared), it can accurately know the extreme value in S1~Sn, facilitate the beam worker for greatly simplifying early period
Make, and treatment effeciency can be promoted significantly.Meanwhile by providing 1~data side, data side n by character string group X1~Xn
To multi-party calculating with high safety, so that issuer is without in the case where knowing each character string group X1~Xn respectively, it is only necessary to
Output, i.e. COMPREHENSIVE CALCULATING of the character string group X1~Xn based on preset algorithm that is obtained according to the multi-party computations as a result,
Determine the extreme value in S1~Sn, it can be ensured that the value leakage that not will cause X1~Xn or S1~Sn in calculating process has
High Information Security.
In one embodiment, the algorithm of multi-party computations used by the type of the preset algorithm can be matched with,
So that the output of multi-party computations is COMPREHENSIVE CALCULATING result of the character string group X1~Xn based on preset algorithm.For example, working as institute
State multi-party computations be Secure read group total when, the preset algorithm can for summation algorithm;For another example working as the peace
When being calculated as the calculating of Secure exclusive or in many ways entirely, the preset algorithm can be exclusive or algorithm;Certainly, this specification is not right
This is limited.
In one embodiment, data side i can be handled character string group Xi as character string group Mi after corresponding cover;It is practical
On, 1~n of data side is both needed to respectively handle character string group X1~Xn for character string group M1~Mn after corresponding cover.Wherein, right
The processing mode of character string group Xi depends on the algorithm of used multi-party computations, and the processing mode is pre- with subsequent use
It cooperates between imputation method, after ensuring that character string group M1~Mn is respectively sent to issuer by 1~n of data side after covering,
Issuer can based on the preset algorithm to after cover character string group M1~Mn carry out COMPREHENSIVE CALCULATING, obtain character string group X1~
COMPREHENSIVE CALCULATING result of the Xn based on the preset algorithm.
For example, can share two-by-two between 1~n of data side has preset secret random number, such as in data side 1 and data
Sharing between side 2 has random number R12, shared between data side 2 and data side 3 and have random number R23, data side 1 and data side 3 it
Between share have random number R13Deng.It, can be by the way that character string group Xi and data side i be shared when using Secure read group total
Random number be added or subtracted each other, character string group Mi after corresponding cover can be obtained;For example, working as M1=X1+R12+R13、M2
=X2-R12+R23, M3=X3-R13-R23When, M1+M2+M3=X1+R12+R13+X2-R12+R23+X3-R13-R23=X1+X2+X3,
So that issuer only needs for character string group M1~Mn after cover to be added the summation knot that can be obtained character string group X1~Xn
Fruit, using as above-mentioned COMPREHENSIVE CALCULATING result.It, can be by by character string group Xi and number when being calculated using Secure exclusive or
Exclusive or calculating is carried out according to the random number that square i shares, character string group Mi after corresponding cover can be obtained;For example, working as When,
So that issuer, which only needs to carry out character string group M1~Mn after cover exclusive or calculating, can be obtained character string group X1~Xn
Exclusive or as a result, using as above-mentioned COMPREHENSIVE CALCULATING result.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the first kind character string.For example, first kind character string can (value be non-for random string
Zero), the second class character string can be zero-value word symbol string, and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy:
The result that summation or exclusive or obtain between random string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between value character string remains as to be asked between zero character string, random string and zero character string
And/or the result that exclusive or obtains is random string.Certainly, by formulating appropriate value rule and/or preset algorithm, may be used also
With using first kind character string, the second class character string of other forms, this specification is limited not to this.
By taking first kind character string is random string, the second class character string is zero character string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti=Si, and the quantity of random string contained by COMPREHENSIVE CALCULATING result is in T1~Tn
Maximum value, thus may finally determine the maximum value in S1~Sn.When S1~Sn is non-timing, the default value is closed
System shows Ti=-Si, and the quantity of random string contained by COMPREHENSIVE CALCULATING result is the maximum value in T1~Tn, thus may finally
Determine the minimum value in S1~Sn, the i.e. corresponding negative of quantity of random string contained by COMPREHENSIVE CALCULATING result.As S1~Sn
Have when just having negative, it is assumed that default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-negative, COMPREHENSIVE CALCULATING result institute
Quantity containing random string is the maximum value in T1~Tn, thus may finally determine the maximum value in S1~Sn, i.e., comprehensive
The difference of the quantity and a of closing random string contained by calculated result (eliminates the value offset a) between Ti and Si;Or, it is assumed that
Default value relationship shows Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, random string contained by COMPREHENSIVE CALCULATING result
Quantity be maximum value in T1~Tn, thus may finally determine the minimum value in S1~Sn, i.e. COMPREHENSIVE CALCULATING result institute
The corresponding negative of the difference of quantity and b containing random string (eliminates the value offset b and sign symbol between Ti and Si
Variation).
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the second class character string.For example, first kind character string can be zero-value word symbol string, the second class word
Symbol string can be random string (value non-zero), and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy: with
The result that summation or exclusive or obtain between machine character string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between character string remains as sums between zero character string, random string and zero character string
Or the result that exclusive or obtains is random string.It certainly, can be with by formulating appropriate value rule and/or preset algorithm
Using the first kind character string of other forms, the second class character string, this specification is limited not to this.
By taking first kind character string is zero character string, the second class character string is random string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti=Si, and the quantity of zero character string contained by COMPREHENSIVE CALCULATING result is in T1~Tn
Minimum value, thus may finally determine the minimum value in S1~Sn.When S1~Sn is non-timing, the default value is closed
System shows Ti=-Si, and the quantity of zero character string contained by COMPREHENSIVE CALCULATING result is the minimum value in T1~Tn, thus may finally
Determine the maximum value in S1~Sn, the i.e. corresponding negative of quantity of zero character string contained by COMPREHENSIVE CALCULATING result.As S1~Sn
Have when just having negative, it is assumed that default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-negative, COMPREHENSIVE CALCULATING result institute
The quantity of the character string containing zero is the minimum value in T1~Tn, thus may finally determine the minimum value in S1~Sn, i.e., comprehensive
The difference of the quantity and a of closing zero character string contained by calculated result (eliminates the value offset a) between Ti and Si;Or, it is assumed that
Default value relationship shows Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, zero character string contained by COMPREHENSIVE CALCULATING result
Quantity be minimum value in T1~Tn, thus may finally determine the maximum value in S1~Sn, i.e. COMPREHENSIVE CALCULATING result institute
The corresponding negative of the difference of quantity and b of the character string containing zero (eliminates the value offset b and sign symbol between Ti and Si
Variation).
Fig. 5 is the schematic diagram of a scenario that a kind of safety that an exemplary embodiment provides seeks extreme value.As shown in Figure 5, it is assumed that number
3 financial institutions are corresponded respectively to according to side 13~15, and user UX has invested the money of several numbers in 3 financial institutions respectively
Gold, and amount of the fund is saved by data side 13~15 respectively.And issuer 11 can for assets fact-finding organ or other, should
Issuer 11 needs to know the maximum capital amount that the user UX is thrown in a financial institution, this implementation from data side 13~15
Example can satisfy the data query requirements of issuer 11, and can be to avoid revealing the fund number that data side 13~15 saves respectively
Volume, i.e. issuer 11 can not determine which data side the maximum capital amount that it is known derives from.
It is assumed that the numerical value that data side 13, data side 14 and data side 15 safeguard respectively is S1, S2 and S3.Data side 13~15
Held numerical value S1~S3 can be converted into corresponding character string group X1~X3 respectively.Before conversion, a numerical value can be determined
H, and ensure that the value of the H is necessarily not less than numerical value S1~S3;For example, when numerical value S1~S3 is saved as binary numeral, and
When the binary numeral is 8, it can determine that numerical value S1~S3 is necessarily not more than 28=256, then H=256 can be set
Or other values (255 should be not less than).
Numerical value S1~S3 can be converted to corresponding numerical value T1~T3 by data side 13~15;Wherein, due to the present embodiment
For fund scene, the value of numerical value S1~S3 can be determined as non-negative, thus can make T1=S1, T2=S2, T3=S3.Accordingly
Ground, data side 13~15 can generate corresponding character string group X1~X3 according to numerical value T1~T3 and H, so that character string group X1
Comprising T1 sections of random strings, H-T1 sections of zero character strings, character string group X2 includes T2 sections of random strings, H-T2 sections of zero-value words
Symbol string, character string group X3 include T3 sections of random strings, H-T3 sections of zero character strings.
For ease of description, it is assumed that S1=6, S2=3, S3=2, H=8 can be determined: T1=S1=6, H-T1=2, T2
=S2=3, H-T2=5, T3=S3=2, H-T3=6.Fig. 6 is a kind of pair of character string group that one of exemplary embodiment provides
The schematic diagram handled.As shown in Figure 6, it is assumed that black rectangle block indicates that random string, white rectangle block indicate zero-value word
Symbol string, the 1st~6 rectangular block of character string group X1 can for black rectangle block (corresponding to T1=6), the 7-8 rectangular block
Think white rectangle block (corresponding to H-T1=2), the 1st~3 rectangular block of character string group X2 can be (corresponding for black rectangle block
In T2=3), the 4th~8 rectangular block can be white rectangle block (corresponding to H-T2=5), the 1-2 square of character string group X3
It can be white rectangle block (corresponding to H-T3=that shape block, which can be black rectangle block (correspond to T3=2), the 3rd~8 rectangular block,
6)。
Further, data side 13~15 can cooperate, to carry out safety for corresponding character string group X1~X3
It is multi-party to calculate, enable issuer 11 to determine extreme value according to the result of the multi-party computations, without exposure numerical value S1~
S3 or character string group X1~X3.
Multi-party computations can be using safety summation algorithm.It is assumed that sharing two-by-two between data side 13~15 has secret
The random number shared between random number, such as data side 13 and data side 14 is R12, share between data side 14 and data side 15
Random number be R23, the random number shared between data side 13 and data side 15 be R13.Correspondingly, data side 13~15 can be with
By by character string group X1~X3 and itself grasp random number carry out plus-minus calculating, with the value to character string group X1~X3 into
Row is covered, character string group M1~M3 after being covered.
It is assumed that sharing between data side u and data side v has secret random number R uv, wherein u < v.So, as data side u
When being covered to character string group Xu, character string group Xu can be added with random number R uv;When data side v is to character string group Xv
When being covered, character string group Xv and random number R uv can be subtracted each other.Based on above-mentioned rule, the available cover in data side 13
Character string group M1=X1+R afterwards12+R13, character string group M2=X2-R after the available cover in data side 1412+R23, data side 15 can
With character string group M3=X3-R after being covered13-R23。
Multi-party computations can use safe exclusive or algorithm.Still with above-mentioned random number R12, random number R23, random number R13
For, data side 13~15 can be by carrying out exclusive or calculating for character string group X1~X3 and the random number itself grasped, to word
The value of symbol string group X1~X3 is covered, character string group M1~M3 after being covered.For example, after the available cover in data side 13
Character string groupCharacter string group after the available cover in data side 14
Character string group after the available cover in data side 15
Then, character string group M1~M3 is sent to issuer 11 after the cover that data side 13~15 respectively obtains itself,
Issuer 11 is calculated for character string group M1~M3 after covering.If above-mentioned multi-party computations use
Safety summation algorithm obtains M1+M2+M3=X1+R then character string group M1~M3 should be added by issuer 1112+R13+X2-
R12+R23+X3-R13-R23=X1+X2+X3, i.e. issuer 11, can be in the case where not needing to know character string group X1~X3 respectively
Obtain the read group total result of X1~X3.If above-mentioned multi-party computations use safe exclusive or algorithm, issuer 11
Character string group M1~M3 should be subjected to exclusive or calculating, obtained I.e. issuer 11 is not needing to know character string group X1~X3's respectively
In the case of, the exclusive or calculated result of available X1~X3.
Due to meeting following three kinds of situations: 1. random string and random character between random string and zero character string
It is still that random string, 2. zero character string and zero character string carry out summation or different that string, which carries out summation or the result of exclusive or calculating,
Or the result calculated is still zero character string, 3. random string sum with zero character string or the result of exclusive or calculating is
Random string, thus as shown in Figure 6: when character string group X1 and X2 carries out summation or exclusive or processing, the 1st~3 character string symbol
Close the case where stating 1., the 4th~6 character string meet above-mentioned situation 3., the 7-8 character string meet above-mentioned situation 2.,
It is zero character string that the result so obtained, which makes the 1st~6 character string be random string, the 7-8 character string,;Into one
Step with character string group X3 carry out summation or exclusive or handle when, the 1-2 character string meet above-mentioned situation 1., the 3rd~6 character
String meet above-mentioned situation 3., the 7-8 character string meet above-mentioned situation 2., the final result because obtained from are as follows: the 1st~6
A character string is random string, the 7-8 character string is zero character string.
Therefore, by reading the quantity for the random string that above-mentioned final result is included, final result packet can be determined
Containing 6 random strings, it may be assumed that the maximum value in T1~T3 is 6;Further, due to Ti=Si (1≤i in above-described embodiment
≤ 3), thus can determine the maximum value in numerical value S1~S3 be 6.
In the embodiment shown in fig. 6, the structure that character string group X1~X3 is used are as follows: random string is from the first of left side
Continuously successively arrangement to the right, zero character string are arranged in the right side of random string to character start of string, so that character string group X1~
First random string (i.e. the random string of the leftmost side) alignment that X3 is separately included.In other embodiments, it can also adopt
With the character string group of other structures.For example, the two a kind of pair of character string groups provided that Fig. 7 is an exemplary embodiment are handled
Schematic diagram;As shown in fig. 7, first character start of string continuously successively to the right arrangement, random character of the zero character string from left side
String is arranged in the right side of zero character string, so that the last one random string that character string group X1~X3 is separately included is (i.e. most
The random string on right side) it is aligned, it include 6 random strings in obtained final result, consistent with embodiment illustrated in fig. 6.
For another example the schematic diagram that the three a kind of pair of character string groups provided that Fig. 8 is an exemplary embodiment are handled;As shown in figure 8,
Random string is from the 7th (i.e. number the 2nd from right to left) character string is arranged successively to the left, remaining character string is zero character
String, so that the last one random string (i.e. the random string of the rightmost side) alignment that character string group X1~X3 is separately included,
It include 6 random strings in obtained final result, consistent with embodiment illustrated in fig. 6.In short, by ensuring each character string
First or the last one random string in group is mutually aligned, to ensure the final result meet demand of the acquisition of issuer 11.
It is noted that other than above-mentioned scene, numerical value S1~S3 under other scenes can be it is non-just, or
Person have just have it is negative;Correspondingly, value T1~T3 can be made in such a way that numerical value S1~S3 is converted to numerical value T1~T3,
Character string group X1~X3 can be generated by embodiment shown in above-mentioned Fig. 5~8, determines the maximum value in T1~T3, in turn
The extreme value in S1~S3 can be acquired according to the transformational relation between S1~S3 and T1~T3.For example, when numerical value S1~S3 is
Non- timing, transformational relation can be Ti=-Si, for example as S1=-6, S2=-3, S3=-2, can make T1=-S1=6, T2
=-S2=3, T3=-S3=2, issuer 11 can determine that the maximum value in T1~T3 is 6 based on the above embodiment, go forward side by side
And determining the minimum value in S1~S3 is -6.For another example transformational relation can be Ti=when numerical value S1~S3, which has, just has negative
Si+a, for example the numerical value a of the absolute value not less than S1~S3 can be chosen, with true based on the above-mentioned selection mode for numerical value H
It is necessarily non-negative for protecting T1~T3, for example as S1=-6, S2=-3, S3=2, can choose a=8, thus make T1=S1+a=2,
T2=S2+a=5, T3=S3+a=10, issuer 11 can determine that the maximum value in T1~T3 is based on the above embodiment
10, and determine that the maximum value in S1~S3 is 10-a=2 in turn.In another example conversion is closed when numerical value S1~S3, which has, just has negative
System can be Ti=- (Si-b), for example can be chosen exhausted not less than S1~S3 based on the above-mentioned selection mode for numerical value H
To the numerical value b of value, be to ensure Si-b necessarily it is non-just, i.e. T1~T3 is necessarily non-negative, such as S1=-6, S2=-3, S3=2
When, b=8 can be chosen, to make T1=- (S1-b)=14, T2=- (S2-b)=11, T3=- (S3-b)=6, issuer 11 can
With determine based on the above embodiment the maximum value in T1~T3 be 14, and determine in turn the minimum value in S1~S3 be -14+
B=-6.
Similar with above-described embodiment, this specification can also determine the minimum value in numerical value T1~T3, and in turn
Determine the extreme value in numerical value S1~S3.When determining minimum value, the character string group X1~X3 generated of data side 13~15 will
It is different from above-described embodiment.
S1~S3 is converted to corresponding numerical value T1~T3 by data side 13~15, to ensure that numerical value T1~T3 is non-negative.And
Data side 13~15 generates corresponding character string group X1~X3, so that character string group X1 includes in turn according to numerical value T1~T3 and H
T1 sections of zero character strings, H-T1 sections of random strings, character string group X2 include T2 sections of zero character strings, H-T2 sections of random characters
String, character string group X3 include T3 sections of zero character strings, H-T3 sections of random strings.
For ease of description, it is assumed that S1=6, S2=3, S3=2, H=8 can be determined: T1=S1=6, H-T1=2, T2
=S2=3, H-T2=5, T3=S3=2, H-T3=6.Fig. 9 is the four a kind of pair of character string groups provided of an exemplary embodiment
The schematic diagram handled.As shown in Figure 9, it is assumed that black rectangle block indicates that zero character string, white rectangle block indicate random words
Symbol string, the 1st~6 rectangular block of character string group X1 can for black rectangle block (corresponding to T1=6), the 7-8 rectangular block
Think white rectangle block (corresponding to H-T1=2), the 1st~3 rectangular block of character string group X2 can be (corresponding for black rectangle block
In T2=3), the 4th~8 rectangular block can be white rectangle block (corresponding to H-T2=5), the 1-2 square of character string group X3
It can be white rectangle block (corresponding to H-T3=that shape block, which can be black rectangle block (correspond to T3=2), the 3rd~8 rectangular block,
6)。
Then, data side 13~15 can be by the way of being similar to above-described embodiment, for corresponding character string group X1
~X3 carries out multi-party computations, and issuer 11 is enabled to obtain the summation process result or exclusive or processing knot of X1~X3
Fruit, details are not described herein again.So, for embodiment shown in Fig. 9, when character string group X1~X3 carries out summation process or different
Or when processing, according to the operation relation between zero character string, random string, so that: character string group X1 and X2 sums
Or exclusive or is when handling, the 1st~3 character string meet above-mentioned situation 2., the 4th~6 character string meet above-mentioned situation 3., the
1. 7-8 character string meets above-mentioned situation, then obtained result makes the 1st~3 character string be zero character string,
4-8 character string is random string;When further carrying out summation or exclusive or processing with character string group X3, the 1-2 character string
Meet above-mentioned situation 2., the 3rd~8 character string meet above-mentioned situation 1., the final result because obtained from are as follows: the 1st~2
Character string is zero character string, the 3-8 character string is random string.
Therefore, by reading the quantity for the zero character string that above-mentioned final result is included, final result packet can be determined
Containing 2 zero character strings, it may be assumed that the minimum value in T1~T3 is 2;Further, due to the Ti=Si in above-described embodiment, thus
It can determine that the minimum value in numerical value S1~S3 is 2.
In the embodiment shown in fig. 9, the structure that character string group X1~X3 is used are as follows: zero character string is from the first of left side
Continuously successively arrangement to the right, random string are arranged in the right side of zero character string to character start of string, so that character string group X1~
First zero character string (i.e. the zero character string of the leftmost side) alignment that X3 is separately included.In other embodiments, it can also adopt
With the character string group of other structures.For example, Figure 10 is at the five a kind of pair of character string groups provided of an exemplary embodiment
The schematic diagram of reason;As shown in Figure 10, first character start of string continuously successively to the right arrangement, zero-value word of the random string from left side
Symbol string is arranged in the right side of random string, so that the last one zero character string that character string group X1~X3 is separately included is (i.e.
The zero character string of the rightmost side) it is aligned, 2 zero character strings and embodiment illustrated in fig. 9 one are included in obtained final result
It causes.For another example the schematic diagram that the six a kind of pair of character string groups provided that Figure 11 is an exemplary embodiment are handled;Such as Figure 11
It is shown, zero character string is arranged successively to the left from the 7th (i.e. number the 2nd from right to left) character string, remaining character string be with
Machine character string, so that the last one zero character string (i.e. the zero character string of the rightmost side) that character string group X1~X3 is separately included
It is aligned, includes 2 zero character strings in obtained final result, consistent with embodiment illustrated in fig. 9.In short, each by ensuring
First or the last one zero character string in character string group is mutually aligned, to ensure that the final result that issuer 11 obtains meets
Demand.
It is noted that other than above-mentioned scene, numerical value S1~S3 under other scenes can be it is non-just, or
Person have just have it is negative;Correspondingly, value T1~T3 can be made in such a way that numerical value S1~S3 is converted to numerical value T1~T3,
Character string group X1~X3 can be generated by embodiment shown in above-mentioned Fig. 9~11, determines the maximum value in T1~T3, in turn
The extreme value in S1~S3 can be acquired according to the transformational relation between S1~S3 and T1~T3.For example, when numerical value S1~S3 is
Non- timing, transformational relation can be Ti=-Si, for example as S1=-6, S2=-3, S3=-2, can make T1=-S1=6, T2
=-S2=3, T3=-S3=2, issuer 11 can determine that the minimum value in T1~T3 is 1 based on the above embodiment, go forward side by side
And determining the maximum value in S1~S3 is -2.For another example transformational relation can be Ti=when numerical value S1~S3, which has, just has negative
Si+a, for example the numerical value a of the absolute value not less than S1~S3 can be chosen, with true based on the above-mentioned selection mode for numerical value H
It is necessarily non-negative for protecting T1~T3, for example as S1=-6, S2=-3, S3=2, can choose a=8, thus make T1=S1+a=2,
T2=S2+a=5, T3=S3+a=10, issuer 11 can determine that the minimum value in T1~T3 is 2 based on the above embodiment,
And determine that the minimum value in S1~S3 is 2-a=-6 in turn.In another example when numerical value S1~S3, which has, just has negative, transformational relation
It can be Ti=- (Si-b), for example can be chosen absolute not less than S1~S3 based on the above-mentioned selection mode for numerical value H
The numerical value b of value, be to ensure Si-b necessarily it is non-just, i.e. T1~T3 is necessarily non-negative, such as S1=-6, S2=-3, S3=2
When, b=8 can be chosen, to make T1=- (S1-b)=14, T2=- (S2-b)=11, T3=- (S3-b)=6, issuer 11 can
With determine based on the above embodiment the minimum value in T1~T3 be 6, and determine in turn the maximum value in S1~S3 be -6+b
=2.
Figure 12 is that the extreme value for another data side side that an exemplary embodiment provides determines the flow chart of method.Such as Figure 12
Shown, this method is applied to any data side i in 1~n of data side;The method may include following steps:
Step 1202, the data Si that data side i holds itself is divided into corresponding subdata Si_1~Si_m, and 1≤i≤
n。
In one embodiment, by the way that data Si is divided into several subdatas, situation that can be excessive in data Si value
Under, it is divided into the relatively small subdata of value, it is possible to reduce communication during subsequent implementation multi-party computations
Amount avoids causing to influence computational efficiency since single traffic is excessive.
In one embodiment, data Si can be characterized as to binary number, then data Si is drawn according to character bit
Point.For example, can be divided into 4 subdatas when data Si is characterized as being 32 binary numbers, each subdata is right respectively
It should be in continuous 8 character bits;For example, when the binary number is Si=0011101010011001 01,011,010 10101000
When, it can be divided into Si_1=00111010, Si_2=10011001, Si_3=01011010, Si_4=10101000, compared
In value 7757542312 of the Si under the decimal system, each subdata is inevitable not due to digit limitation, the value under the decimal system
Greater than 28=256, thus it is subsequent respectively to each subdata carry out extreme value calculating when, generated communication can be significantly reduced
Amount, to help to promote computational efficiency.Certainly, since each subdata that same data divide participates in extreme value respectively
In calculating, thus each subdata that division obtains can might not be determined according to the actual situation using identical digit.
Step 1204, data side i generates the corresponding substring group Xi_1~Xi_m of subdata Si_1~Si_m, son
Character string group Xi_j include Ti_j sections meet the first kind character string of the first value rule, H-Ti_j sections meet the second value rule
The second class character string.
In one embodiment, data side i is any data side in 1~n of data side, i.e. 1~n of data side actually needs
Implement the relevant operation implemented needed for data side i respectively.For example, 1~n of data side needs respectively for the data S1 itself held
~Sn is divided, is obtained subdata S1_1~S1_m ... Sn_1~Sn_m, and generates corresponding substring group X1_ respectively
1~X1_m ... Xn_1~Xn_m.
In one embodiment, when the value of subdata Si_1~Si_j-1 is the subdata that 1~n of data side is generated respectively
When the corresponding Segmented Extreme Value K_1~K_j-1 of S1_1~Sn_1 ... S1_j-1~Sn_j-1, Ti_j and Si_j meet default value
Relationship, otherwise the value of Ti_j makes Segmented Extreme Value K_j not equal to subdata Si_j, 1≤j≤m and 0≤Ti_j≤H.In other words,
Each data side is both needed to for self-holding data to be divided into m subdata, and is sequentially arranged between m subdata, so that data side 1~
N successively implements m wheel respectively and compares operation, to determine a Segmented Extreme Value in every wheel respectively, and eventually by all segmentations
Extreme value K_1~K_m is spliced, and the extreme value in S1~Sn is obtained.
M wheel, which compares operation, to be needed successively to implement:
Compare in operation in the first run, due to not yet there is Segmented Extreme Value, T1_1~Tn_1 can respectively with subdata S1_1
~Sn_1 meets above-mentioned default value relationship, thus further according in T1_1~Tn_1 extreme value and the default value close
System, determines the Segmented Extreme Value K_1 in subdata S1_1~Sn_1.
In subsequent relatively operation, due to having existed Segmented Extreme Value, thus when implementation j wheel compares operation, data
1~n of side needs to compare Segmented Extreme Value K_1~K_j-1 that operation obtains according to the j-1 wheel having occurred and that, determines from j and takes turns ratio
Compared with the T1_j~Tn_j that should be generated in operation.If the value and segmentation of the corresponding subdata Si_1~Si_j-1 of data side i
Extreme value K_1~K_j-1 difference is equal, then the data Si that data side i holds may be final extreme value, thus should be ensured that
Ti_j and subdata Si_j meet above-mentioned default value relationship;If the corresponding subdata Si_1~Si_j-1's of data side i
Value is not completely equal with Segmented Extreme Value K_1~K_j-1 difference, such as Si_j-1 ≠ K_j-1, then data side i holds
The inevitable and non-final extreme value of data Si, thus Ti_j should be handled, be interfered to avoid to real extreme value.
By taking data side x, data side y as an example, during choosing maximum value, it is assumed that data side x corresponds to subdata Sx_
J-1=01011100, subdata Sx_j=10000001, data side y correspond to subdata Sy_j-1=01100000, subdata
Sy_j=00111100, as Sy_j-1=K_j-1 ≠ Sx_j-1, the data Sx for showing that data side x holds is inevitable and non-final
Extreme value, the data Sy that holds of data side y may be final extreme value, if using Tx_j=Sx_j, Ty_j=Sy_j,
Due to Sx_j > Sy_j, will lead to be determined as Tx_j > Ty_j, so that Ty_j will not necessarily be chosen for Segmented Extreme Value, thus
It causes to judge by accident;But if being set as Tx_j=00000000, Ty_j=Sy_j, so that it may it is determined as Tx_j < Ty_j, thus
It avoids generating erroneous judgement.
Similarly, still by taking data side x, data side y as an example, during choosing minimum value, it is assumed that data side x corresponds to
Subdata Sx_j-1=01011100, subdata Sx_j=10000001, data side y correspond to subdata Sy_j-1=
01100000, subdata Sy_j=00111100 shows the data that data side y holds as Sx_j-1=K_j-1 ≠ Sy_j-1
The data Sx that Sy inevitable and non-final extreme value, data side x hold may be final extreme value, if using Tx_j=Sx_j,
Ty_j=Sy_j, then will lead to be determined as Tx_j > Ty_j, so that Tx_j will not be necessarily selected due to Sx_j > Sy_j
For Segmented Extreme Value, to cause to judge by accident;But if being set as Ty_j=11111111, Tx_j=Sx_j, so that it may be determined as
Tx_j < Ty_j, to avoid generating erroneous judgement.
In one embodiment, the issuer includes the 1~n of data side, i.e. 1~n of data side plays inquiry simultaneously
The role of side.Correspondingly, data side i can determine the value of Ti_j according to the Segmented Extreme Value K_1~K_j-1 known;Change speech
It, 1~n of data side is due to itself issuer role, so that 1~n of data side can be informed in caused by 1~j-1 wheel
The value of Segmented Extreme Value K_1~K_j-1, to be compared by subdata corresponding with itself, to determine T1_j~Tn_j
Value.
In one embodiment, especially when data side i does not play the part of the role of issuer, data side i haves no right to know point
The value of section extreme value K_1~K_j-1, can not make data side i know value scheme used by Ti_j.Therefore, data side i
Can with issuer execute condition oblivious transfer protocol (actually executed respectively with issuer by 1~n of data side the condition without
Meaning transport protocol);The input that data side i is provided includes: data Si_1~Si_j-1, in the value of subdata Si_1~Si_j-1
In the case where respectively Segmented Extreme Value K_1~K_j-1, substring group Mi_j_1 after the corresponding cover of substring group Xi_j,
And in the case where the value of subdata Si_1~Si_j-1 is respectively not Segmented Extreme Value K_1~K_j-1, substring group
Substring group Mi_j_2 after the corresponding cover of Xi_j;The input that issuer provides includes: subdata S1_j-1~Sn_j-1
The corresponding Segmented Extreme Value K_j-1 of value.So, when the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_
When j-1, substring group Mi_j_1 is exported by the condition oblivious transfer protocol to issuer, with described for participating in after cover
Multi-party computations, otherwise cover after substring group Mi_j_2 by the condition oblivious transfer protocol export to issuer, with
For participating in the multi-party computations, thus both may insure data side i do not know which cover after substring group by with
In participation multi-party computations, and it can ensure that jth wheel can accurately select Segmented Extreme Value K_j.
Step 1206, substring group Xi_j is provided to the substring group X1_ generated with other data sides by data side i
J~Xi-1_j, Xi+1_j~Xn_j carry out multi-party computations, and issuer is made to obtain the output of the multi-party computations, with
Determine the Segmented Extreme Value K_j in S1_j~Sn_j;Wherein, the extreme value in data S1~Sn by issuer to Segmented Extreme Value K_1~
K_m, which is spliced, to be obtained.
In one embodiment, the value of the output is substring group X1_j~Xn_j based on the synthesis of preset algorithm
Result G_j is calculated, the COMPREHENSIVE CALCULATING result G_j is matched with the first value rule and second value rule, by institute
The quantity and the default value relationship of issuer's first kind character string according to contained by the COMPREHENSIVE CALCULATING result G_j are stated, is determined
Segmented Extreme Value K_j in S1_j~Sn_j.
In one embodiment, by the way that subdata S1_j~Sn_j is converted to corresponding substring group X1_j~Xn_j,
So that relatively more simply handling logic, relatively less traffic (for example and completely between 1~n of data side and issuer
Determine that scheme is compared based on the extreme value for obscuring circuit), it can accurately know the Segmented Extreme Value in S1_j~Sn_j, facilitate pole
The earth simplifies the preparation of early period, and can promote treatment effeciency significantly.Meanwhile by making 1~data side, data side n
Substring group X1_j~Xn_j is provided to multi-party calculating with high safety, so that issuer without knowing each sub- word respectively
In the case where according with string group X1_j~Xn_j, it is only necessary to output, the i.e. substring group X1_j obtained according to the multi-party computations
COMPREHENSIVE CALCULATING of~the Xn_j based on preset algorithm is as a result, can determine that the Segmented Extreme Value in S1_j~Sn_j, it can be ensured that meter
The value leakage that not will cause X1_j~Xn_j or S1_j~Sn_j during calculating, has high Information Security.
In one embodiment, the algorithm of multi-party computations used by the type of the preset algorithm can be matched with,
So that the output of multi-party computations is COMPREHENSIVE CALCULATING result of the substring group X1_j~Xn_j based on preset algorithm.Example
Such as, when the multi-party computations are Secure read group total, the preset algorithm can be summation algorithm;For another example
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm can be exclusive or algorithm;Certainly, this explanation
Book is limited not to this.
In one embodiment, data side i can be handled substring group Xi_j as substring group after corresponding cover
Mi_j;In fact, 1~n of data side is both needed to respectively handle substring group X1_j~Xn_j for character after corresponding cover
String group M1_j~Mn_j.Wherein, the calculation of used multi-party computations is depended on to the processing mode of substring group Xi_j
Method cooperates between the processing mode and the preset algorithm of subsequent use, to ensure substring group M1_j~Mn_ after covering
After j is respectively sent to issuer by 1~n of data side, issuer can be based on the preset algorithm to substring group after cover
M1_j~Mn_j carries out COMPREHENSIVE CALCULATING, obtains COMPREHENSIVE CALCULATING knot of the substring group X1_j~Xn_j based on the preset algorithm
Fruit.
For example, can share two-by-two between 1~n of data side has preset secret random number, such as in data side 1 and data
Sharing between side 2 has random number R12, shared between data side 2 and data side 3 and have random number R23, data side 1 and data side 3 it
Between share have random number R13Deng.It, can be by by substring group Xi_j and data side i when using Secure read group total
Shared random number is added or is subtracted each other, and substring group Mi_j after corresponding cover can be obtained;For example, working as M1_j=
X1_j+R12+R13, M2_j=X2_j-R12+R23, M3_j=X3_j-R13-R23When, M1_j+M2_j+M3_j=X1_j+R12+R13+
X2_j-R12+R23+X3_j-R13-R23=X1_j+X2_j+X3_j so that issuer only need to cover after substring group
M1_j~Mn_j, which is added, can be obtained the summed result of substring group X1_j~Xn_j, using as above-mentioned COMPREHENSIVE CALCULATING result
G_j.When being calculated using Secure exclusive or, can by the random number of sharing substring group Xi_j and data side i into
Row exclusive or calculates, and substring group Mi_j after corresponding cover can be obtained;For example, working as
When, So that issuer only need to cover after substring group M1_j
~Mn_j carries out exclusive or and calculates the exclusive or that can be obtained substring group X1_j~Xn_j as a result, using as above-mentioned COMPREHENSIVE CALCULATING
As a result G_j.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the first kind character string.For example, first kind character string can (value be non-for random string
Zero), the second class character string can be zero-value word symbol string, and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy:
The result that summation or exclusive or obtain between random string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between value character string remains as to be asked between zero character string, random string and zero character string
And/or the result that exclusive or obtains is random string.Certainly, by formulating appropriate value rule and/or preset algorithm, may be used also
With using first kind character string, the second class character string of other forms, this specification is limited not to this.
By taking first kind character string is random string, the second class character string is zero character string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is segmentation maximum value, and value is described comprehensive
The quantity of first kind character string contained by calculated result G_j is closed, the extreme value in S1~Sn is maximum value;When 1~n of data side is held respectively
Have that when being data P1~Pn of non-positive value, data P1~Pn is converted to data S1~Sn by 1~n of data side, wherein Si=-
Pi;And the minimum value in data P1~Pn is the corresponding negative of maximum value in S1~Sn;When data side, 1~n holds respectively
Data Q1~Qn has that when just having negative, data Q1~Qn is converted to data S1~Sn by 1~n of data side, wherein Si=Qi+a or
Si=- (Qi-b);And in difference or data Q1~Qn of the maximum value in data Q1~Qn for maximum value and a in S1~Sn
Minimum value be maximum value and the corresponding negative of the difference of b in S1~Sn.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the second class character string.For example, first kind character string can be zero-value word symbol string, the second class word
Symbol string can be random string (value non-zero), and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy: with
The result that summation or exclusive or obtain between machine character string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between character string remains as sums between zero character string, random string and zero character string
Or the result that exclusive or obtains is random string.It certainly, can be with by formulating appropriate value rule and/or preset algorithm
Using the first kind character string of other forms, the second class character string, this specification is limited not to this.
By taking first kind character string is zero character string, the second class character string is random string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is segmentation minimum value, and value is comprehensive meter
The quantity of first kind character string contained by result G_j is calculated, the extreme value in S1~Sn is minimum value;When 1~n of data side holds respectively
For non-positive value data P1~Pn when, data P1~Pn is converted to data S1~Sn by 1~n of data side, wherein Si=-Pi;
And the maximum value in data P1~Pn is the corresponding negative of minimum value in S1~Sn;The number that 1~n holds respectively when data side
Have that when just having negative, data Q1~Qn is converted to data S1~Sn by 1~n of data side according to Q1~Qn, wherein Si=Qi+a or Si
=-(Qi-b);And in difference or data Q1~Qn of the minimum value in data Q1~Qn for minimum value and a in S1~Sn
Maximum value is minimum value and the corresponding negative of the difference of b in S1~Sn.
Figure 13 is that the extreme value for another issuer side that an exemplary embodiment provides determines the flow chart of method.Such as Figure 13
Shown, this method is applied to issuer;The method may include following steps:
Step 1302, issuer obtains the output that multi-party computations are carried out to substring group X1_j~Xn_j.
In one embodiment, the data that the substring group X1_j~Xn_j is respectively held itself by 1~n of data side
After S1~Sn is divided into corresponding subdata S1_1~S1_m ... Sn_1~Sn_m, sub-data S1_j~Sn_j and give birth to
At, substring group Xi_j include Ti_j sections meet the first kind character string of the first value rule, H-Ti_j sections meet second and take
It is worth the second class character string of rule;Wherein, when the value of subdata Si_1~Si_j-1 is the son that 1~n of data side is generated respectively
When the corresponding Segmented Extreme Value K_1~K_j-1 of data S1_1~Sn_1 ... S1_j-1~Sn_j-1, Ti_j and Si_j meets default
Numerical relation, otherwise the value of Ti_j makes Segmented Extreme Value K_j not equal to subdata Si_j, 1≤j≤m and 0≤Ti_j≤H;Its
In, the value of the output is COMPREHENSIVE CALCULATING result G_j of the substring group X1_j~Xn_j based on preset algorithm, the synthesis
Calculated result G_j is matched with the first value rule and second value rule.
In one embodiment, by the way that data Si is divided into several subdatas, situation that can be excessive in data Si value
Under, it is divided into the relatively small subdata of value, it is possible to reduce communication during subsequent implementation multi-party computations
Amount avoids causing to influence computational efficiency since single traffic is excessive.
In one embodiment, data Si can be characterized as to binary number, then data Si is drawn according to character bit
Point.For example, can be divided into 4 subdatas when data Si is characterized as being 32 binary numbers, each subdata is right respectively
It should be in continuous 8 character bits;For example, when the binary number is Si=00111010 10,011,001 01,011,010 10101000
When, it can be divided into Si_1=00111010, Si_2=10011001, Si_3=01011010, Si_4=10101000, compared
In value 7757542312 of the Si under the decimal system, each subdata is inevitable not due to digit limitation, the value under the decimal system
Greater than 28=256, thus it is subsequent respectively to each subdata carry out extreme value calculating when, generated communication can be significantly reduced
Amount, to help to promote computational efficiency.Certainly, since each subdata that same data divide participates in extreme value respectively
In calculating, thus each subdata that division obtains can might not be determined according to the actual situation using identical digit.
In one embodiment, data side i is any data side in 1~n of data side, i.e. 1~n of data side actually needs
Implement the relevant operation implemented needed for data side i respectively.For example, 1~n of data side needs respectively for the data S1 itself held
~Sn is divided, is obtained subdata S1_1~S1_m ... Sn_1~Sn_m, and generates corresponding substring group X1_ respectively
1~X1_m ... Xn_1~Xn_m.
In one embodiment, each data side is both needed to for self-holding data to be divided into m subdata, and between m subdata
It is sequentially arranged, so that 1~n of data side successively implements m wheel respectively and compares operation, to determine a segmentation pole in every wheel respectively
Value, and splice eventually by all Segmented Extreme Value K_1~K_m, obtain the extreme value in S1~Sn.
M wheel, which compares operation, to be needed successively to implement:
Compare in operation in the first run, due to not yet there is Segmented Extreme Value, T1_1~Tn_1 can respectively with subdata S1_1
~Sn_1 meets above-mentioned default value relationship, thus further according in T1_1~Tn_1 extreme value and the default value close
System, determines the Segmented Extreme Value K_1 in subdata S1_1~Sn_1.
In subsequent relatively operation, due to having existed Segmented Extreme Value, thus when implementation j wheel compares operation, data
1~n of side needs to compare Segmented Extreme Value K_1~K_j-1 that operation obtains according to the j-1 wheel having occurred and that, determines from j and takes turns ratio
Compared with the T1_j~Tn_j that should be generated in operation.If the value and segmentation of the corresponding subdata Si_1~Si_j-1 of data side i
Extreme value K_1~K_j-1 difference is equal, then the data Si that data side i holds may be final extreme value, thus should be ensured that
Ti_j and subdata Si_j meet above-mentioned default value relationship;If the corresponding subdata Si_1~Si_j-1's of data side i
Value is not completely equal with Segmented Extreme Value K_1~K_j-1 difference, such as Si_j-1 ≠ K_j-1, then data side i holds
The inevitable and non-final extreme value of data Si, thus Ti_j should be handled, be interfered to avoid to real extreme value.
By taking data side x, data side y as an example, during choosing maximum value, it is assumed that data side x corresponds to subdata Sx_
J-1=01011100, subdata Sx_j=10000001, data side y correspond to subdata Sy_j-1=01100000, subdata
Sy_j=00111100, as Sy_j-1=K_j-1 ≠ Sx_j-1, the data Sx for showing that data side x holds is inevitable and non-final
Extreme value, the data Sy that holds of data side y may be final extreme value, if using Tx_j=Sx_j, Ty_j=Sy_j,
Due to Sx_j > Sy_j, will lead to be determined as Tx_j > Ty_j, so that Ty_j will not necessarily be chosen for Segmented Extreme Value, thus
It causes to judge by accident;But if being set as Tx_j=00000000, Ty_j=Sy_j, so that it may it is determined as Tx_j < Ty_j, thus
It avoids generating erroneous judgement.
Similarly, still by taking data side x, data side y as an example, during choosing minimum value, it is assumed that data side x corresponds to
Subdata Sx_j-1=01011100, subdata Sx_j=10000001, data side y correspond to subdata Sy_j-1=
01100000, subdata Sy_j=00111100 shows the data that data side y holds as Sx_j-1=K_j-1 ≠ Sy_j-1
The data Sx that Sy inevitable and non-final extreme value, data side x hold may be final extreme value, if using Tx_j=Sx_j,
Ty_j=Sy_j, then will lead to be determined as Tx_j > Ty_j, so that Tx_j will not be necessarily selected due to Sx_j > Sy_j
For Segmented Extreme Value, to cause to judge by accident;But if being set as Ty_j=11111111, Tx_j=Sx_j, so that it may be determined as
Tx_j < Ty_j, to avoid generating erroneous judgement.
In one embodiment, the issuer includes the 1~n of data side, i.e. 1~n of data side plays inquiry simultaneously
The role of side.Correspondingly, data side i can determine the value of Ti_j according to the Segmented Extreme Value K_1~K_j-1 known;Change speech
It, 1~n of data side is due to itself issuer role, so that 1~n of data side can be informed in caused by 1~j-1 wheel
The value of Segmented Extreme Value K_1~K_j-1, to be compared by subdata corresponding with itself, to determine T1_j~Tn_j
Value.
In one embodiment, especially when data side i does not play the part of the role of issuer, data side i haves no right to know point
The value of section extreme value K_1~K_j-1, can not make data side i know value scheme used by Ti_j.Therefore, data side i
Can with issuer execute condition oblivious transfer protocol (actually executed respectively with issuer by 1~n of data side the condition without
Meaning transport protocol);It is respectively Segmented Extreme Value K_1 that the input that data side i is provided, which includes: in the value of subdata Si_1~Si_j-1,
In the case where~K_j-1, substring group Mi_j_1 after the corresponding cover of substring group Xi_j, in subdata Si_1~Si_
In the case that the value of j-1 is not respectively Segmented Extreme Value K_1~K_j-1, sub- word after the corresponding cover of substring group Xi_j
Accord with string group Mi_j_2;The input that issuer provides includes: the corresponding Segmented Extreme Value K_ of value of subdata S1_j-1~Sn_j-1
j-1.So, when the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1, substring after cover
Group Mi_j_1 is exported by the condition oblivious transfer protocol, to be used to participate in the multi-party computations, sub- word after otherwise covering
Symbol string group Mi_j_2 by condition oblivious transfer protocol output, with for participating in the multi-party computations, thus both can be with
Ensure that data side i does not know that substring group be used to participate in multi-party computations after which is covered, and can ensure jth wheel energy
It is enough accurately to select Segmented Extreme Value K_j.
Step 1304, the quantity of issuer first kind character string according to contained by the COMPREHENSIVE CALCULATING result G_j and institute
Default value relationship is stated, determines the Segmented Extreme Value K_j in S1_j~Sn_j.
Step 1306, the issuer splices Segmented Extreme Value K_1~K_m, to determine data according to splicing result
Extreme value in S1~Sn.
In one embodiment, the value of the output is substring group X1_j~Xn_j based on the synthesis of preset algorithm
Result G_j is calculated, the COMPREHENSIVE CALCULATING result G_j is matched with the first value rule and second value rule, by institute
The quantity and the default value relationship of issuer's first kind character string according to contained by the COMPREHENSIVE CALCULATING result G_j are stated, is determined
Segmented Extreme Value K_j in S1_j~Sn_j.
In one embodiment, by the way that subdata S1_j~Sn_j is converted to corresponding substring group X1_j~Xn_j,
So that relatively more simply handling logic, relatively less traffic (for example and completely between 1~n of data side and issuer
Determine that scheme is compared based on the extreme value for obscuring circuit), it can accurately know the Segmented Extreme Value in S1_j~Sn_j, facilitate pole
The earth simplifies the preparation of early period, and can promote treatment effeciency significantly.Meanwhile by making 1~data side, data side n
Substring group X1_j~Xn_j is provided to multi-party calculating with high safety, so that issuer without knowing each sub- word respectively
In the case where according with string group X1_j~Xn_j, it is only necessary to output, the i.e. substring group X1_j obtained according to the multi-party computations
COMPREHENSIVE CALCULATING of~the Xn_j based on preset algorithm is as a result, can determine that the Segmented Extreme Value in S1_j~Sn_j, it can be ensured that meter
The value leakage that not will cause X1_j~Xn_j or S1_j~Sn_j during calculating, has high Information Security.
In one embodiment, the algorithm of multi-party computations used by the type of the preset algorithm can be matched with,
So that the output of multi-party computations is COMPREHENSIVE CALCULATING result of the substring group X1_j~Xn_j based on preset algorithm.Example
Such as, when the multi-party computations are Secure read group total, the preset algorithm can be summation algorithm;For another example
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm can be exclusive or algorithm;Certainly, this explanation
Book is limited not to this.
In one embodiment, data side i can be handled substring group Xi_j as substring group after corresponding cover
Mi_j;In fact, 1~n of data side is both needed to respectively handle substring group X1_j~Xn_j for character after corresponding cover
String group M1_j~Mn_j.Wherein, the calculation of used multi-party computations is depended on to the processing mode of substring group Xi_j
Method cooperates between the processing mode and the preset algorithm of subsequent use, to ensure substring group M1_j~Mn_ after covering
After j is respectively sent to issuer by 1~n of data side, issuer can be based on the preset algorithm to substring group after cover
M1_j~Mn_j carries out COMPREHENSIVE CALCULATING, obtains COMPREHENSIVE CALCULATING knot of the substring group X1_j~Xn_j based on the preset algorithm
Fruit.
For example, can share two-by-two between 1~n of data side has preset secret random number, such as in data side 1 and data
Sharing between side 2 has random number R12, shared between data side 2 and data side 3 and have random number R23, data side 1 and data side 3 it
Between share have random number R13Deng.It, can be by by substring group Xi_j and data side i when using Secure read group total
Shared random number is added or is subtracted each other, and substring group Mi_j after corresponding cover can be obtained;For example, working as M1_j=
X1_j+R12+R13, M2_j=X2_j-R12+R23, M3_j=X3_j-R13-R23When, M1_j+M2_j+M3_j=X1_j+R12+R13+
X2_j-R12+R23+X3_j-R13-R23=X1_j+X2_j+X3_j so that issuer only need to cover after substring group
M1_j~Mn_j, which is added, can be obtained the summed result of substring group X1_j~Xn_j, using as above-mentioned COMPREHENSIVE CALCULATING result
G_j.When being calculated using Secure exclusive or, can by the random number of sharing substring group Xi_j and data side i into
Row exclusive or calculates, and substring group Mi_j after corresponding cover can be obtained;For example, working as
When, So that issuer only need to cover after substring group M1_j
~Mn_j carries out exclusive or and calculates the exclusive or that can be obtained substring group X1_j~Xn_j as a result, using as above-mentioned COMPREHENSIVE CALCULATING
As a result G_j.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the first kind character string.For example, first kind character string can (value be non-for random string
Zero), the second class character string can be zero-value word symbol string, and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy:
The result that summation or exclusive or obtain between random string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between value character string remains as to be asked between zero character string, random string and zero character string
And/or the result that exclusive or obtains is random string.Certainly, by formulating appropriate value rule and/or preset algorithm, may be used also
With using first kind character string, the second class character string of other forms, this specification is limited not to this.
By taking first kind character string is random string, the second class character string is zero character string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is segmentation maximum value, and value is described comprehensive
The quantity of first kind character string contained by calculated result G_j is closed, the extreme value in S1~Sn is maximum value;When 1~n of data side is held respectively
Have that when being data P1~Pn of non-positive value, data P1~Pn is converted to data S1~Sn by 1~n of data side, wherein Si=-
Pi;And the minimum value in data P1~Pn is the corresponding negative of maximum value in S1~Sn;When data side, 1~n holds respectively
Data Q1~Qn has that when just having negative, data Q1~Qn is converted to data S1~Sn by 1~n of data side, wherein Si=Qi+a or
Si=- (Qi-b);And in difference or data Q1~Qn of the maximum value in data Q1~Qn for maximum value and a in S1~Sn
Minimum value be maximum value and the corresponding negative of the difference of b in S1~Sn.
In one embodiment, the first value rule can make with the second value rule: the first kind character string
Between the calculated result based on preset algorithm between the first kind character string, the second class character string based on described default
The calculated result of algorithm is the second class character string, the first kind character string and the second class character string based on described pre-
The calculated result of imputation method is the second class character string.For example, first kind character string can be zero-value word symbol string, the second class word
Symbol string can be random string (value non-zero), and preset algorithm can be summation algorithm or exclusive or algorithm, can satisfy: with
The result that summation or exclusive or obtain between machine character string and random string remains as random string, zero character string and zero
The result that summation or exclusive or obtain between character string remains as sums between zero character string, random string and zero character string
Or the result that exclusive or obtains is random string.It certainly, can be with by formulating appropriate value rule and/or preset algorithm
Using the first kind character string of other forms, the second class character string, this specification is limited not to this.
By taking first kind character string is zero character string, the second class character string is random string as an example.When S1~Sn is
When non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is segmentation minimum value, and value is comprehensive meter
The quantity of first kind character string contained by result G_j is calculated, the extreme value in S1~Sn is minimum value;When 1~n of data side holds respectively
For non-positive value data P1~Pn when, data P1~Pn is converted to data S1~Sn by 1~n of data side, wherein Si=-Pi;
And the maximum value in data P1~Pn is the corresponding negative of minimum value in S1~Sn;The number that 1~n holds respectively when data side
Have that when just having negative, data Q1~Qn is converted to data S1~Sn by 1~n of data side according to Q1~Qn, wherein Si=Qi+a or Si
=-(Qi-b);And in difference or data Q1~Qn of the minimum value in data Q1~Qn for minimum value and a in S1~Sn
Maximum value is minimum value and the corresponding negative of the difference of b in S1~Sn.
Figure 14 is the schematic diagram of a scenario for a kind of multistage that an exemplary embodiment provides seeking extreme value safely.Such as Figure 14 institute
Show, by taking the numerical value S2 that numerical value S1 that data side 13 holds, data side 14 hold as an example, it is assumed that issuer 11 is it needs to be determined that numerical value S1
With the larger value in numerical value S2;It is, of course, also possible to there are more data sides and its numerical value held, this specification not to this into
Row limitation.
It is assumed that numerical value S1=11001010 00110110, numerical value S2=00111100 10000000, are characterized as the decimal system
Respectively S1=103222, S2=30592 are compared although embodiment shown in fig. 5 can be directly used, will lead to
Character string quantity contained by the character string group of generation is excessive (being at least not less than 103222), to cause the mistake of multi-party computations
Biggish traffic is generated in journey, influences numerical value relative efficiency.Therefore, it is proposed in the present embodiment and is divided into numerical value S1-S2
Then multiple groups subnumber value is compared for every group of subnumber value respectively, to reduce traffic, promote numerical value relative efficiency.
For example, numerical value S1, S2 can be divided into the subnumber value of most-significant byte, least-significant byte respectively, for example numerical value S1 is divided into
Numerical value S2 is divided into S2_1=00111100, S2_2=10000000, so by S1_1=11001010, S1_2=00110110
Afterwards respectively to first group of S1_1 compared with S2_1 carries out numerical value, to second group of S2_1 compared with S2_2 progress numerical value.
It is as follows to the numerical value comparison procedure of first group of S1_1 and S2_1:
Since each subnumber value only includes 8, so that the value of S1_1 and S2_1 is certainly less than 28=256, such as S1_1
Practical value be 202, the practical value of S2_1 is 60.Therefore, the numerical value H_1=256 for first group can be chosen, is gone forward side by side
And corresponding substring group X1_1, X2_1 is generated for subnumber value S1_1, S2_1 respectively by data side 13, data side 14.
It is assumed that numerical value S1, S2 are non-negative value, thus T1_1=S1_1=202, H_1-T1_1=54 can be set,
T2_1=S2_1=60, H_1-T2_1=196.Therefore, in schematic diagram as shown in figure 14, substring group X1_1 includes
202 random strings (being characterized by black rectangle frame), 54 zero character strings (being characterized by white rectangle frame), substring group
X2_1 includes 60 random strings, 196 zero character strings, and two substring groups include 256 character strings in total.
In turn, by using embodiment shown in Fig. 5~8 is similar to, data side 13-14 can be secret according to what is shared respectively
Close random number handles substring group X1_1, X2_1, substring group M1_1, M2_1 after being covered accordingly,
And in turn by safety summation algorithm or the multi-party calculating with high safety of safe exclusive or algorithm, so that issuer 11 obtains X1_1+X2_
1 orCalculated result, and the quantity for the random string for being included according to the calculated result determines
The greater in S1_1 and S2_1, i.e. Segmented Extreme Value K_1, for example K_1=202.As mentioned previously, when including more data
Fang Shi, substring group provided by these data sides can equally be participated in into above-mentioned comparison procedure, so that issuer 11
The maximum in first group of subdata can be determined according to the result of multi-party computations, using as Segmented Extreme Value K_1, herein
It repeats no more.
It is as follows to the numerical value comparison procedure of second group of S1_2 and S2_2:
In one embodiment, data side 13-14 also plays the part of the role of issuer, allows on data side 13-14 knows
The value for stating Segmented Extreme Value K_1 is 202.So, data side 13 is it can be found that itself subdata S1_1=K_1, and data side
14 it can be found that itself subdata S2_1 ≠ K_1, thus can determine therefrom that the numerical value T1_2 compared for this numerical value,
T2_2, for generating corresponding substring group X1_2, X2_2.
Due to S1_1=K_1, i.e. S1 may be the greater in numerical value S1, S2, thus data side 13 can determine numerical value
T1_2=S1_2=54.And since S2_1 ≠ K_1, i.e. S2 are not necessarily the greater in numerical value S1, S2, thus data side 14 can
Make numerical value T2_2=00000000 ≠ S2_2, avoid in T2_2=S2_2=128, is caused due to T2_2 > T1_2 to segmentation
The erroneous judgement of extreme value K_2, and further result in the larger value that issuer 11 obtains mistake.
Therefore, in schematic diagram as shown in figure 14, substring group X1_2 includes 54 random strings, 202 zero
It is worth character string, substring group X2_1 includes 256 zero character strings, and two substring groups include 256 characters in total
String.
Further, similar with the comparison procedure of above-mentioned first group of subnumber value, it is more that issuer 11 can obtain safety
It is just calculating as a result, and second group of Segmented Extreme Value K_2=54 is determined based on the result, details are not described herein again for detailed process.Cause
This, issuer 11 can splice the value of K_1 and K_2, and the larger value finally determined in numerical value S1, S2 is
11001010 00110110。
It is noted that data side 13-14 not necessarily plays the part of the role of issuer;Especially, data side compared with
In the case where few (for example there is only 2 data sides in embodiment shown in Figure 14), in the value for revealing out Segmented Extreme Value K_1
Afterwards, it will lead to final numerical value comparison result to be easy to be hypothesized, because being unable to that data side 13-14 is allowed to know above-mentioned Segmented Extreme Value
The value of K_1 is 202.At this point it is possible to by means of condition oblivious transfer protocol, thus in non-disclosre Segmented Extreme Value K_1 value
In the case where, complete the accurate setting of logarithm T1_2, T2_2.
Specifically, data side 13 is directed to S1_1=K_1, S1_1 ≠ K_1 both of these case, corresponding T1_2 is generated respectively,
For example for the ease of distinguishing, can be indicated respectively with parameter T1_2_1, T1_2_2, wherein T1_2_1=54, T1_2_2=0.Class
As, data side 14 is directed to S2_1=K_1, S2_1 ≠ K_1 both of these case, corresponding T2_2 is generated respectively, for example in order to just
In differentiation, can be indicated respectively with parameter T2_2_1, T2_2_2, wherein T2_2_1=128, T2_2_2=0.
Correspondingly, data side 13 generates corresponding substring group X1_2 for T1_2_1, T1_2_2 respectively, for example in order to
Convenient for distinguishing, can be indicated respectively with parameter X1_2_1, X1_2_2, wherein X1_2_1 includes 54 random strings, 202 zero
It is worth character string, and X1_2_2 includes 256 zero character strings, and further generates substring group M1_2_ after corresponding cover
1,M1_2_2.Similarly, data side 14 generates corresponding substring group X2_2 for T2_2_1, T2_2_2 respectively, for example for
Convenient for distinguishing, can be indicated respectively with parameter X2_2_1, X2_2_2, wherein X2_2_1 includes 128 random strings, 128
A zero character string, and X2_2_2 includes 256 zero character strings, and further generates substring group after corresponding cover
M2_2_1、M2_2_2。
Then, during multi-party computations, data side 13 is by substring group M1_ after subdata S1_1, cover
2_1, M1_2_2 input condition oblivious transfer protocol, and data side 14 is by substring group M2_2_ after subdata S2_1, cover
1, M2_2_2 input condition oblivious transfer protocol;Meanwhile Segmented Extreme Value K_1 is inputted the condition Oblivious Transfer by issuer 11
Agreement.And the condition oblivious transfer protocol can execute following logics: by the subdata Si_1 of data side i input and segmentation pole
Value K_1 is compared, if Si_1=K_1, substring group Mi_2_1 after covering is exported to issuer 11, if Si_1 ≠ K_
1, substring group Mi_2_2 after covering is exported to issuer 11.
So, as S1_1=K_1, S2_1 ≠ K_1, substring group M1_ after issuer 11 can be covered respectively
2_1, M2_2_2, and determine therefrom that out Segmented Extreme Value K_2.Due to Si_1 and Segmented Extreme Value K_1 comparison procedure by condition without
Meaning transport protocol is automatically performed, so that the value of Segmented Extreme Value K_1 is not revealed out in the above process to data side 13-14, and
And substring group is Mi_2_1 or Mi_2_2 after issuer 11 and uncertain obtained cover, and can not after cover sub- word
The anti-value condition released between S1_1, S2_1 and K_1 of value for according with string group, to realize splendid safety, avoid counting
According to leaking.
In one embodiment, above-mentioned condition oblivious transfer protocol can be realized by such as obscuring circuit.Due to
The decision logic very simple of the condition oblivious transfer protocol, thus the complexity for obscuring circuit is very low, is especially far below
Complexity when being chosen in the related technology by obscuring circuit to extreme value merely.
Figure 15 is the schematic diagram of a scenario for another multistage that an exemplary embodiment provides seeking extreme value safely.By with figure
The similar principle of 14 illustrated embodiments, Figure 15 show the embodiment for choosing smaller value.As shown in figure 15, it is assumed that numerical value S1=
11001010 00110110, numerical value S1, S2 can be divided into most-significant byte, low respectively by numerical value S2=00111100 10000000
8 subnumber values, for example numerical value S1 is divided into S1_1=11001010, S1_2=00110110, numerical value S2 is divided into S2_
1=00111100, S2_2=10000000, then respectively to first group of S1_1 compared with S2_1 carries out numerical value, to second group
S2_1 with S2_2 carry out numerical value compared with.
Firstly, to first group of S1_1 compared with S2_1 carries out numerical value.The numerical value H_1=256 for first group can be chosen,
And corresponding substring group X1_1, X2_ is generated for subnumber value S1_1, S2_1 respectively by data side 13, data side 14 in turn
1.It is assumed that numerical value S1, S2 are non-negative value, thus T1_1=S1_1=202, H_1-T1_1=54 can be set, T2_1=
S2_1=60, H_1-T2_1=196.Therefore, in schematic diagram as shown in figure 15, substring group X1_1 includes 202 zero
Value character string (being characterized by black rectangle frame), 54 random strings (being characterized by white rectangle frame), substring group X2_1 packet
60 zero character strings, 196 random strings are included, two substring groups include 256 character strings in total.
Similar with embodiment illustrated in fig. 14, data side 13-14 can be respectively according to shared secret random number pair
Substring group X1_1, X2_1 is handled, substring group M1_1, M2_1 after being covered accordingly, and passes through peace in turn
Full summation algorithm or the multi-party calculating with high safety of safe exclusive or algorithm so that issuer 11 obtain X1_1+X2_1 orCalculated result, and the quantity for the zero character string for being included according to the calculated result, determine S1_1 with
Smaller in S2_1, i.e. Segmented Extreme Value K_1, for example K_1=60.As mentioned previously, when comprising more data sides, this
Substring group provided by a little data sides can equally be participated in into above-mentioned comparison procedure, allow 11 basis of issuer
The result of multi-party computations determines the reckling in first group of subdata, no longer to go to live in the household of one's in-laws on getting married as Segmented Extreme Value K_1 herein
It states.
Then, to second group of S1_2 compared with S2_2 carries out numerical value.Due to the corresponding subdata S1_1 ≠ K_ in data side 13
1, and the corresponding subdata S2_1=K_1 in data side 14, thus S1 is not necessarily the smaller in numerical value S1, S2, S2 may be
The corresponding numerical value T1_2 in data side 13 can be set as maximum value 11111111, setting number by the smaller in numerical value S1, S2
According to 14 corresponding numerical value T2_2=S1_2=128 of side, avoids in T1_2=S1_2=54, caused due to T2_2 > T1_2 pair
The erroneous judgement of Segmented Extreme Value K_2, and further result in the smaller value that issuer 11 obtains mistake.
Therefore, in schematic diagram as shown in figure 15, substring group X1_2 include 255 zero character strings, 1 it is random
Character string, substring group X2_1 include 128 zero character strings, 128 random strings, and two substring groups are in total
Include 256 character strings.Similar with the comparison procedure of above-mentioned first group of subnumber value, issuer 11 can obtain Secure
It is calculating as a result, and second group of Segmented Extreme Value K_2=128 is determined based on the result, details are not described herein again for detailed process.Cause
This, issuer 11 can splice the value of K_1 and K_2, and the smaller value finally determined in numerical value S1, S2 is
00111100 10000000。
It is similar with embodiment illustrated in fig. 14 in the value for determining T1_2, T2_2, if data side 13-14 also plays the part of
The role of issuer is drilled, then data side 13-14 can know the value of Segmented Extreme Value K_1, thus according to S1_1, S2_1 and K_
Numerical relation between 1 determines the value of corresponding T1_2, T2_2.Alternatively, the side of condition oblivious transfer protocol can be passed through
Formula, so that data side 13-14 prepares T1_2, T2_2 corresponding to different scenes respectively, and in the case where non-disclosre value really
It protects issuer 11 and obtains correct T1_2, T2_2, details are not described herein again.
In the embodiment shown in Figure 14-15, since the length of numerical value S1-S2 is shorter, thus it is only respectively divided into 2 sons
Numerical value, and complete numerical value by 2 stages and compare;And in situation longer for numerical value length, it can divide to obtain more
Subnumber value, to realize that numerical value compares by the more multistage.For example, the case where for including 1~n of data side, issuer, data
Data S1~Sn that 1~n of side can respectively hold itself is divided, and the data Si for holding data side i is divided into phase
Subdata Si_1~Si_m, 1≤i≤n answered, may then pass through the Segmented Extreme Value that following manner determines the jth stage:
1~n of data side generates substring group X1_j~Xn_j corresponding to subdata S1_j~Sn_j, sub- character respectively
String group Xi_j include Ti_j sections meet the first kind character string of the first value rule, H-Ti_j sections meet the of the second value rule
Two class character strings;Wherein, when the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1, Ti_j with
Si_j meets default value relationship (in the 1st stage, be defaulted as Ti_1 and Si_1 meets default value relationship), otherwise Ti_j
Value makes Segmented Extreme Value K_j not equal to subdata Si_j, 1≤j≤m and 0≤Ti_j≤H;
Issuer obtains the output that multi-party computations are carried out to substring group X1_j~Xn_j, the value of the output
COMPREHENSIVE CALCULATING result G_j for substring group X1_j~Xn_j based on preset algorithm, the COMPREHENSIVE CALCULATING result G_j are matched with
The first value rule and second value rule;According to first kind character string contained by the COMPREHENSIVE CALCULATING result G_j
Quantity and the default value relationship, determine the Segmented Extreme Value K_j in S1_j~Sn_j.
In addition, in the embodiment shown in Figure 14-15, it is assumed that the data that each data side holds are non-negative, and in reality
Data side is also possible to hold non-correction data in the situation of border, for example, the data held of all data sides it is non-just or have just have it is negative,
So each data can be converted by default transformational relation first non-negative, then pass through Figure 14 or side shown in figure 15
Formula determines extreme value, presets transformational relation further according to this and extrapolates the corresponding extreme value of real data.This combination numerical value conversion
Extreme value determines scheme, can refer to the corresponding associated description of above-mentioned Figure 12-13 illustrated embodiment, details are not described herein again.
Figure 16 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Figure 16 is please referred to, in hardware view,
The equipment includes processor 1602, internal bus 1604, network interface 1606, memory 1608 and nonvolatile memory
1610, it is also possible that hardware required for other business certainly.Processor 1602 is read from nonvolatile memory 1610
Then corresponding computer program is run into memory 1608, extreme value determining device is formed on logic level.Certainly, in addition to soft
Except part implementation, this specification one or more embodiment is not precluded other implementations, for example, logical device or
Mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic unit,
It can be hardware or logical device.
Figure 17 is please referred to, in Software Implementation, which is applied to any number in 1~n of data side
According to square i;The apparatus may include:
Generation unit 1701 makes data side i be directed to the data Si itself held, generates corresponding character string group Xi;Wherein,
Character string group Xi include Ti sections meet the first kind character string of the first value rule, H-Ti sections meet the second value rule second
Class character string, Ti and Si meet default value relationship, 1≤i≤n and 0≤Ti≤H;
Unit 1702 is provided, makes data side i that character string group Xi to be provided to the character string group X1 generated with other data sides
~Xi-1, Xi+1~Xn carries out multi-party computations, and issuer is made to obtain the output of the multi-party computations, the output
Value is COMPREHENSIVE CALCULATING of the character string group X1~Xn based on preset algorithm as a result, the COMPREHENSIVE CALCULATING result is matched with described first
Value rule and second value rule, as issuer first kind character string according to contained by the COMPREHENSIVE CALCULATING result
Quantity and the default value relationship, determine the extreme value in S1~Sn.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the first kind character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti=Si;The extreme value is maximum value, and value
For the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn is non-timing, the default value relationship shows Ti=-Si;The extreme value is minimum value, and is taken
Value is the corresponding negative of quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn, which has, just has negative, the default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-
Negative, the extreme value is maximum value and value is the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result and the difference of a;Or
Person, the default value relationship show Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, the extreme value be minimum value and
Value is the corresponding negative of the difference of quantity and b of first kind character string contained by the COMPREHENSIVE CALCULATING result.
Optionally, the first kind character string includes random string, and the second class character string includes zero character string.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the second class character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti=Si;The extreme value is minimum value, and value
For the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn is non-timing, the default value relationship shows Ti=-Si;The extreme value is maximum value, and is taken
Value is the corresponding negative of quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn, which has, just has negative, the default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-
Negative, the extreme value is minimum value and value is the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result and the difference of a;Or
Person, the default value relationship show Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, the extreme value be maximum value and
Value is the corresponding negative of the difference of quantity and b of first kind character string contained by the COMPREHENSIVE CALCULATING result.
Optionally, the first kind character string includes zero character string, and the second class character string includes random string.
Optionally,
When the multi-party computations are Secure read group total, the preset algorithm is summation algorithm;
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm is exclusive or algorithm.
Optionally, further includes:
Processing unit 1703 handles data side i for character string group Mi after corresponding cover character string group Xi;
Transmission unit 1704 makes data side i that character string group Mi after cover is sent to issuer;Wherein, other data sides
Character string group M1~Mi-1, Mi+1~Mn are also respectively sent to the issuer after the cover generated respectively, so that described look into
Inquiry side is based on the preset algorithm and carries out COMPREHENSIVE CALCULATING to character string group M1~Mn after cover, obtains character string group X1~Xn and is based on
The COMPREHENSIVE CALCULATING result of the preset algorithm.
Optionally, character string group Xi includes continuously arranged Ti sections of first kind character string;Wherein, in character string group X1~Xn
First or the last one first kind character string alignment for being aligned, and separately including between the character string of same position.
Figure 18 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Figure 18 is please referred to, in hardware view,
The equipment includes processor 1802, internal bus 1804, network interface 1806, memory 1808 and nonvolatile memory
1810, it is also possible that hardware required for other business certainly.Processor 1802 is read from nonvolatile memory 1810
Then corresponding computer program is run into memory 1808, extreme value determining device is formed on logic level.Certainly, in addition to soft
Except part implementation, this specification one or more embodiment is not precluded other implementations, for example, logical device or
Mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic unit,
It can be hardware or logical device.
Figure 19 is please referred to, in Software Implementation, which is applied to issuer;Described device can wrap
It includes:
Acquiring unit 1901 makes issuer obtain the output for carrying out multi-party computations to character string group X1~Xn;It is described
Character string group X1~Xn is directed to the data S1~Sn itself held respectively by 1~n of data side and generated, and character string group Xi includes Ti
The first kind character string of Duan Fuhe the first value rule, H-Ti sections of the second class character strings for meeting the second value rule, Ti and Si
Meet default value relationship, 1≤i≤n and 0≤Ti≤H;Wherein, the value of the output is that character string group X1~Xn is based in advance
The COMPREHENSIVE CALCULATING of imputation method is as a result, the COMPREHENSIVE CALCULATING result is matched with the first value rule and second value is advised
Then;
Determination unit 1902, make issuer first kind character string according to contained by the COMPREHENSIVE CALCULATING result quantity and
The default value relationship, determines the extreme value in S1~Sn.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the first kind character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti=Si;The extreme value is maximum value, and value
For the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn is non-timing, the default value relationship shows Ti=-Si;The extreme value is minimum value, and is taken
Value is the corresponding negative of quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn, which has, just has negative, the default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-
Negative, the extreme value is maximum value and value is the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result and the difference of a;Or
Person, the default value relationship show Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, the extreme value be minimum value and
Value is the corresponding negative of the difference of quantity and b of first kind character string contained by the COMPREHENSIVE CALCULATING result.
Optionally, the first kind character string includes random string, and the second class character string includes zero character string.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the second class character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti=Si;The extreme value is minimum value, and value
For the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn is non-timing, the default value relationship shows Ti=-Si;The extreme value is maximum value, and is taken
Value is the corresponding negative of quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result;
When S1~Sn, which has, just has negative, the default value relationship shows Ti=Si+a, and wherein S1+a~Sn+a is non-
Negative, the extreme value is minimum value and value is the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result and the difference of a;Or
Person, the default value relationship show Ti=- (Si-b), wherein S1-b~Sn-b be it is non-just, the extreme value be maximum value and
Value is the corresponding negative of the difference of quantity and b of first kind character string contained by the COMPREHENSIVE CALCULATING result.
Optionally, the first kind character string includes zero character string, and the second class character string includes random string.
Optionally,
When the multi-party computations are Secure read group total, the preset algorithm is summation algorithm;
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm is exclusive or algorithm.
Optionally, further includes:
Receiving unit 1903, character string group M1~Mn, described to cover after so that issuer is received the cover that 1~n of data side is sent
Character string group is directed to character string group X1~Xn by 1~n of data side respectively and is handled to obtain after lid;
Computing unit 1904, make issuer by the preset algorithm to character string group M1~Mn is integrated after cover based on
It calculates, to obtain COMPREHENSIVE CALCULATING result of the character string group X1~Xn based on the preset algorithm.
Optionally, character string group Xi includes continuously arranged Ti sections of first kind character string;Wherein, in character string group X1~Xn
First or the last one first kind character string alignment for being aligned, and separately including between the character string of same position.
Figure 20 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Figure 20 is please referred to, in hardware view,
The equipment includes processor 2002, internal bus 2004, network interface 2006, memory 2008 and nonvolatile memory
2010, it is also possible that hardware required for other business certainly.Processor 2002 is read from nonvolatile memory 2010
Then corresponding computer program is run into memory 2008, extreme value determining device is formed on logic level.Certainly, in addition to soft
Except part implementation, this specification one or more embodiment is not precluded other implementations, for example, logical device or
Mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic unit,
It can be hardware or logical device.
Figure 21 is please referred to, in Software Implementation, which is applied to any number in 1~n of data side
According to square i;The apparatus may include:
Division unit 2101, the data Si for holding data side i by itself are divided into corresponding subdata Si_1~Si_m,
1≤i≤n;
Generation unit 2102, make data side i generate the corresponding substring group Xi_1 of subdata Si_1~Si_m~
Xi_m, substring group Xi_j include Ti_j sections meet the first kind character string of the first value rule, H-Ti_j sections meet second
Second class character string of value rule;Wherein, when the value of subdata Si_1~Si_j-1 is what 1~n of data side was generated respectively
When the corresponding Segmented Extreme Value K_1~K_j-1 of subdata S1_1~Sn_1 ... S1_j-1~Sn_j-1, Ti_j and Si_j meets pre-
If numerical relation, otherwise the value of Ti_j makes Segmented Extreme Value K_j not equal to subdata Si_j, 1≤j≤m and 0≤Ti_j≤H;
Unit 2103 is provided, makes data side i that substring group Xi_j to be provided to the sub- character generated with other data sides
String group X1_j~Xi-1_j, Xi+1_j~Xn_j carry out multi-party computations, and issuer is made to obtain the multi-party computations
Output, the value of the output is substring group X1_j~Xn_j based on preset algorithm COMPREHENSIVE CALCULATING result G_j are described comprehensive
Close calculated result G_j and be matched with the first value rule and second value rule, with by the issuer according to described
The quantity of first kind character string contained by COMPREHENSIVE CALCULATING result G_j and the default value relationship determine point in S1_j~Sn_j
Section extreme value K_j;Wherein, the extreme value in data S1~Sn, which splices Segmented Extreme Value K_1~K_m by issuer, obtains.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the first kind character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is to be segmented most
Big value, and value is the quantity of first kind character string contained by the COMPREHENSIVE CALCULATING result G_j, the extreme value in S1~Sn is maximum
Value;
When 1~n of data side holds respectively is data P1~Pn of non-positive value, 1~n of data side is by data P1~Pn
Data S1~Sn is converted to, wherein Si=-Pi;And the minimum value in data P1~Pn is that maximum value is corresponding in S1~Sn
Negative;
Data Q1~Qn that 1~n holds respectively when data side has when just having negative, and 1~n of data side converts data Q1~Qn
For data S1~Sn, wherein Si=Qi+a or Si=- (Qi-b);And the maximum value in data Q1~Qn is in S1~Sn
The difference of maximum value and a or the minimum value in data Q1~Qn are maximum value and the corresponding negative of the difference of b in S1~Sn.
Optionally, the first kind character string includes random string, and the second class character string includes zero character string.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the second class character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is to be segmented most
Small value, and value is the quantity of first kind character string contained by COMPREHENSIVE CALCULATING result G_j, the extreme value in S1~Sn is minimum value;
When 1~n of data side holds respectively is data P1~Pn of non-positive value, 1~n of data side is by data P1~Pn
Data S1~Sn is converted to, wherein Si=-Pi;And the maximum value in data P1~Pn is that minimum value is corresponding in S1~Sn
Negative;
Data Q1~Qn that 1~n holds respectively when data side has when just having negative, and 1~n of data side converts data Q1~Qn
For data S1~Sn, wherein Si=Qi+a or Si=- (Qi-b);And the minimum value in data Q1~Qn is in S1~Sn
The difference of minimum value and a or the maximum value in data Q1~Qn are minimum value and the corresponding negative of the difference of b in S1~Sn.
Optionally, the first kind character string includes zero character string, and the second class character string includes random string.
Optionally,
When the multi-party computations are Secure read group total, the preset algorithm is summation algorithm;
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm is exclusive or algorithm.
Optionally, further includes:
Processing unit 2104 handles data side i for substring group Mi_ after corresponding cover substring group Xi_j
j;
Transmission unit 2105 makes data side i that substring group Mi_j after cover is sent to issuer;Wherein, other are counted
Substring group M1_j~Mi-1_j, Mi+1_j~Mn_j are also respectively sent to the inquiry after the cover generated respectively according to side
Side obtains so that the issuer, which is based on the preset algorithm, carries out COMPREHENSIVE CALCULATING to substring group M1_j~Mn_j after cover
COMPREHENSIVE CALCULATING result G_j to substring group X1_j~Xn_j based on the preset algorithm.
Optionally, substring group Xi_j includes continuously arranged Ti_j sections of first kind character string;Wherein, substring group
First or the last one first kind character string pair for being aligned, and separately including between the character string of same position in X1_j~Xn_j
Together.
Optionally, the issuer includes the 1~n of data side;Described device further include:
Determination unit 2106 makes data side i according to the Segmented Extreme Value K_1~K_j-1 known, determines the value of Ti_j.
Optionally, the offer unit 2103 is specifically used for:
Data side i and issuer execute condition oblivious transfer protocol;The input that data side i is provided includes: subdata Si_
1~Si_j-1, in the case where the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1, substring
Substring group Mi_j_1 after the corresponding cover of group Xi_j, and not respectively divide in the value of subdata Si_1~Si_j-1
In the case where section extreme value K_1~K_j-1, substring group Mi_j_2 after the corresponding cover of substring group Xi_j;Issuer mentions
The input of confession includes: the corresponding Segmented Extreme Value K_j-1 of value of subdata S1_j-1~Sn_j-1;
Wherein, when the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1, sub- word after cover
Symbol string group Mi_j_1 is exported to issuer by agreement, to be used to participate in the multi-party computations, substring after otherwise covering
Group Mi_j_2 is exported by agreement to issuer, for participating in the multi-party computations.
Optionally,
When Segmented Extreme Value K_j is maximum value, if the value for being unsatisfactory for subdata Si_1~Si_j-1 is respectively to be segmented pole
The value of value K_1~K_j-1, Ti_j are 0;
When Segmented Extreme Value K_j is minimum value, if the value for being unsatisfactory for subdata Si_1~Si_j-1 is respectively to be segmented pole
Every of the binary system value of value K_1~K_j-1, Ti_j is 1.
Figure 22 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Figure 22 is please referred to, in hardware view,
The equipment includes processor 2202, internal bus 2204, network interface 2206, memory 2208 and nonvolatile memory
2210, it is also possible that hardware required for other business certainly.Processor 2202 is read from nonvolatile memory 2210
Then corresponding computer program is run into memory 2208, extreme value determining device is formed on logic level.Certainly, in addition to soft
Except part implementation, this specification one or more embodiment is not precluded other implementations, for example, logical device or
Mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic unit,
It can be hardware or logical device.
Figure 23 is please referred to, in Software Implementation, which is applied to issuer;Described device can wrap
It includes:
Acquiring unit 2301 obtains issuer and carries out the defeated of multi-party computations to substring group X1_j~Xn_j
Out;The substring group X1_j~Xn_j is divided into accordingly by data S1~Sn that 1~n of data side respectively holds itself
After subdata S1_1~S1_m ... Sn_1~Sn_m, sub-data S1_j~Sn_j and generate, substring group Xi_j packet
It includes Ti_j sections and meets the first kind character string of the first value rule, H-Ti_j sections of the second class characters for meeting the second value rule
String;Wherein, when the value of subdata Si_1~Si_j-1 is subdata S1_1~Sn_1 ... that 1~n of data side is generated respectively
When the corresponding Segmented Extreme Value K_1~K_j-1 of S1_j-1~Sn_j-1, Ti_j and Si_j meet default value relationship, otherwise Ti_j
Value make Segmented Extreme Value K_j not equal to subdata Si_j, 1≤j≤m and 0≤Ti_j≤H;Wherein, the value of the output is
Substring group X1_j~Xn_j is matched with institute based on COMPREHENSIVE CALCULATING the result G_j, the COMPREHENSIVE CALCULATING result G_j of preset algorithm
State the first value rule and second value rule;
Determination unit 2302 makes the number of issuer first kind character string according to contained by the COMPREHENSIVE CALCULATING result G_j
Amount and the default value relationship, determine the Segmented Extreme Value K_j in S1_j~Sn_j;
Concatenation unit 2303 splices that the issuer to Segmented Extreme Value K_1~K_m, with true according to splicing result
Fixed number is according to the extreme value in S1~Sn.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the first kind character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is to be segmented most
Big value, and value is the quantity of first kind character string contained by COMPREHENSIVE CALCULATING result G_j, the extreme value in S1~Sn is maximum value;
When 1~n of data side holds respectively is data P1~Pn of non-positive value, 1~n of data side is by data P1~Pn
Data S1~Sn is converted to, wherein Si=-Pi;And the minimum value in data P1~Pn is that maximum value is corresponding in S1~Sn
Negative;
Data Q1~Qn that 1~n holds respectively when data side has when just having negative, and 1~n of data side converts data Q1~Qn
For data S1~Sn, wherein Si=Qi+a or Si=- (Qi-b);And the maximum value in data Q1~Qn is in S1~Sn
The difference of maximum value and a or the minimum value in data Q1~Qn are maximum value and the corresponding negative of the difference of b in S1~Sn.
Optionally, the first kind character string includes random string, and the second class character string includes zero character string.
Optionally, the first value rule and the second value rule can make: base between the first kind character string
In preset algorithm calculated result between the first kind character string, the second class character string based on the preset algorithm
Calculated result is that the second class character string, the first kind character string and the second class character string are based on the preset algorithm
Calculated result be the second class character string.
Optionally,
When S1~Sn is non-negative, the default value relationship shows Ti_j=Si_j;Segmented Extreme Value K_j is to be segmented most
Small value, and value is the quantity of first kind character string contained by COMPREHENSIVE CALCULATING result G_j, the extreme value in S1~Sn is minimum value;
When 1~n of data side holds respectively is data P1~Pn of non-positive value, 1~n of data side is by data P1~Pn
Data S1~Sn is converted to, wherein Si=-Pi;And the maximum value in data P1~Pn is that minimum value is corresponding in S1~Sn
Negative;
Data Q1~Qn that 1~n holds respectively when data side has when just having negative, and 1~n of data side converts data Q1~Qn
For data S1~Sn, wherein Si=Qi+a or Si=- (Qi-b);And the minimum value in data Q1~Qn is in S1~Sn
The difference of minimum value and a or the maximum value in data Q1~Qn are minimum value and the corresponding negative of the difference of b in S1~Sn.
Optionally, the first kind character string includes zero character string, and the second class character string includes random string.
Optionally,
When the multi-party computations are Secure read group total, the preset algorithm is summation algorithm;
When the multi-party computations are that Secure exclusive or calculates, the preset algorithm is exclusive or algorithm.
Optionally, further includes:
Receiving unit 2304 makes issuer receive substring group M1_j~Mn_j after the cover that 1~n of data side is sent,
Substring group M1_j~Mn_j is directed to substring group X1_j~Xn_j by 1~n of data side respectively and carries out after the cover
Reason obtains;
Computing unit 2305 makes issuer be based on the preset algorithm and carries out to substring group M1_j~Mn_j after cover
COMPREHENSIVE CALCULATING, to obtain COMPREHENSIVE CALCULATING result G_j of the substring group X1_j~Xn_j based on the preset algorithm.
Optionally, substring group Xi_j includes continuously arranged Ti_j sections of first kind character string;Wherein, substring group
First or the last one first kind character string pair for being aligned, and separately including between the character string of same position in X1_j~Xn_j
Together.
Optionally, the issuer includes the 1~n of data side, and the 1~n of data side is according to the Segmented Extreme Value known
K_1~K_j-1 determines the value of T1_j~Tn_j respectively.
Optionally, the acquiring unit is specifically used for:
Issuer is set to execute condition oblivious transfer protocol with 1~n of data side respectively;Data side i provide input include:
Subdata Si_1~Si_j-1, the case where the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1
Under, substring group Mi_j_1 after the corresponding cover of substring group Xi_j, and the value in subdata Si_1~Si_j-1
In the case where being not respectively Segmented Extreme Value K_1~K_j-1, substring group Mi_ after the corresponding cover of substring group Xi_j
j_2;The input that issuer provides includes: the corresponding Segmented Extreme Value K_j-1 of value of subdata S1_j-1~Sn_j-1;
Make issuer that the output of the condition oblivious transfer protocol is applied to the multi-party computations;Wherein, when
When the value of subdata Si_1~Si_j-1 is respectively Segmented Extreme Value K_1~K_j-1, the condition oblivious transfer protocol it is defeated
It is out substring group Mi_j_1 after cover, otherwise the output of the condition oblivious transfer protocol is substring group after covering
Mi_j_2。
Optionally,
When Segmented Extreme Value K_j is maximum value, if the value for being unsatisfactory for subdata Si_1~Si_j-1 is respectively to be segmented pole
The value of value K_1~K_j-1, Ti_j are 0;
When Segmented Extreme Value K_j is minimum value, if the value for being unsatisfactory for subdata Si_1~Si_j-1 is respectively to be segmented pole
Every of the binary system value of value K_1~K_j-1, Ti_j is 1.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
In a typical configuration, computer includes one or more processors (CPU), input/output interface, network
Interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, based on graphene
Storage medium or other magnetic storage devices or any other non-transmission medium, can be used for storing can be accessed by a computing device
Information.As defined in this article, computer-readable medium does not include temporary computer readable media (transitory media),
Such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
The term that this specification one or more embodiment uses be only merely for for the purpose of describing particular embodiments, and
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and the appended claims
Used in the "an" of singular, " described " and "the" be also intended to including most forms, unless context understands earth's surface
Show other meanings.It is also understood that term "and/or" used herein refers to and includes one or more associated list
Any or all of project may combine.
It will be appreciated that though this specification one or more embodiment may using term first, second, third, etc. come
Various information are described, but these information should not necessarily be limited by these terms.These terms are only used to same type of information area each other
It separates.For example, the first information can also be referred to as in the case where not departing from this specification one or more scope of embodiments
Two information, similarly, the second information can also be referred to as the first information.Depending on context, word as used in this is " such as
Fruit " can be construed to " ... when " or " when ... " or " in response to determination ".
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory
Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any
Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.