Secret calculation device, secret calculation method, and program
By generating a flag sequence and calculating the number of true data using a secret computing device, the data processing problem caused by missing values in secret computing is solved, and representative value calculation is realized in the state of concealed missing values, thus ensuring the effectiveness of machine learning.
Patent Information
- Application Number
- CN202280096705.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2025-01-10
AI Technical Summary
In secret computation, the presence of missing values prevents many machine learning models from effectively processing the data, and existing technologies cannot compute representative values while concealing missing values.
A secret computing device is used to generate a flag sequence through a flag sequence generation unit and calculate the number of missing values using a true data number calculation unit. Combined with an average value calculation unit, a median value calculation unit, and a mode value calculation unit, the data transformation of the missing values is realized.
By concealing the number and location of missing values, representative values can be calculated, ensuring the integrity of data processing and the effectiveness of machine learning.
Smart Images

Figure CN119301661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a secret computing device, a secret computing method, and a program for calculating a representative value of data excluding missing values while concealing input data including missing values. Background Art
[0002] As a method of obtaining a specific calculation result without restoring the encrypted numerical value, there is a method called secret computing (for example, refer to non-patent document 1 and non-patent document 2). In the method described in non-patent document 1, a fragment of a numerical value is encrypted and distributed to three secret computing devices, and the three secret computing devices perform collaborative calculations, thereby maintaining the state of addition and subtraction, constant addition, multiplication, constant multiplication, logical operations (logical negation, logical AND, logical OR, logical XOR), and data format transformation (integer, binary number) distributed to the three secret computing devices, i.e., the encrypted state, without restoring the numerical value. In addition, in non-patent document 2, the functions that can be executed in secret computing are specifically shown. In recent years, schemes for performing machine learning on secret computing have also been proposed.
[0003] Prior art literature
[0004] Non-patent literature
[0005] Non-patent literature 1: Koji Chida, Hiroshi Hamada, Dai Igarashi, Katsumi Takahashi, "Reexamination of the calculation of the secret number of the possible 3パーティsecret level of the proof of the authority of the police", In CSS, 2010.
[0006] Non-patent document 2: Naoto Kiribuchi, Dai Igarashi, Hiroshi Hamada, Ryo Kikuchi, "Secret Calculation of プログラマブルなMEVAL3", In SCIS, 2018
[0007] Non-Patent Literature 3: the pandas development team, "pandas.DataFrame.fillna", [online], [searched on May 27, 2020], Index <URL: https: / / pandas.pydata.org / docs / reference / api / pandas.DataFrame.fillna.html> Summary of the invention
[0008] Problems to be solved by the invention
[0009] There are often missing values in the data. For example, in a questionnaire survey, when the respondent does not answer or the sensor fails to obtain the data for some reason when the data is obtained through the sensor, the data becomes missing. Such missing data is called missing value. In addition to missing values, it is sometimes expressed as missing values, null values, NA (Not Available), etc. In the case of missing values in the data, many machine learning models cannot regard the data as learning data. In such a case, the missing value is usually replaced with a representative value representing the data (Non-Patent Literature 3). As a representative value, the average value, median value, and mode of the data excluding the missing value are usually used.
[0010] However, the method of calculating the representative value of data including missing values in secret computing is not taken for granted, so it is impossible to apply existing technology to machine learning in secret computing to supplement the missing values.
[0011] Therefore, the present invention aims to provide a secure computing device that can implement data deformation for calculating a representative value for data including missing values while concealing the number and position of the missing values.
[0012] Means for solving problems
[0013] The secret computing device of the present invention is a secret computing device that performs calculations in a state where input data including a sequence of encrypted numerical values (VALUE) containing missing values is kept secret, and includes a flag sequence generating unit and a true data number calculating unit.
[0014] The flag sequence generation unit generates a flag sequence, wherein the flag sequence is a sequence of flags, wherein the flag sequence is a value encrypted with 0 when the corresponding numerical value is a missing value, and a value encrypted with 1 when the corresponding numerical value is not a missing value. The true data number calculation unit calculates the number of true data excluding the missing value by summing up the values of the flags of the flag sequence.
[0015] Effects of the Invention
[0016] According to the confidential computing device of the present invention, for data including missing values, data deformation for calculating a representative value is achieved while concealing the number and position of the missing values. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a block diagram illustrating secret distribution processing performed on multiple secret computing devices connected to a network.
[0018] Figure 2 This is a block diagram showing the functional structure of the secure computing device of Example 1.
[0019] Figure 3 This is a flowchart showing the operation of the secure computing device of Example 1.
[0020] Figure 4 This is a block diagram showing the functional structure of the average value calculation unit of the first embodiment.
[0021] Figure 5 This is a flowchart showing the operation of the average value calculation unit of the first embodiment.
[0022] Figure 6 This is a diagram showing an example of data processed by the correction value sequence generation unit of the average value calculation unit of the first embodiment.
[0023] Figure 7 This is a block diagram showing the functional structure of a median calculation unit of the first embodiment.
[0024] Figure 8 This is a flowchart showing the operation of the median value calculation unit of the first embodiment.
[0025] Fig. 9 This is a diagram showing an example of data processed by the missing value covering unit of the median value calculation unit of Example 1.
[0026] Fig.10 This is a diagram showing an example of data processed by the numerical ascending sorting unit and the index flag sequence generating unit of the median value calculating unit of the first embodiment.
[0027] Fig.11 This is a diagram showing an example of data processed by the odd-numbered flag sequence generating unit and the even-numbered flag sequence generating unit of the median value calculating unit of the first embodiment.
[0028] Fig.12 This is a block diagram showing the functional structure of the mode value calculation unit of the first embodiment.
[0029] Fig.13 This is a flowchart showing the operation of the mode value calculation unit of the first embodiment.
[0030] Fig.14 This is a diagram showing an example of data processed by the missing value covering unit, the numerical value ascending order sorting unit, and the boundary marker sequence generating unit of the majority value calculating unit of the first embodiment.
[0031] Fig.15 This is a diagram showing an example of data processed by the numerical vector generating unit, the frequency vector generating unit, and the mode value output unit of the mode value calculating unit of the first embodiment.
[0032] Fig.16 This is a diagram showing an example of a functional configuration of a computer. DETAILED DESCRIPTION
[0033] Hereinafter, the embodiments of the present invention will be described in detail. In addition, the same reference numerals are given to components having the same functions, and duplicate descriptions are omitted.
[0034] Example 1
[0035] refer to Figure 1 , the secret distribution processing performed by multiple secret computing devices 1-1, ...1-p, ...1-P (P is an integer greater than 2, p=1, ..., P) of embodiment 1 connected to network 9 is explained. As shown in the figure, the secret computing devices 1-1, ...1-p, ...1-P of this embodiment are connected to network 9 so as to be able to communicate with each other. P secret computing devices 1-1, ...1-p, ...1-P all have the same function and are collectively referred to as secret computing devices 1. The data processed by the secret computing device 1 is encrypted by secret distribution through the structure shown in the figure and is calculated in the encrypted state.
[0036] In addition, the data processed by the secret computing device of the present invention needs to be encrypted by some method and calculated in an encrypted state, but it does not necessarily have to be encrypted by secret distribution.
[0037] refer to Figure 2 , the functional structure of the secret computing device 1 is explained. The secret computing device 1 is a device that performs calculations on input data including a numerical sequence that contains missing values and is encrypted in a hidden state. As shown in the figure, the secret computing device 1 of this embodiment includes: a flag sequence generation unit 11, a true data number calculation unit 12, an average value calculation unit 13, a median value calculation unit 14, and a mode value calculation unit 15. Figure 3 , the operation of each structural element is explained.
[0038] <Flag sequence generation unit 11>
[0039] The encrypted numerical sequence containing missing values is set to be v=v1,...,v consisting of n≥2 values n , use index i to represent the value of any value as v i For v, with the flag sequence f=f1,...,f n Indicates the result of checking for missing values, and NA represents missing values.
[0040] The flag sequence generation unit 11 generates a flag sequence (see mathematical formula 1), which is a sequence of flags of values encrypted as 0 when the corresponding numerical value is a missing value (NA) and encrypted as 1 when the corresponding numerical value is not a missing value (NA) (S11).
[0041] Mathematical formula 1
[0042]
[0043] The method proposed in Reference Patent Document 1 can be used to check the missing value.
[0044] (Reference Patent Document 1: Japanese Patent No. 5957126)
[0045] <True data number calculation unit 12>
[0046] The true data number calculation unit 12 sums the values of the flags in the flag sequence (Σ n i=1 f i ) and calculate the number of true data excluding missing values (S12). Therefore, the true data number calculation unit 12 calculates the number of true data m by m=Σ n i=1 f i Calculate the number m of true data.
[0047] <Average value calculation unit 13>
[0048] The average value calculation unit 13 calculates the average value of the numerical sequence based on the numerical sequence, the flag sequence, and the number of true data m (S13). The details will be described later.
[0049] <Median value calculation unit 14>
[0050] The median value calculation unit 14 calculates the median value of the numerical sequence based on the numerical sequence, the flag sequence, and the number of true data m ( S14 ). The details will be described later.
[0051] <Mode of operation unit 15>
[0052] The mode value calculation unit 15 calculates the mode value of the numerical sequence using an aggregate sum calculation based on the numerical sequence, the flag sequence, and the number of true data m ( S15 ). The details will be described later.
[0053] In addition, when there are key attributes and numerical attributes in a table, an aggregate function is an operation to obtain a statistical value of a group based on the value of the key attribute. The aggregate sum is one of the aggregate functions, and is an operation to aggregate the sum of the expected numerical attributes of each group when the table is grouped based on the value of the key attribute. For example, the aggregate sum operation can use the method proposed in reference patent document 2.
[0054] (Reference Patent Document 2: Japanese Patent No. 6973632)
[0055] The secret aggregate sum system of reference patent document 2 is, input:
[0056] A vector of numeric attributes when sorting based on the value of the key attribute;
[0057] When grouping based on the value of a key attribute, the last element of each group is true and the other elements are false;
[0058] ·The number of groups and the values of key attributes are not repeated as vector elements;
[0059] And output:
[0060] A vector representing the sum of the numeric attributes for each group.
[0061] <Detailed Functional Configuration of Average Value Calculation Unit 13>
[0062] Below, reference Figure 4 , the detailed functional structure of the average value calculation unit 13 is described. As shown in the figure, the average value calculation unit 13 of this embodiment includes: a correction value sequence generation unit 131 and an average value calculation unit 132. Figure 5 , the operation of each structural element is explained.
[0063] <<Correction numerical sequence generation unit 131>>
[0064] The correction value sequence generation unit 131 sets the product of the flag corresponding to the value, that is, v'=v×f, as the correction value, and generates the correction value sequence v' (S131). In addition, the multiplication result of the missing value (NA) and 0 becomes 0. Therefore, for the correction value sequence v', for values other than the missing value, the value in the value sequence v is unchanged, and the missing value is converted to 0. Figure 6 2 shows an operation example of the correction value sequence generation unit 131. Referring to the table before processing on the left side of the same figure and the table after processing on the right side of the same figure, it can be seen that NA is converted to 0.
[0065] 《Average value calculation unit 132》
[0066] The average value calculation unit 132 divides the sum of the correction values by the number of true data, that is, calculates mean using Formula 2, and calculates the average value (mean) of the input data (S132).
[0067] Mathematical formula 2
[0068]
[0069] <Detailed Functional Configuration of Median Value Calculation Unit 14>
[0070] Below, reference Figure 7, the detailed functional structure of the median value calculation unit 14 is described. As shown in the figure, the median value calculation unit 14 of this embodiment includes: a missing value covering unit 141, a numerical ascending order sorting unit 142, an index flag sequence generating unit 143, a median value index calculating unit 144, an odd flag sequence generating unit 145, an even flag sequence generating unit 146 and a median value calculating unit 147. Figure 8 , the operation of each structural element is explained.
[0071] 《Missing value covering part 141》
[0072] The missing value covering unit 141 sorts the data in descending order based on f, and the data is a set of values of v and f corresponding to each other by index (v i ,f i ). The sorting process (including stable sorting) can use the sorting described in reference non-patent document 1, for example.
[0073] (Reference to unlicensed literature 1: Dai Igarashi, Hiroshi Hamada, Ryo Kikuchi, Koji Chida, "Ultra-high-speed secret calculation design and installation: Secret calculation design and language", CSS2017)
[0074] The sorted v and f are expressed as v' and f'. Thus, the missing value is moved backward. Fig. 9 The table on the left side of the figure shows the state before the sorting process performed by the missing value covering unit 141, and the table in the center of the figure shows the state after the sorting process performed by the missing value covering unit 141. In addition, this sorting process is not essential and can be omitted as appropriate.
[0075] Next, the missing value covering unit 141 covers the missing value with a value larger than the maximum value of the numerical value in the true data ( S141 ). Fig. 9 The table on the right side shows the status after the missing value covering unit 141 performs the covering process.
[0076] For example, the missing value covering unit 141 may also cover the missing value with the maximum value that can be represented in the processing system. If the value is stored as an unsigned integer, the maximum value is a value where all bits are 1 (0b1...1). This is for 1≤i≤n, in f i When '=0, cover v with the maximum value i 'processing.
[0077] In addition, step S141 is a process performed to correctly perform ascending sorting as a subsequent process, and therefore, the missing value needs to be replaced with a value larger than the maximum value of the value in the true data, and NA does not necessarily need to be replaced with a value (0b1...1) in which all bits are 1. However, as mentioned above, the values of the numerical sequence are all encrypted, so in order to reliably convert NA into a large value without knowing the value of the numerical sequence, it is considered that the simplest method is to cover NA with a value (0b1...1) in which all bits are 1.
[0078] 《Numerical value ascending order sorting part 142》
[0079] The numerical ascending sorting unit 142 sorts the data consisting of the numerical sequence v' and the flag sequence in ascending order based on the value v' (S142). The sorting result is represented as v". Fig.10 The table on the left side of FIG. 1 shows the state before the ascending sorting process by the numerical ascending sorting unit 142 , and the table in the center of FIG. 1 shows the state after the ascending sorting process by the numerical ascending sorting unit 142 .
[0080] Index mark sequence generation unit 143
[0081] The index flag sequence generation unit 143 generates an index flag sequence j, which is a sequence of index flags. The value corresponding to the first row of data is a value encrypted with 0 (j1=0), and the value corresponding to the remaining rows is a value obtained by adding 1 to the value corresponding to the previous row (j2=1, j3=2, ..., j n =n-1) encrypted value (S143). Fig.10 The table on the right side of shows the status after the flag sequence generation process performed by the index flag sequence generation unit 143.
[0082] 《Median Index Calculation Unit 144》
[0083] The median index calculation unit 144 sets the true number of data to m, calculates the value obtained by rounding off (m-1) / 2 and uses it as the median index I med , that is, the following mathematical formula 3 (S144).
[0084] Mathematical formula 3
[0085]
[0086] In addition, the brackets in the above formula indicate the operation of rounding off the decimal part.
[0087] 《Odd-numbered flag sequence generation unit 145》
[0088] The odd-numbered flag sequence generating unit 145 generates an odd-numbered flag sequence fodd , which is the following mathematical formula 4,
[0089] Mathematical formula 4
[0090]
[0091] The odd-numbered flag sequence f odd is a sequence of odd-numbered flags, where the value of the index flag is not equal to the value of the median index (I med ≠j i ,1≤i≤n) is a value that encrypts the value 0, and when the value of the index flag is equal to the value of the median index (I med =j i ,1≤i≤n) is the encrypted value of value 1 (S145).
[0092] Even-numbered flag sequence generation unit 146
[0093] The even-numbered flag sequence generation unit 146 generates an even-numbered flag sequence f even , that is, the following mathematical formula 5,
[0094] Mathematical formula 5
[0095]
[0096] Furthermore, f even =or(f even , f odd )
[0097] Even-numbered flag sequence f even is a sequence of even-numbered flags, where the value of the index flag is not equal to the value of adding 1 to the median index (I med +1≠j i ,1≤i≤n) is the encrypted value of value 0, when the value of the index flag is equal to the value of adding 1 to the median index (I med +1=j i ,1≤i≤n) is a value encrypted with the value 1, and the value corresponding to the case where the value of the odd flag is 1 is 1 (S146). In addition, or indicates that a normal logical or process is performed. Fig.11 The table shows the status after the odd flag sequence and the even flag sequence are generated.
[0098] 《Median Calculation Department 147》
[0099] In the case where the true number of data m is an odd number, the median value calculation unit 147 calculates the value v" and the odd number flag f oddThe sum of the products is taken as the median value. When the number of true data m is an even number, the value v" and the even number flag f are calculated. even The sum of the products is divided by 2 and taken as the median, which is the following mathematical formula 6 (S147).
[0100] Mathematical formula 6
[0101]
[0102] <Detailed Functional Configuration of the Mode Value Calculation Unit 15>
[0103] Below, reference Fig.12 , the detailed functional structure of the mode value calculation unit 15 is described. As shown in the figure, the mode value calculation unit 15 of this embodiment includes: a missing value covering unit 151, a numerical ascending order sorting unit 152, a boundary marker sequence generating unit 153, a group number calculating unit 154, a numerical vector generating unit 155, a frequency vector calculating unit 156 and a mode value output unit 157.
[0104] Below, reference Fig.13 , the operation of each structural element is explained.
[0105] 《Missing value covering part 151》
[0106] The missing value covering unit 151 covers the missing value with a value greater than the maximum value of the numerical value in the true data (S151). Fig.14 The table on the left side shows the status after the missing value covering process performed by the missing value covering unit 151.
[0107] 《Numerical ascending order sorting part 152》
[0108] The numerical ascending sorting unit 152 sorts the data consisting of the numerical sequence and the flag sequence (v i ,f i ) are sorted in ascending order (S152). The sorted results are set as v', f' respectively.
[0109] exist Fig.14 The table in the center shows the state after the ascending order sorting process performed by the numerical ascending order sorting unit 152.
[0110] <Boundary Marker Sequence Generation Unit 153>
[0111] The boundary marker sequence generation unit 153 generates a boundary marker sequence, which is the following mathematical formula 7:
[0112] Mathematical formula 7
[0113]
[0114] e n=1
[0115] The boundary marker sequence is a sequence of boundary markers. The boundary marker sequence is: when the value of a specified value is equal to the value of the next value (value), i '=v i +1',1≤i≤n-1), and the specified value v i 'The corresponding value is a value encrypted with 0. If the value of the specified value is not equal to the value of the next value (v i '≠v i +1',1≤i≤n-1), and the specified value v i 'The corresponding value is the encrypted value of 1, which is the same as the value v at the bottom row of the numerical sequence n 'The corresponding value is the encrypted value of 1 (S153). Fig.14 The table on the right side of shows the status after the marker sequence generation process performed by the boundary marker sequence generation unit 153. Through this process, the boundary marker e whose index is 1 for the last element of each value included in the key attribute v' can be derived.
[0116] 《Group Number Calculation Department 154》
[0117] The group number calculation unit 154 uses the sum of the boundary marker sequences as the group number g, and calculates the group number g=Σ n i =1e i (S154).
[0118] 《Numerical vector generation unit 155》
[0119] The numerical vector generation unit 155 generates a numerical vector k whose elements have a numerical value corresponding to the value 1 of the boundary flag, that is, for 1≤i≤n, 1≤j≤g, starting from the beginning in e i = 1 when the numerical vector k is k j =vi' (S155). The numerical vector k is a vector whose elements are not repeated in the value of the key attribute. Fig.15 The second table from the left shows examples of numerical vectors generated by the numerical vector generation unit 155.
[0120] 《Frequency vector calculation unit 156》
[0121] The frequency vector calculation unit 156 calculates a frequency vector s=s1, . . . , s which is the sum of the values (numeric attributes) of the flags in each group divided based on the value 1 of the boundary flag. g (S156). Fig.15 The third table from the left shows an example of the frequency vector generated by the frequency vector calculation unit 156.
[0122] 《Multi-value Output Section 157》
[0123] The mode value output unit 157 sorts the data (ki, si) consisting of the groups of the numerical vector k and the elements of the frequency vector s in descending order using the frequency vector s as a key, and outputs the element of the leading numerical vector as the mode value (mode=k1') (S157). Fig.15 The table on the far right shows the state after the descending order sorting process performed by the majority value output unit 157.
[0124] <Effects of the secure computing device 1 of Example 1>
[0125] According to the secure computing device 1 of the first embodiment, for data including missing values, a representative value of values other than missing values can be calculated by secure computing while concealing the number of missing values and the index where the missing values exist.
[0126] <Supplementary explanation>
[0127] The device of the present invention, for example, as a single hardware entity, has: an input unit that can be connected to a keyboard, etc., an output unit that can be connected to a liquid crystal display, etc., a communication unit that can be connected to a communication device (such as a communication cable) that can communicate with the outside of the hardware entity, a CPU (Central Processing Unit, which may also have a cache memory, registers, etc.), a RAM and ROM as memories, an external storage device as a hard disk, and a bus that connects these input units, output units, communication units, CPUs, RAMs, ROMs, and external storage devices so that data can be exchanged between them. In addition, as needed, a device (drive) that can read and write a recording medium such as a CD-ROM, etc., can also be set in the hardware entity. As a physical entity with such hardware resources, there are general-purpose computers, etc.
[0128] The external storage device of the hardware entity stores the programs required to realize the above functions and the data required in the processing of the programs (not limited to the external storage device, for example, the programs may be stored in a ROM which is a read-only storage device). In addition, the data obtained by the processing of these programs is appropriately stored in a RAM, an external storage device, etc.
[0129] In the hardware entity, each program stored in an external storage device (or ROM, etc.) and the data required for processing the program are read into the memory as needed, and are interpreted, executed, and processed by the CPU as appropriate. As a result, the CPU realizes the specified function (the above-mentioned structural elements are represented as ... parts, ... components, etc.).
[0130] The present invention is not limited to the above-mentioned embodiments and can be appropriately changed within the scope of the main purpose of the present invention. In addition, the processing described in the above-mentioned embodiments can not only be performed in a time series according to the order of the records, but also can be performed in parallel or individually according to the processing capacity or needs of the device performing the processing.
[0131] As described above, when the processing functions in the hardware entity (device of the present invention) described in the above embodiment are realized by a computer, the processing contents of the functions that the hardware entity should have are described by a program. And, by executing the program by a computer, the processing functions in the above hardware entity can be realized on the computer.
[0132] The above-mentioned various treatments can be achieved by Fig.16 The recording unit 10020 of the computer 10000 shown reads a program for executing each step of the above-mentioned method, and implements it by operating the control unit 10010, the input unit 10030, the output unit 10040, etc.
[0133] The program describing the processing content can be recorded in a computer-readable recording medium. As a computer-readable recording medium, for example, any storage medium such as a magnetic recording device, an optical disc, an optical magneto-optical recording medium, and a semiconductor memory. Specifically, for example, as a magnetic recording device, a hard disk device, a floppy disk, a magnetic tape, etc. can be used, as an optical disc, a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (Rewritable), etc. can be used, as an optical magneto-optical recording medium, an MO (Magneto-Optical Disc) can be used, and as a semiconductor memory, an EEP-ROM (Electrically Erasable and Programmable-Read Only Memory) can be used.
[0134] The program is distributed by selling, transferring, renting, etc. a portable recording medium such as a DVD or CD-ROM recording the program. The program is distributed by storing the program in a storage device of a server computer and transferring the program from the server computer to other computers via a network.
[0135] The computer executing such a program, for example, first temporarily stores the program recorded in a portable recording medium or the program forwarded from a server computer in its own recording device. Then, when the processing is executed, the computer reads the program stored in its own recording medium and executes the processing according to the read program. In addition, as another execution method of the program, the computer can directly read the program from the portable recording medium and execute the processing according to the program, and then, whenever the program is forwarded from the server computer to the computer, the processing according to the received program is executed in sequence. In addition, it can also be configured that the program is not forwarded from the server computer to the computer, and the processing function is realized only by the execution instruction and the result acquisition, and the above-mentioned processing is executed by the so-called ASP (Application Service Provider) type service. In addition, in the program in this mode, information for the processing performed by the electronic computer is included, that is, information equivalent to the program (not a direct instruction to the computer, but data with the nature of the processing of the computer, etc.).
[0136] In this method, a hardware entity is formed by executing a predetermined program on a computer, but at least a part of the processing contents may be realized on hardware.
Claims
1. A secret computing device that performs computing while keeping input data including a numerical sequence encrypted with missing values secret, The secret computing device comprises: a flag sequence generating unit, generating a flag sequence, wherein the flag sequence is a sequence of flags, wherein the flag sequence is a value encrypted as 0 when the corresponding numerical value is a missing value, and a value encrypted as 1 when the corresponding numerical value is not a missing value; as well as The true data number calculation unit calculates the number of true data excluding missing values by summing up the values of the flags of the flag sequence.
2. The confidential computing device according to claim 1, comprising: A correction value sequence generating unit, which generates a correction value sequence by setting the product of the flags corresponding to the values as correction values; The average value calculation unit divides the sum of the correction values by the true number of data to calculate an average value of the input data.
3. The confidential computing device according to claim 1, comprising: a missing value covering unit for covering the missing value with a value greater than the maximum value of the numerical value in the true data; A numerical ascending sorting unit, which sorts the data consisting of the numerical sequence and the flag sequence in ascending order based on the numerical value; An index flag sequence generating unit generates an index flag sequence, wherein the index flag sequence is a sequence of index flags, wherein the value corresponding to the first row of the data is a value encrypted with 0, and the value corresponding to the remaining rows is a value encrypted with the value corresponding to the previous row plus 1; A median index calculation unit, which sets the true number of data to m, calculates a value obtained by rounding off (m-1) / 2 as a median index; an odd flag sequence generating unit, generating an odd flag sequence, wherein the odd flag sequence is a sequence of odd flags, wherein the sequence of odd flags is a value encrypted with a value 0 when the value of the index flag is not equal to the value of the median index, and is a value encrypted with a value 1 when the value of the index flag is equal to the value of the median index; an even flag sequence generating unit, generating an even flag sequence, wherein the even flag sequence is a sequence of even flags, wherein: when the value of the index flag is not equal to the value obtained by adding 1 to the median index, the value is an encrypted value of 0; when the value of the index flag is equal to the value obtained by adding 1 to the median index, the value is an encrypted value of 1; and when the value of the odd flag is 1, the value is 1; The median calculation unit calculates the sum of the products of the numerical value and the odd flag as the median when the true number of data is an odd number, and calculates the sum of the products of the numerical value and the even flag divided by 2 as the median when the true number of data is an even number.
4. The confidential computing device according to claim 1, comprising: a missing value covering unit for covering the missing value with a value greater than the maximum value of the numerical value in the true data; A numerical ascending sorting unit, which sorts the data consisting of the numerical sequence and the flag sequence in ascending order based on the numerical value; A boundary marker sequence generating unit generates a boundary marker sequence, wherein the boundary marker sequence is a sequence of boundary markers, wherein: when a value of a prescribed numerical value is equal to a value of a next numerical value, a value corresponding to the prescribed numerical value is a value encrypted with 0, and when a value of the prescribed numerical value is not equal to a value of a next numerical value, a value corresponding to the prescribed numerical value is a value encrypted with 1, and a value corresponding to a numerical value located in a bottom row of the numerical sequence is a value encrypted with 1; A numerical vector generating unit generating a numerical vector whose elements each have a value corresponding to the value 1 of the boundary flag; a frequency vector calculation unit that calculates a frequency vector that is a sum of the values of the flag in each group divided based on the value 1 of the boundary flag; The majority value output unit sorts the data consisting of the combination of the numerical vector and each element of the frequency vector in descending order using the frequency vector as a key, and outputs the element of the leading numerical vector as the majority value.
5. A secret computing method, which is a secret computing method executed by a secret computing device that performs computing in a state where input data including a numerical sequence encrypted with missing values is kept secret, The secret computing device comprises: a flag sequence generating unit, generating a flag sequence, wherein the flag sequence is a sequence of flags, wherein the flag sequence is a value encrypted as 0 when the corresponding numerical value is a missing value, and a value encrypted as 1 when the corresponding numerical value is not a missing value; as well as The true data number calculation unit calculates the number of true data excluding missing values by summing up the values of the flags of the flag sequence.
6. A program that causes a computer to function as the secure computing device according to any one of claims 1 to 4.
Citation Information
Patent Citations
Temperature detector
JP1984057126A