Electronic device for estimating approximate rank of homomorphic ciphertext and control method thereof
Provided are an electronic device for estimating an approximate rank of a homomorphic ciphertext and a control method thereof. The electronic device includes: a communication device; a memory storing at least one instruction; and a processor connected to the memory and configured to control the electronic device, wherein the processor obtains N homomorphic ciphertexts; generates K knots for calculating approximate ranks, K being a number smaller than N; and calculates approximate ranks of the N homomorphic ciphertexts based on probabilities that the N homomorphic ciphertexts exist between the K knots.
1 . An electronic device for estimating an approximate rank of a homomorphic ciphertext, the electronic device comprising:
a communication device;
a memory storing at least one instruction; and
a processor connected to the memory and configured to control the electronic device,
wherein the processor:
obtains N homomorphic ciphertexts;
generates K knots for calculating approximate ranks, K being a number smaller than N;
calculates approximate ranks of the N homomorphic ciphertexts based on probabilities that the N homomorphic ciphertexts exist between the K knots, wherein the processor calculates the approximate ranks of the N homomorphic ciphertexts according to the following formula:
r
i
′
=
r
′
(
x
i
;
ξ
)
=
N
∑
j
=
1
k
Pr
(
ξ
j
-
1
≤
x
i
<
ξ
j
)
·
I
(
ξ
j
≤
x
i
)
where x i denotes a homomorphic ciphertext, r i ′ denotes an approximate rank of the homomorphic ciphertext, Pr(ξ j−1 ≤x i ξ j ) denotes a probability that x i exists between ξ j−1 and ξ j , and I(ξ j ≤x i ) denotes a function that is 1 when ξ j ≤x i , and 0 otherwise; and
identifies a specific decile group or a top-ranked group within a recommendation model or exploratory data analysis using the calculated approximate ranks.
2 . The electronic device as claimed in claim 1 , wherein the K knots have values between maximum and minimum values of the N homomorphic ciphertexts.
3 . The electronic device as claimed in claim 1 , wherein intervals between the K knots are equal.
4 . The electronic device as claimed in claim 1 , wherein the processor:
obtains N first homomorphic ciphertexts and N second homomorphic ciphertexts; and
obtains a Spearman rank correlation coefficient of the first homomorphic ciphertexts and the second homomorphic ciphertexts based on approximate ranks of the first homomorphic ciphertexts and the second homomorphic ciphertexts.
5 . A control method of an electronic device for estimating an approximate rank of a homomorphic ciphertext, the control method comprising:
obtaining N homomorphic ciphertexts;
generating K knots for calculating approximate ranks, K being a number smaller than N;
calculating approximate ranks of the N homomorphic ciphertexts based on probabilities that the N homomorphic ciphertexts exist between the K knots, wherein the calculating of the approximate ranks of the N homomorphic ciphertexts are calculated according to the following formula:
r
i
′
=
r
′
(
x
i
;
ξ
)
=
N
∑
j
=
1
k
Pr
(
ξ
j
-
1
≤
x
i
<
ξ
j
)
·
I
(
ξ
j
≤
x
i
)
where x i denotes a homomorphic ciphertext, r i ′ denotes an approximate rank of the homomorphic ciphertext, Pr(ξ j−1 ≤x i ξ j ) denotes a probability that x i exists between ξ j−1 and ξ j , and I(ξ j ≤x i ) denotes a function that is 1 when ξ j ≤x i , and 0 otherwise; and
identifying a specific decile group or a top-ranked group within a recommendation model or exploratory data analysis using the calculated approximate ranks.
6 . The control method as claimed in claim 5 , wherein the K knots have values between maximum and minimum values of the N homomorphic ciphertexts.
7 . The control method as claimed in claim 5 , wherein intervals between the K knots are equal.
8 . The control method as claimed in claim 5 , wherein in the obtaining of the N homomorphic ciphertexts, N first homomorphic ciphertexts and N second homomorphic ciphertexts are obtained, and
the control method further comprises: obtaining a Spearman rank correlation coefficient of the first homomorphic ciphertexts and the second homomorphic ciphertexts based on approximate ranks of the first homomorphic ciphertexts and the second homomorphic ciphertexts.
9 . An electronic device for estimating an approximate rank of a homomorphic ciphertext, the electronic device comprising:
a communication device;
a memory storing at least one instruction; and
a processor connected to the memory and configured to control the electronic device, wherein the processor:
obtains N homomorphic ciphertexts;
generates K knots for calculating approximate ranks, K being a number smaller than N;
calculates approximate ranks of the N homomorphic ciphertexts based on probabilities that the N homomorphic ciphertexts exist between the K knots, wherein the processor calculates the approximate ranks of the N homomorphic ciphertexts according to the following formula:
r
i
′
=
r
′
(
x
i
;
ξ
)
=
N
∑
j
=
1
k
Pr
(
ξ
j
-
1
≤
x
i
<
ξ
j
)
·
I
(
ξ
j
≤
x
i
)
where x i denotes a homomorphic ciphertext, r i ′ denotes an approximate rank of the homomorphic ciphertext, Pr(ξ j−1 ≤x i <ξ j ) denotes a probability that x i exists between ξ j−1 and ξ j , and I(ξ j ≤x 1 ) denotes a function that is 1 when ξ j ≤x i , and 0 otherwise; and
performs a nonparametric statistical operation to obtain a robust statistic from the encrypted data based on the calculated approximate ranks.
10 . An electronic device for estimating an approximate rank of a homomorphic ciphertext, the electronic device comprising:
a communication device;
a memory storing at least one instruction; and
a processor connected to the memory and configured to control the electronic device, wherein the processor:
obtains N homomorphic ciphertexts;
generates K knots for calculating approximate ranks, K being a number smaller than N;
calculates approximate ranks of the N homomorphic ciphertexts based on probabilities that the N homomorphic ciphertexts exist between the K knots, wherein the processor calculates the approximate ranks of the N homomorphic ciphertexts according to the following formula:
r
i
′
=
r
′
(
x
i
;
ξ
)
=
N
∑
j
=
1
k
Pr
(
ξ
j
-
1
≤
x
i
<
ξ
j
)
·
I
(
ξ
j
≤
x
i
)
where x i denotes a homomorphic ciphertext, r i ′ denotes an approximate rank of the homomorphic ciphertext, Pr(ξ j−1 ≤x i <ξ j ) denotes a probability that x i exists between ξ j−1 and ξ j , and I(ξ j ≤x i ) denotes a function that is 1 when ξ j ≤x i , and 0 otherwise; and
identifies a key value for a query from a homogeneous knowledge database by identifying a top-ranking ciphertext among the calculated approximate ranks.