JPWO2019181594A1 - Parameter setting units, arithmetic units, their methods, programs, and recording media - Google Patents
Parameter setting units, arithmetic units, their methods, programs, and recording media Download PDFInfo
- Publication number
- JPWO2019181594A1 JPWO2019181594A1 JP2020508217A JP2020508217A JPWO2019181594A1 JP WO2019181594 A1 JPWO2019181594 A1 JP WO2019181594A1 JP 2020508217 A JP2020508217 A JP 2020508217A JP 2020508217 A JP2020508217 A JP 2020508217A JP WO2019181594 A1 JPWO2019181594 A1 JP WO2019181594A1
- Authority
- JP
- Japan
- Prior art keywords
- character string
- unit
- size
- processing
- cell
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/126—Character encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/085—Secret sharing or secret splitting, e.g. threshold schemes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/131—Fragmentation of text files, e.g. creating reusable text-blocks; Linking to fragments, e.g. using XInclude; Namespaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/42—Data-driven translation
- G06F40/44—Statistical methods, e.g. probability models
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09C—CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
- G09C1/00—Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/36—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols with means for detecting characters not meant for transmission
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/34—Encoding or coding, e.g. Huffman coding or error correction
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Probability & Statistics with Applications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
1個以上のレコードを含み、各レコードが任意長の1個以上のセルを含み、各セルが任意個の文字を含むテキストファイルに対する演算処理を効率的に行う。パラメータ設定装置は、属性情報を入力として1レコード分の文字列のサイズの最大値Scsvおよび最小値scsv、エンコード情報の合計サイズの最大値Senc、エンコード情報に特定の演算を行って得られる演算値の合計サイズの最大値Sss、および参照情報の合計サイズSrefを設定し、エンコードおよび演算の処理単位となるレコード数としてC/(Scsv+Senc+Sref)の関数値を得、演算処理における並列数としてf0/I・r・Scsvの関数値を得る。ただし、Cはキャッシュメモリサイズ、Mはメインメモリサイズ、f0はscsv・M/(scsv+Senc+max(Sref,Sss))の関数値である。Efficiently performs arithmetic processing on a text file containing one or more records, each record containing one or more cells of arbitrary length, and each cell containing an arbitrary number of characters. Parameter setting apparatus performs maximum value S csv and minimum value s csv size of one record of a string attribute information as an input, the maximum value S enc total size of the encoding information, the specific operation on the encoding information obtained set the total size S ref of the maximum value S ss, and reference information of the total size of the calculated value is to obtain a function value of C / (S csv + S enc + S ref) as a record number to be encoded and arithmetic processing units , The function value of f 0 / I · r · Scsv is obtained as the number of parallels in the arithmetic processing. However, C is a function value of the cache memory size, M is the main memory size, f 0 is s csv · M / (s csv + S enc + max (S ref, S ss)).
Description
本発明は、テキストファイルの文字列に対する演算技術に関する。 The present invention relates to an arithmetic technique for a character string in a text file.
1個以上のレコードを含み、各レコードが任意長の1個以上のセル(「フィールド」と呼ばれる場合もある)を含み、各セルが任意個の文字を含むテキストファイルの形式が知られている(例えば、非特許文献1等参照)。このようなテキストファイルの各セルに記述された値に対して特定の演算処理(例えば、非特許文献2,3等参照)を並列処理する場合、1つの単位処理で扱われるレコード数および並列数を特定する必要がある。この際、演算処理を効率的に行うためには、当該演算処理を行う演算装置のメインメモリサイズおよびキャッシュメモリサイズのみならず、入力されたテキストファイルの各レコードおよび各セルの位置および長さを考慮しなければならない。
The format of a text file is known that contains one or more records, each record contains one or more cells of arbitrary length (sometimes called a "field"), and each cell contains any number of characters. (See, for example, Non-Patent
しかしながら、このようなテキストファイルの各セルの長さは任意であり、また当該テキストファイルには各セルの位置および長さを表す情報は含まれていない場合も多い。そのため、各セルの位置や長さを特定するためには、入力されたテキストファイルの文字列を最初から順番に読み込まなければならない。よって、テキストファイルの各レコードおよび各セルの位置および長さを考慮し、1つの単位処理で扱われるレコード数および演算処理における並列数を特定し、効率的な演算処理を行うことは容易ではない。 However, the length of each cell of such a text file is arbitrary, and the text file often does not contain information indicating the position and length of each cell. Therefore, in order to specify the position and length of each cell, the input text file character strings must be read in order from the beginning. Therefore, it is not easy to specify the number of records handled in one unit processing and the number of parallels in the arithmetic processing in consideration of the position and length of each record and each cell in the text file, and perform efficient arithmetic processing. ..
本発明はこのような点に鑑みてなされたものであり、1個以上のレコードを含み、各レコードが任意長の1個以上のセルを含み、各セルが任意個の文字を含むテキストファイルに対する演算処理を効率的に行うことを目的とする。 The present invention has been made in view of these respects, and for a text file containing one or more records, each record containing one or more cells of arbitrary length, and each cell containing any number of characters. The purpose is to perform arithmetic processing efficiently.
上記の課題を解決するために、テキストファイルの文字列に対する演算処理のためのパラメータ設定装置が提供される。ただし、当該テキストファイルはW個のレコードを含み、レコードのそれぞれは任意長のG個のセルを含み、セルのそれぞれは任意個の文字を含む。WおよびGが1以上の整数であり、G個のセルは属性情報に対応している。Cがキャッシュメモリサイズ、Mがメインメモリサイズである。パラメータ設定装置は、最大サイズ設定部と最小サイズ設定部とエンコードサイズ設定部と演算サイズ設定部と参照サイズ設定部と処理単位算出部と並列数算出部とを有する。最大サイズ設定部は当該属性情報を入力としてテキストファイルの1レコード分の文字列のサイズの最大値Scsvを設定する。最小サイズ設定部は当該属性情報を入力として1レコード分の文字列のサイズの最小値scsvを設定する。エンコードサイズ設定部は1レコード分の文字列を所定の有限集合の元にエンコードして得られるエンコード情報の合計サイズの最大値Sencを設定する。演算サイズ設定部は1レコード分のエンコード情報に特定の演算を行って得られる演算値の合計サイズの最大値Sssを設定する。ただし、当該エンコードおよび当該演算はテキストファイルのrレコード分の文字列である処理単位文字列ごとに実行される処理である。参照サイズ設定部は1レコード分のセルそれぞれの位置および長さを表す参照情報の合計サイズSrefを設定する。処理単位算出部はレコード数rとしてC/(Scsv+Senc+Sref)の関数値を得る。並列数算出部は演算処理における並列数npとしてf0/I・r・Scsvの関数値を得る。ただし、Iが処理単位文字列ごとに実行されるエンコードおよび演算の繰り返し回数の最大値であり、Sref≧Sssのときmax(Sref,Sss)=Srefであり、Sref<Sssのときmax(Sref,Sss)=Sssであり、f0がscsv・M/(scsv+Senc+max(Sref,Sss))の関数値である。In order to solve the above problems, a parameter setting device for arithmetic processing on a character string of a text file is provided. However, the text file contains W records, each of the records contains G cells of arbitrary length, and each of the cells contains any number of characters. W and G are integers of 1 or more, and G cells correspond to the attribute information. C is the cache memory size and M is the main memory size. The parameter setting device has a maximum size setting unit, a minimum size setting unit, an encoding size setting unit, a calculation size setting unit, a reference size setting unit, a processing unit calculation unit, and a parallel number calculation unit. The maximum size setting unit sets the maximum value Scsv of the size of the character string for one record of the text file by inputting the attribute information. The minimum size setting unit sets the minimum value s csv of the size of the character string for one record by inputting the attribute information. The encoding size setting unit sets the maximum value Sensor of the total size of the encoding information obtained by encoding the character string for one record based on a predetermined finite set. The calculation size setting unit sets the maximum value S ss of the total size of the calculation values obtained by performing a specific calculation on the encoding information for one record. However, the encoding and the operation are processes executed for each processing unit character string which is a character string for r records of a text file. The reference size setting unit sets the total size Sref of the reference information representing the position and length of each cell for one record. The processing unit calculation unit obtains a function value of C / (S csv + Senc + Sref ) as the number of records r. The parallel number calculation unit obtains a function value of f 0 / Ir r Scsv as the parallel number n p in the arithmetic processing. However, the maximum value encoding and the number of repetitions of calculation I are performed for each processing unit character string, S ref ≧ S ss when max (S ref, S ss) = a S ref, S ref <S when ss max (S ref, S ss ) a = S ss, is a function value of f 0 is s csv · M / (s csv + S enc + max (S ref, S ss)).
以上により、1個以上のレコードを含み、各レコードが任意長の1個以上のセルを含み、各セルが任意個の文字を含むテキストファイルに対する演算処理を効率的に行うことができる。 As described above, it is possible to efficiently perform arithmetic processing on a text file containing one or more records, each record containing one or more cells having an arbitrary length, and each cell containing an arbitrary number of characters.
以下、本発明の実施形態を説明する。
[概要]
まず概要を説明する。
<テキストファイル>
各実施形態ではテキストファイルの文字列に対する演算処理を行う。このテキストファイルはW個のレコードを含み、レコードのそれぞれは任意長のG個のセルを含み、セルのそれぞれは任意個の文字を含む。ただし、各セルの長さには各セルの属性に応じた上限がある。WおよびGが1以上の整数である。例えば、WおよびGの少なくとも一方は2以上の整数である。Wが2以上の整数であってもよいし、Gが2以上の整数であってもよいし、WおよびGの両方が2以上の整数であってもよい。Wが2以上の整数である場合、互いに隣接するレコードの間にはレコードの区切りを特定するための情報が存在する。例えば、互いに隣接するレコードの間に改行が存在し、複数のレコードは改行によって互いに区切られている。また、Gが2以上の整数である場合、互いに隣接するセルの間にはセル間の区切りを特定するための情報が存在する。例えば、互いに隣接するセルの間に区切り文字または改行が存在し、複数のセルは区切り文字または改行によって互いに区切られている。区切り文字の例はカンマ「,」である。その他の例として、互いに隣接するセルの間にタブまたは改行が存在してもよいし、互いに隣接するセルの間に半角スペースまたは改行が存在してもよい。Wが2以上の整数である場合、各レコードに含まれるセルの個数Gは互いに同一である。各レコードのG個のセルは属性情報(「スキーマ」とも呼ぶ)に対応している。属性情報は各セルがどのような属性の情報であるかを表しており、少なくとも各セルで表される文字列のサイズ(データ量)の最大値と最小値とを特定または推定するための情報を含んでいる。例えば、属性情報はセルがどのような有限集合の元を表しているのか示す情報を含んでいる。例えば、属性情報は「セルがpを法とした剰余(mod p)を表していること(pは正整数)」を表していてもよいし、「セルが所定個(例えば10個)の所定の有限体(例えば拡大体GF(28))の要素で表現される文字列であること」を表していてもよいし、「セルが所定の整数型の整数(例えば、符号付き32ビット整数)を表す文字列であること」を表していてもよい。G個の属性情報のそれぞれが各レコードのG個のセルのそれぞれに一対一で対応していてもよいし(すなわち、1個の属性情報が1個のセルの属性を表していてもよい)、1個の属性情報が各レコードの複数個(例えばG個)のセルに対応していてもよい(すなわち、1個の属性情報が複数個のセルの属性を表していてもよい)。前者の場合、1つのレコードに属する複数のセルの属性が互いに異なっていてもよいし、互いに同一であってもよい。また、Wが2以上の整数である場合、すべてのレコードのG個のセルに対応する「G個の属性の組」は互いに同一である。すなわち、すべてのレコードが有するg番目(ただし、g=1,…,G)のセルの属性att(g)は互いに同一である。その他、属性情報がセルが表す情報の種別を表現していてもよい。また属性情報はテキストファイルに含まれていてもよいし(例えば、テキストファイルのヘッダが属性情報あってもよい)、含まれていなくてもよい。テキストファイルの例は、CSV(Comma-Separated Values)ファイル、TSV(tab-separated values)ファイル、SSV(space-separated values)などである。これらはCSV(character-separated values)ファイルやDSV(delimiter-separated values)ファイルとして総称される。Hereinafter, embodiments of the present invention will be described.
[Overview]
First, an outline will be described.
<Text file>
In each embodiment, arithmetic processing is performed on the character string of the text file. This text file contains W records, each of which contains G cells of arbitrary length, and each of the cells contains any number of characters. However, the length of each cell has an upper limit according to the attribute of each cell. W and G are integers greater than or equal to 1. For example, at least one of W and G is an integer greater than or equal to 2. W may be an integer of 2 or more, G may be an integer of 2 or more, and both W and G may be an integer of 2 or more. When W is an integer of 2 or more, there is information for specifying the record delimiter between the records adjacent to each other. For example, there is a line break between records adjacent to each other, and a plurality of records are separated from each other by a line break. Further, when G is an integer of 2 or more, there is information for specifying the delimiter between cells between cells adjacent to each other. For example, there is a delimiter or newline between cells adjacent to each other, and multiple cells are separated from each other by the delimiter or newline. An example of a delimiter is the comma ",". As another example, there may be tabs or line breaks between cells adjacent to each other, and half-width spaces or line breaks may exist between cells adjacent to each other. When W is an integer of 2 or more, the number G of cells included in each record is the same as each other. The G cells of each record correspond to the attribute information (also called "schema"). The attribute information represents what kind of attribute information each cell has, and is information for specifying or estimating at least the maximum value and the minimum value of the size (data amount) of the character string represented by each cell. Includes. For example, attribute information contains information indicating what kind of finite set of elements a cell represents. For example, the attribute information may represent "a cell represents a remainder (mod p) modulo p (p is a positive integer)" or "a predetermined number of cells (for example, 10)". it may represent "things is an element string represented by the finite field (for example, extension field GF (2 8)), the integer" cell is a predetermined integer (e.g., signed 32-bit integer ) Is a character string. ” Each of the G attribute information may have a one-to-one correspondence with each of the G cells of each record (that is, one attribute information may represent the attribute of one cell). One attribute information may correspond to a plurality of cells (for example, G cells) of each record (that is, one attribute information may represent an attribute of a plurality of cells). In the former case, the attributes of a plurality of cells belonging to one record may be different from each other or may be the same as each other. When W is an integer of 2 or more, the "set of G attributes" corresponding to G cells of all records are the same as each other. That is, the attribute att (g) of the gth cell (where g = 1, ..., G) possessed by all the records is the same as each other. In addition, the attribute information may represent the type of information represented by the cell. Further, the attribute information may or may not be included in the text file (for example, the header of the text file may include the attribute information). Examples of text files are CSV (Comma-Separated Values) files, TSV (tab-separated values) files, SSVs (space-separated values), and the like. These are collectively referred to as CSV (character-separated values) files and DSV (delimiter-separated values) files.
<パラメータ設定装置>
パラメータ設定装置は、テキストファイルの文字列に対する「演算処理」のためのパラメータを設定して出力する。この「演算処理」はどのようなものであってもよい。「演算処理」の例は秘密分散処理、秘密計算処理(例えば、非特許文献1,2等参照)、暗号化処理、署名生成処理などである。パラメータ設定装置が設定するパラメータは、1つの単位処理で扱われるレコード数および演算処理における並列数である。好ましくは、パラメータ設定装置は、さらにテキストファイルからまとめて読み込まれるデータのファイルバッファサイズも設定する。以下では、テキストファイルの文字列に対する演算処理を行う演算装置のキャッシュメモリのキャッシュメモリサイズ(キャッシュメモリの記憶容量)をCと表記し、メインメモリのメインメモリサイズ(メインメモリの記憶容量)をMと表記する。<Parameter setting device>
The parameter setting device sets and outputs parameters for "arithmetic processing" for the character string of the text file. This "arithmetic processing" may be anything. Examples of "arithmetic processing" include secret sharing processing, secret calculation processing (see, for example,
パラメータ設定装置は、最大サイズ設定部と最小サイズ設定部とエンコードサイズ設定部と演算サイズ設定部と参照サイズ設定部と処理単位算出部と並列数算出部とを有する。ファイルバッファサイズも設定される場合、パラメータ設定装置はさらにバッファサイズ算出部も有する。 The parameter setting device has a maximum size setting unit, a minimum size setting unit, an encoding size setting unit, a calculation size setting unit, a reference size setting unit, a processing unit calculation unit, and a parallel number calculation unit. When the file buffer size is also set, the parameter setting device also has a buffer size calculation unit.
最大サイズ設定部は属性情報を入力としてテキストファイルの1レコード分の文字列のサイズの最大値Scsvを設定して出力する。最大値Scsvはテキストファイルの各レコードの文字列のサイズを大きめに見積もったレコードサイズである。すなわち、属性情報が表す各セルのサイズの最大値(またはその推定値)を1レコード分合計したものが最大値Scsvである。前述のように、属性情報は各セルで表される文字列のサイズの最大値を特定または推定するための情報を含み、最大サイズ設定部はこの情報を用いて最大値Scsvを設定する。例えば、属性情報が「セルが符号付き32ビット整数を表す文字列であること」を表す場合、当該セルのサイズの最大値は11バイト(符号のための1バイト+11桁の整数のための10バイト)である。The maximum size setting unit sets and outputs the maximum value Scsv of the size of the character string for one record of the text file by inputting the attribute information. The maximum value S csv is a record size in which the size of the character string of each record of the text file is overestimated. That is, the maximum value Scsv is the sum of the maximum value (or its estimated value) of the size of each cell represented by the attribute information for one record. As described above, the attribute information includes information for specifying or estimating the maximum value of the size of the character string represented by each cell, and the maximum size setting unit sets the maximum value S csv using this information. For example, if the attribute information indicates that the cell is a string representing a signed 32-bit integer, the maximum size of the cell is 11 bytes (1 byte for sign + 10 for 11 digit integer). Byte).
最小サイズ設定部は属性情報を入力として1レコード分の文字列のサイズの最小値scsvを設定して出力する。最小値scsvはテキストファイルの各レコードの文字列のサイズを小さめに見積もったレコードサイズである。すなわち、属性情報が表す各セルのサイズの最小値(またはその推定値)を1レコード分合計したものが最小値scsvである。前述のように、属性情報は各セルで表される文字列のサイズの最小値を特定または推定するための情報を含み、最小サイズ設定部はこの情報を用いて最小値scsvを設定する。例えば、属性情報が「セルが符号付き32ビット整数を表す文字列であること」を表す場合、当該セルのサイズの最小値は1バイトである。The minimum size setting unit sets and outputs the minimum value s csv of the size of the character string for one record by inputting the attribute information. The minimum value s csv is the record size in which the size of the character string of each record in the text file is underestimated. That is, the minimum value s csv is the sum of the minimum value (or its estimated value) of the size of each cell represented by the attribute information for one record. As described above, the attribute information includes information for specifying or estimating the minimum value of the size of the character string represented by each cell, and the minimum size setting unit sets the minimum value s csv using this information. For example, when the attribute information indicates "the cell is a character string representing a signed 32-bit integer", the minimum value of the size of the cell is 1 byte.
エンコードサイズ設定部は1レコード分の文字列を所定の有限集合の元にエンコード(変換)して得られるエンコード情報の合計サイズの最大値Sencを設定して出力する。最大値Sencは1レコード分のエンコード情報の合計サイズを大きめに見積もったレコードサイズである。エンコード情報が属する「所定の有限集合」の例は、pを法とした剰余(mod p)で表される有限集合、所定ビットで表現される値の有限集合、所定のビット数の所定の整数型の整数で表現される有限集合などである。この「所定の有限集合」は次に述べる「演算」の内容に応じて予め定められている。最大値Sencは、例えば、エンコード情報が属する所定の有限集合および属性情報から特定される。例えば、属性情報が「セルが261を法とした剰余(mod 261)を表していること」を表しており、このセルの文字列が261を法とした剰余(mod 261)で表現されるエンコード情報にエンコードされる場合、当該セルに対応するエンコード情報の最大サイズは8バイトになる。エンコード情報が属する所定の有限集合は、例えば、予め定められている。The encoding size setting unit sets and outputs the maximum value Sensor of the total size of the encoding information obtained by encoding (converting) the character string for one record based on a predetermined finite set. The maximum value Sec is a record size in which the total size of the encoding information for one record is overestimated. Examples of a "predetermined finite set" to which the encoding information belongs are a finite set represented by a remainder (mod p) modulo p, a finite set of values represented by a predetermined bit, and a predetermined integer with a predetermined number of bits. A finite set represented by an integer of type. This "predetermined finite set" is predetermined according to the content of the "operation" described below. The maximum value Sec is specified from, for example, a predetermined finite set to which the encoding information belongs and attribute information. For example, the attribute information represents a "that represents a remainder cells modulo 2 61 (mod 2 61)", in the remainder of the string of this cell modulo 2 61 (mod 2 61) When encoded in the expressed encoding information, the maximum size of the encoding information corresponding to the cell is 8 bytes. The predetermined finite set to which the encoding information belongs is, for example, predetermined.
演算サイズ設定部は1レコード分のエンコード情報に特定の「演算」を行って得られる演算値の合計サイズの最大値Sssを設定して出力する。最大値Sssは1レコード分の演算値の合計サイズを大きめに見積もったレコードサイズである。この「演算」の例は秘密分散、秘密計算、暗号化、署名生成などである。「演算」は各セルを披演算子として行われるものであってもよいし、複数のセルを披演算子として行われるものであってもよい。最大値Sssは、例えば、エンコード情報が属する所定の有限集合、「演算」の内容、および属性情報から特定される。例えば、属性情報が「セルが261を法とした剰余(mod 261)を表していること」を表しており、このセルの文字列が261を法とした剰余(mod 261)で表現されるエンコード情報にエンコードされており、「演算」が各セルの値をShamir秘密分散方式(例えば、非特許文献3)でN(ただし、Nは正整数)個のパーティに秘密分散するものである場合、当該セルに対応する演算値の最大サイズは8Nバイトになる。The calculation size setting unit sets and outputs the maximum value S ss of the total size of the calculation values obtained by performing a specific "calculation" on the encoding information for one record. The maximum value S ss is a record size in which the total size of the calculated values for one record is overestimated. Examples of this "calculation" are secret sharing, secret calculation, encryption, signature generation, and the like. The "operation" may be performed with each cell as a show operator, or may be performed with a plurality of cells as a show operator. The maximum value S ss is specified from, for example, a predetermined finite set to which the encoding information belongs, the content of the "operation", and the attribute information. For example, the attribute information represents a "that represents a remainder cells modulo 2 61 (mod 2 61)", in the remainder of the string of this cell modulo 2 61 (mod 2 61) It is encoded in the encoded information to be expressed, and the "operation" secretly shares the value of each cell to N (however, N is a positive integer) party by the Shamir secret sharing method (for example, Non-Patent Document 3). If, the maximum size of the calculated value corresponding to the cell is 8 Nbytes.
参照サイズ設定部はテキストファイル内の1レコード分のセルそれぞれの位置および長さを表す参照情報の合計サイズSrefを設定して出力する。「セルの位置」は、例えばセルの先頭文字の位置であってもよいし、セルの最終文字の位置であってもよいし、その他のセル内の文字の位置であってもよい。「セルの位置を表す情報」は、例えば、テキストファイルの文字列の先頭の文字から「セルの位置」の文字までの文字数であってもよいし、この文字数の関数値であってもよい。「セルの長さを表す情報」は、例えば、セルの文字数であってもよいし、この文字数の関数値であってもよい。参照情報は例えば属性情報から特定される。属性情報によって1レコードに属するセルの個数を特定できるからである。各セルの位置および長さを表すために必要なデータサイズはそれを表現する形式によって定まる。例えば、各セルの位置および長さを符号なし64ビット整数で表す場合、各セルの参照情報は16バイトになる。The reference size setting unit sets and outputs the total size Sref of the reference information indicating the position and length of each cell for one record in the text file. The "cell position" may be, for example, the position of the first character of the cell, the position of the last character of the cell, or the position of a character in another cell. The "information representing the cell position" may be, for example, the number of characters from the first character of the character string of the text file to the character of the "cell position", or may be a function value of this number of characters. The "information representing the cell length" may be, for example, the number of characters in the cell or a function value of this number of characters. Reference information is specified from, for example, attribute information. This is because the number of cells belonging to one record can be specified by the attribute information. The data size required to represent the position and length of each cell is determined by the format in which it is represented. For example, when the position and length of each cell are represented by an unsigned 64-bit integer, the reference information of each cell is 16 bytes.
上述した「エンコード」および「演算」はテキストファイルのrレコード分の文字列である処理単位文字列ごとに実行される。処理単位文字列ごとに実行される処理を「単位処理」と呼ぶことにする。処理単位算出部は1回の単位処理で処理されるレコード数rを表す「C/(Scsv+Senc+Sref)の関数値」を得て(レコード数rとしてC/(Scsv+Senc+Sref)の関数値を得て)出力する。キャッシュメモリサイズCは、予め定められたものであってもよいし、入力されたものであってもよい。最大値Scsvは最大サイズ設定部で得られたものであり、最大値Sencはエンコードサイズ設定部で得られたものであり、合計サイズSrefは参照サイズ設定部で得られたものである。「αの関数値」はαそのものであってもよいし、αに対応するその他の値であってもよい。「αの関数値」の例は、α以上の最小の整数、α以下の最大の整数、αに最も近い整数などである。例えば、r=C/(Scsv+Senc+Sref)であってもよいし、r=ROUNDUP(C/(Scsv+Senc+Sref))であってもよいし、r=ROUNDDOWN(C/(Scsv+Senc+Sref))であってもよいし、r=ROUND(C/(Scsv+Senc+Sref))であってもよい。ただし、ROUNDUP(α)はαを整数値に切り上げる切り上げ関数であり、ROUNDDOWN(α)はαを整数値に切り捨てる切り捨て関数であり、ROUND(α)はαをαに最も近い関数に丸める丸め整数である。ここで、Scsv+Senc+Srefは、処理部が、テキストファイルから1レコード分の文字列を読み込み、参照情報を参照しながら、エンコード情報にエンコードして秘密分散などの「演算」を行うまでの処理(以下、「1レコード分の一連の処理」という)のために必要なメモリサイズを表す。このメモリサイズがキャッシュメモリサイズ以下であれば、途中でメインメモリからデータを読み込むことなく高速に1レコード分の一連の処理を実行できる。C/(Scsv+Senc+Sref)は、何回分の「1レコード分の一連の処理」に必要なメモリサイズ(Scsv+Senc+Sref)をキャッシュメモリに確保できるかを表すものである。C/(Scsv+Senc+Sref)に対応するレコード数rの文字列を処理単位文字列とすることで、rレコード分の処理を行う際のメインメモリへのアクセス回数を削減し、高速に演算を行うことができる。The above-mentioned "encoding" and "operation" are executed for each processing unit character string which is a character string for r records of a text file. Processing The processing executed for each unit character string is called "unit processing". The processing unit calculating section represents the record number r to be processed in unit process once to obtain the "C / function value of (S csv + S enc + S ref) " (C / (S csv + S as a record number r enc + S Obtain the function value of ref) and output it. The cache memory size C may be a predetermined one or may be an input one. The maximum value S csv is obtained by the maximum size setting unit, the maximum value Senc is obtained by the encoding size setting unit, and the total size S ref is obtained by the reference size setting unit. .. The "function value of α" may be α itself or another value corresponding to α. Examples of "function values of α" are the smallest integer greater than or equal to α, the largest integer less than or equal to α, and the integer closest to α. For example, r = C / (S csv + S enc + S ref ), r = ROUNDUP (C / (S csv + S enc + S ref )), or r = ROUNDDOWN It may be (C / (S csv + S enc + S ref )) or r = ROUND (C / (S csv + S enc + S ref )). However, ROUNDUP (α) is a round-up function that rounds up α to an integer value, ROUNDDOWN (α) is a round-down function that rounds down α to an integer value, and ROUND (α) is a rounded integer that rounds α to the function closest to α. Is. Here, in S csv + Senc + Sref , until the processing unit reads the character string for one record from the text file, encodes it into the encoded information while referring to the reference information, and performs "calculation" such as secret sharing. Represents the memory size required for the processing (hereinafter referred to as "a series of processing for one record"). If this memory size is less than or equal to the cache memory size, a series of processes for one record can be executed at high speed without reading data from the main memory on the way. C / ( Scsv + Senc + Sref ) indicates how many times the memory size (Scsv + Senc + Sref ) required for "a series of processing for one record" can be secured in the cache memory. By using the character string of the number of records r corresponding to C / (S csv + Senc + Sref ) as the processing unit character string, the number of accesses to the main memory when processing r records is reduced and the speed is increased. Can perform operations.
並列数算出部は演算処理における並列数npを表す「f0/I・r・Scsvの関数値」を得て(並列数npとしてf0/I・r・Scsvの関数値を得て)出力する。例えば、np=f0/I・r・Scsvであってもよいし、np=ROUNDUP(f0/I・r・Scsv)であってもよいし、np=ROUNDDOWN(f0/I・r・Scsv)であってもよいし、np=ROUND(f0/I・r・Scsv)であってもよい。f0はscsv・M/(scsv+Senc+max(Sref,Sss))の関数値である。例えば、f0=scsv・M/(scsv+Senc+max(Sref,Sss))であってもよいし、f0=ROUNDUP(scsv・M/(scsv+Senc+max(Sref,Sss)))であってもよいし、f0=ROUNDDOWN(scsv・M/(scsv+Senc+max(Sref,Sss)))であってもよいし、f0=ROUND(scsv・M/(scsv+Senc+max(Sref,Sss)))であってもよい。ただし、Sref≧Sssのときmax(Sref,Sss)=Srefであり、Sref<Sssのときmax(Sref,Sss)=Sssである。Iは処理単位文字列ごとに実行される「エンコード」および「演算」の繰り返し回数の最大値である。例えば、Iは処理単位文字列ごとに実行される「エンコード」および「演算」の繰り返し回数である。メインメモリサイズMは、予め定められたものであってもよいし、入力されたものであってもよい。最小値scsvは最小サイズ設定部で設定されたものであり、最大値Sencはエンコードサイズ設定部で設定されたものであり、最大値Sssは演算サイズ設定部で設定されたものであり、合計サイズSrefは参照サイズ設定部で設定されたものであり、繰り返し回数の最大値Iは予め定められたものである。好ましくは、繰り返し回数の最大値Iは、rレコード分の文字列である処理単位文字列の「エンコード」および「演算」を行うための合計処理量に対する、前処理の合計処理量(演算数の合計)の比率が所定値以下となるように定められている。rは処理単位算出部で得られたものであってもよいし、C,Scsv,Senc,Srefから得られたものであってもよい。すなわち、f0/I・r・Scsvの関数値が得られるのであれば、必ずしもf0/I・r・Scsvの関数値の生成に処理単位算出部で得られたrが用いられなくてもよい。ここで、X=(scsv+Senc+max(Sref,Sss))/scsvは、1レコード分の一連の処理に必要なメモリサイズが、テキストファイルから読み込まれた1レコード分の文字列のメモリサイズの最大何倍であるかを表している。そのため、Scsv・Xは1レコード分の一連の処理に必要なメモリサイズの最大値を表し、I・r・Scsv・Xはrレコード分の一連の処理をI回繰り返すために必要なメモリサイズの最大値を表す。f0はscsv・M/(scsv+Senc+max(Sref,Sss))=M/Xの関数値であるため、f0/I・r・Scsvは、メインメモリサイズMが「rレコード分の一連の処理(「1レコード分の一連の処理」をrレコード分行う処理)」をI回繰り返す処理に必要なメモリサイズの何倍であるか、を表す。そのため、f0/I・r・Scsvに対応する値を並列数npとすることでメインメモリのバッファオーバーフローを抑制できる。なお、エンコードの際には参照情報が必要となるため、Srefの領域をメインメモリに確保しておく必要がある。一方、エンコード後の秘密分散などの「演算」の際には参照情報は必要ないが、得られた演算値を格納するSssの領域をメインメモリに確保する必要がある。すなわち、SrefおよびSssの両方の領域が同時に必要となることはない。max(Sref,Sss)の領域をメインメモリに確保できれば十分である。The parallel number calculation unit obtains the "function value of f 0 / I · r · S csv " representing the parallel number n p in the arithmetic processing (the function value of f 0 / I · r · S csv as the parallel number n p ). Get) output. For example, it may be a n p = f 0 / I · r · S csv, may be a n p = ROUNDUP (f 0 / I · r · S csv), n p = ROUNDDOWN (f 0 / I · r · Scsv ) or n p = ROUND (f 0 / I · r · Scsv ). f 0 is a function value of s csv · M / (s csv + Senc + max ( Sref , Sss)). For example, f 0 = s csv · M / (s csv + S enc + max (S ref , S ss )) or f 0 = ROUNDUP (s csv · M / (s csv + S enc +) max (S ref , S ss ))) or f 0 = ROUNDDOWN (s csv · M / (s csv + S enc + max (S ref , S ss )))) , F 0 = ROUND (s csv · M / (s csv + S enc + max (S ref , S ss ))). However, when the S ref ≧ S ss max (S ref, S ss) a = S ref, S ref <When S ss max (S ref, S ss) = a S ss. I is the maximum number of repetitions of "encoding" and "operation" executed for each processing unit character string. For example, I is the number of repetitions of "encoding" and "operation" executed for each processing unit character string. The main memory size M may be a predetermined one or may be an input one. The minimum value s csv is set by the minimum size setting unit, the maximum value Sec is set by the encoding size setting unit, and the maximum value S ss is set by the calculation size setting unit. , The total size Sref is set by the reference size setting unit, and the maximum value I of the number of repetitions is predetermined. Preferably, the maximum value I of the number of repetitions is the total processing amount of preprocessing (of the number of operations) with respect to the total processing amount for performing "encoding" and "calculation" of the processing unit character string which is a character string for r records. The ratio of total) is set to be less than or equal to the predetermined value. r may be obtained from the processing unit calculation unit, or may be obtained from C, Scsv , Senc , and Sref. That is, if the function value of f 0 / I · r · S csv is obtained, not necessarily f 0 / I · r · S r obtained by the processing unit calculating unit to generate the csv function value is used You may. Here, X = (s csv + Senc + max ( Sref , S ss )) / s csv is a character string for one record read from a text file, in which the memory size required for a series of processing for one record is Indicates the maximum number of times the memory size of. Therefore, S csv / X represents the maximum value of the memory size required for a series of processing for one record, and I / r / S csv / X is the memory required for repeating the series of processing for r records I times. Represents the maximum size. f 0 is s csv · M / (s csv + S enc + max (S ref, S ss)) for = is a function value of M / X, f 0 / I · r · S csv , the main memory size M is " It indicates how many times the memory size required for the process of repeating a series of processes for r records (a process of performing a series of processes for one record for r records) I times. Therefore, the buffer overflow of the main memory can be suppressed by setting the value corresponding to f 0 / I · r · Scsv to the number of parallel np. Since reference information is required for encoding, it is necessary to secure the Sref area in the main memory. On the other hand, reference information is not required for "operation" such as secret sharing after encoding, but it is necessary to secure an S ss area for storing the obtained operation value in the main memory. That is, both S ref and S ss regions are not required at the same time. It is sufficient if the max (S ref , S ss ) area can be secured in the main memory.
バッファサイズ算出部は、演算処理の際にテキストファイルの文字列からまとめて読み込まれるデータのファイルバッファサイズfを表す「f0/npの関数値」を得て(ファイルバッファサイズfとしてf0/npの関数値を得て)出力する。例えば、f=f0/npであってもよいし、f=ROUNDUP(f0/np)であってもよいし、f=ROUNDDOWN(f0/np)であってもよいし、f=ROUND(f0/np)であってもよい。f0は上述の通りであり、npは並列数算出部で得られたものであってもよいし、f0,I,r,Scsvから得られたものであってもよい。すなわち、f0/npの関数値が得られるのであれば、必ずしもf0/npの関数値の生成に並列数算出部で得られたnpが用いられなくてもよい。ここで、np=f0/I・r・Scsvとするとf0/np=I・r・Scsvとなる。これは、rレコード分の処理をI回繰り返すためにテキストファイルから読み込まれる文字列のファイルバッファサイズfに対応する。ファイルバッファサイズfが大きいほうがシーケンシャルアクセルに近くなり高速だが、必要なメインメモリの記憶容量が大きくなる。上述のように得られたファイルバッファサイズfは、予め定められたメインメモリサイズMの制約の中で高速な処理を実現するものである。 The buffer size calculation unit obtains a "function value of f 0 / n p " representing the file buffer size f of the data collectively read from the character string of the text file during arithmetic processing (f 0 as the file buffer size f). (Obtain the function value of / np) and output. For example, f = f 0 / n p , f = ROUNDUP (f 0 / n p ), f = ROUNDDOWN (f 0 / n p ), or It may be f = ROUND (f 0 / n p). f 0 is as described above, and n p may be obtained by the parallel number calculation unit or may be obtained from f 0 , I, r, Scsv. That is, if the function value of f 0 / n p can be obtained, the n p obtained by the parallel number calculation unit does not necessarily have to be used for the generation of the function value of f 0 / n p. Here, if n p = f 0 / I · r · S csv , then f 0 / n p = I · r · S csv . This corresponds to the file buffer size f of the character string read from the text file in order to repeat the processing for r records I times. The larger the file buffer size f, the closer to the sequential accelerator and the faster the speed, but the larger the storage capacity of the main memory required. The file buffer size f obtained as described above realizes high-speed processing within the constraints of the predetermined main memory size M.
<演算装置(一般版)>
演算装置は入力されたテキストファイルの文字列に対する演算処理を行う。演算装置はこの演算処理でパラメータ設定装置で得られたレコード数rおよび並列数npを用いる。パラメータ設定装置でさらにファイルバッファサイズfが得られる場合には、演算装置はこの演算処理でさらにパラメータ設定装置で得られたファイルバッファサイズfを用いる。パラメータ設定装置でファイルバッファサイズfが得られない場合、演算装置はファイルバッファサイズfとして予め定められた値を用いてもよいし、属性情報に対応するその他のファイルバッファサイズfが用いられてもよい。<Arithmetic logic unit (general version)>
The arithmetic unit performs arithmetic processing on the input text file character string. The arithmetic unit uses the number of records r and the number of parallels np obtained by the parameter setting apparatus in this arithmetic processing. When the parameter setting device further obtains the file buffer size f, the arithmetic unit uses the file buffer size f further obtained by the parameter setting device in this arithmetic processing. If the file buffer size f cannot be obtained by the parameter setting device, the arithmetic unit may use a predetermined value as the file buffer size f, or may use another file buffer size f corresponding to the attribute information. Good.
テキストファイルが秘密分散などの「演算」の対象ではない文字を含む場合がある。例えば、CSVファイルにおけるカンマはセルの区切りを表す文字であって「演算」の対象ではない。CSVファイルではセルの文字列がダブルクォーテーション「“」「”」で囲まれる場合があるが、ダブルクォーテーションも「演算」の対象ではない。改行を表す文字(例えば、¥n)なども「演算」の対象ではない(これらのダブルクォーテーション「“」「”」はセルに含まれない)。このような「演算」の対象ではない文字を「特殊文字」と呼ぶことにする。セル内において特殊文字の前にエスケープ文字を付加し、特殊文字を「演算」の対象の文字と扱うことを許す形式もある。このような場合、セル内の各文字単独でその文字が「演算」の対象を表すか否かを判別できず、セル間の区切りを判別できないことがある。例えば、「演算」の対象としてダブルクォーテーション「“」を用いる場合に、エスケープ文字として「“」をさらに付加する形式がある。例えば、セルの「123“456」という値を「演算」の対象とする場合に、当該セルを“123““456”と表記する場合がある。このような場合、セル“123““456”を先頭から順番に読んでいかなければセル間の区切りを判別できない。例えば、後半の“456”のみが読み込まれた場合、これが「456」を表す1つのセルであるのか、「“456」を含む値を表すセルの一部であるのかを判別できない。その他、「演算」の対象として改行を表す文字「¥n」を用いる場合に、エスケープ文字として「¥」をさらに付加する形式もある。例えば、セルの「123¥n456」という値を「演算」の対象とする場合に、当該セルを“123¥¥n456”と表記する場合がある。このような場合、セル“123¥¥n456”を先頭から順番に読んでいかなければセル間の区切りを判別できない。このような場合、テキストファイルの各セルの位置および長さを特定する処理を並列に行うことはできず、この処理をテキストファイルの先頭から順番に行っていかなければならない。 Text files may contain characters that are not subject to "calculations" such as secret sharing. For example, a comma in a CSV file is a character that represents a cell delimiter and is not the target of "calculation". In a CSV file, a cell character string may be enclosed in double quotation marks "" "" "", but double quotation marks are also not subject to "calculation". Characters that represent line breaks (for example, \ n) are also not subject to "calculation" (these double quotation marks "" "" "are not included in the cell). Characters that are not the target of such "calculations" are called "special characters". There is also a format in which an escape character is added before a special character in a cell to allow the special character to be treated as the character to be "operated". In such a case, it may not be possible to determine whether or not each character in the cell represents the target of "calculation", and it may not be possible to determine the delimiter between cells. For example, when the double quotation mark "" "is used as the target of the" operation ", there is a format in which" "" is further added as an escape character. For example, when the value "123" 456 "of a cell is the target of" calculation ", the cell may be described as" 123 "" 456 ". In such a case, the cell "123" and "456" must be read in order from the beginning to determine the division between cells. For example, when only the latter half "456" is read, it cannot be determined whether this is one cell representing "456" or a part of the cell representing a value including "456". In addition, when the character "\ n" representing a line feed is used as the target of "calculation", there is also a format in which "\" is further added as an escape character. For example, when the value "123 \ n456" of a cell is the target of "calculation", the cell may be described as "123 \ \ n456". In such a case, the cell "123 \\ n456" must be read in order from the beginning to determine the division between cells. In such a case, the process of specifying the position and length of each cell of the text file cannot be performed in parallel, and this process must be performed in order from the beginning of the text file.
このような形式のテキストファイルに対応可能な演算装置はメインメモリとキャッシュメモリと複数の処理部とを有する。各処理部は、読み込み部とファイル読み込みロック解除部とパース部とバッファ境界ロック解除部とエンコード部と演算部と並列性ロック解除部とを有する。これら複数の処理部は何れかのスレッドの処理に割り当てられる。スレッドiの処理を行う処理部は以下の処理を行う。なお、iは各スレッドを表し、i∈{0,…,T−1}であり、Tがテキストファイルの文字列のサイズTSに対応するスレッド数を表す正整数であり、1≦np≦Tである。例えば、各スレッドiでテキストファイルから読み込まれる文字列のサイズTSiについてTS=TS0+…+TST−1もしくはTS≦TS0+…+TST−1を満たす、または、f・T≧TSを満たす。また、初期状態でスレッド0のファイル読み込みロックおよびバッファ境界ロックならびにスレッド0,…,np−1の並列性ロックが解除されているものとする。An arithmetic unit capable of handling a text file of such a format has a main memory, a cache memory, and a plurality of processing units. Each processing unit has a reading unit, a file reading unlocking unit, a parsing unit, a buffer boundary unlocking unit, an encoding unit, an arithmetic unit, and a parallelism unlocking unit. These plurality of processing units are assigned to the processing of any thread. The processing unit that processes thread i performs the following processing. Note that i represents each thread, i ∈ {0, ..., T-1}, T is a positive integer representing the number of threads corresponding to the size TS of the character string of the text file, and 1 ≦ n p ≦. It is T. For example, for the size TS i of the character string read from the text file in each thread i, TS = TS 0 + ... + TS T-1 or TS ≤ TS 0 + ... + TS T-1 is satisfied, or f · T ≥ TS. Fulfill. Further, it is assumed that the file read lock and buffer boundary lock of thread 0 and the concurrency lock of threads 0, ..., N p -1 are released in the initial state.
読み込み部は、スレッドiのファイル読み込みロックおよび並列性ロックが解除された後、テキストファイルの文字列からファイルバッファサイズfの領域に格納可能な文字列Siを読み込んでメインメモリに格納する。i=0の場合、文字列S0はテキストファイルの先頭の文字を先端とする「ファイルバッファサイズfの領域に格納可能なデータ量の文字列」である。i≧1の場合、文字列Siはスレッドi−1で読み込まれた文字列Si‐1の終端の文字の直後の文字を先端とする「ファイルバッファサイズfの領域に格納可能なデータ量の文字列」である。「ファイルバッファサイズfの領域に格納可能な文字列」は、例えば、ファイルバッファサイズfの領域に格納可能な最長の文字列であってもよいし、ファイルバッファサイズfから定数を減じたサイズの領域に格納可能な最長の文字列であってもよい。Reading unit, after the file read lock and parallelism locking thread i is released, stored in the main memory by reading the string S i can be stored from a string in a region of the file buffer size f of the text file. When i = 0, the character string S 0 is a "character string of the amount of data that can be stored in the area of the file buffer size f" starting from the first character of the text file. When i ≧ 1, the character string S i is the “amount of data that can be stored in the area of the file buffer size f” starting from the character immediately after the last character of the character string S i-1 read by the thread i-1. Character string ". The "character string that can be stored in the area of the file buffer size f" may be, for example, the longest character string that can be stored in the area of the file buffer size f, or the size obtained by subtracting a constant from the file buffer size f. It may be the longest character string that can be stored in the area.
文字列Siがメインメモリに格納された後、ファイル読み込みロック解除部がスレッドi+1のファイル読み込みロックを解除する。これにより、複数のスレッドでのメインメモリへのアクセスが互いに競合することを防止できる。ただし、i+1>Tに対応するスレッドは存在せず、存在しないスレッドのファイル読み込みロックは解除されない。After the character string S i is stored in the main memory, the file read unlock unit releases the file read lock of thread i + 1. As a result, it is possible to prevent the access to the main memory by a plurality of threads from competing with each other. However, the thread corresponding to i + 1> T does not exist, and the file read lock of the thread that does not exist is not released.
スレッドiのバッファ境界ロックが解除された後、パース部が文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリに格納する。例えば、パース部は文字列Siの各セルを特定し、特定した各セルの参照情報を計算してメインメモリに格納する。例えば、パース部はセルの境界に位置する情報(例えば、区切り文字または改行)に基づいて各セルを特定し、特定した各セルの参照情報を計算してメインメモリに格納する。i=0の場合、文字列S0に含まれる終端の文字がセルの終端である場合とセルの終端でない場合がある。文字列S0に含まれる終端の文字がセルの終端でない場合、スレッド0では終端の文字を含むセルを特定できず、その参照情報も計算できない。i≧1の場合、文字列Siの始端の文字がセルの始端である場合とセルの始端でない場合があり、文字列Siに含まれる終端の文字がセルの終端である場合とセルの終端でない場合がある。文字列Siの始端の文字がセルの始端でない場合、文字列Siのみから文字列Siの始端の文字を含むセルを特定できない。この場合、パース部は、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字と、文字列Siとを用い、文字列Siの始端の文字を含むセルを特定する。文字列Siに含まれる終端の文字がセルの終端でない場合、スレッドiでは終端の文字を含むセルを特定できず、その参照情報も計算できない。なお、テキストデータの終端の文字列ST−1に含まれる終端の文字はセルの終端である。特定されたセルに対応する参照情報を用いることにより、当該セルが属するレコードと当該セルに対応する属性(例えば、当該レコードの最初から何番目の属性であるかを表す情報)とを特定できる。パース部は、メインメモリに参照情報を格納する領域が足りなくなったときに、rレコード分の参照情報を格納するためのバッファ領域をメインメモリにまとめて確保する。バッファ領域の確保には所定の処理(オーバーヘッド)が必要である。1レコードごとにバッファ領域を確保するのではなく、単位処理に対応するrレコードごとにバッファ領域をまとめて確保することで、オーバーヘッドを抑制しつつ、可変長のレコードを処理できる。After the buffer boundary locking thread i is released, stored in the main memory by calculating a reference information representative of the location and length of each cell parser is included in the string S i. For example, parser identifies each cell string S i, stored in the main memory to calculate the reference information of each cell identified. For example, the parsing unit identifies each cell based on the information located at the cell boundary (for example, a delimiter or a line feed), calculates the reference information of each identified cell, and stores it in the main memory. When i = 0, the terminal character included in the character string S 0 may be the end of the cell or not the end of the cell. If the terminating character contained in the character string S 0 is not the terminating character of the cell, thread 0 cannot identify the cell containing the terminating character and cannot calculate the reference information. For i ≧ 1, the start of the character string S i is a cell may not be the beginning of when the cell is a beginning, end in the string S i characters if the cell is the end of the cell It may not be the end. When starting character of the string S i is not a beginning of a cell, can not identify the cell containing only string S i of the start of the string S i characters. In this case, the parsing part uses the characters of the character string S i-1 that are not included in the cell specified by the thread i-1, and the character string S i, and the cell containing the character at the beginning of the character string S i To identify. If the terminating character contained in the character string S i is not the terminating character of the cell, the thread i cannot identify the cell containing the terminating character and cannot calculate the reference information. The terminal character included in the character string ST-1 at the end of the text data is the end of the cell. By using the reference information corresponding to the specified cell, the record to which the cell belongs and the attribute corresponding to the cell (for example, information indicating the number of the attribute from the beginning of the record) can be specified. When the area for storing the reference information is insufficient in the main memory, the parsing unit collectively secures a buffer area for storing the reference information for r records in the main memory. Predetermined processing (overhead) is required to secure the buffer area. By allocating a buffer area for each r record corresponding to unit processing instead of allocating a buffer area for each record, it is possible to process variable-length records while suppressing overhead.
文字列Siに含まれる各セルの位置および長さを表す参照情報が計算された後、バッファ境界ロック解除部がスレッドi+1のバッファ境界ロックを解除する。i+1>Tに対応するスレッドは存在せず、存在しないスレッドのバッファ境界ロックは解除されない。After the reference information representing the position and length of each cell included in the character string S i is calculated, the buffer boundary unlocking unit releases the buffer boundary lock of thread i + 1. The thread corresponding to i + 1> T does not exist, and the buffer boundary lock of the nonexistent thread is not released.
スレッドi+1のバッファ境界ロックの解除後、エンコード部は、参照情報によって特定される情報に基づいて、テキストデータから結合文字列CSiに含まれる処理対象のrレコード分の文字列である処理単位文字列PSi,jを選択し、選択した処理単位文字列PSi,jを所定の有限集合の元であるエンコード情報Ei,jにエンコードする処理を、キャッシュメモリを利用して行う。処理単位文字列PSi,jの始端は何れかのレコードの始端であり、処理単位文字列PSi,jの終端は何れかのレコードの終端である。i=0の場合の結合文字列CS0はS0であり、i≧1の場合の結合文字列CSiは結合文字列CSi‐1の直後に文字列Siを結合したものであり、Jが正整数であり、j=0,…,J−1である。例えば、文字列Siの文字数がrレコード分の文字数以上である場合、エンコード部は、文字列Siから処理単位文字列PSi,jを選択するか、または、文字列Siと文字列Si‐1とを結合した文字列から処理単位文字列PSi,jを選択する。文字列Siの文字数がrレコード分の文字数未満である場合、エンコード部は文字列Siから文字列Si’までを結合した文字列から処理単位文字列PSi,jを選択する。ただし、0≦i’≦i−1である。i=0の場合、エンコード部は文字列S0の先頭から処理単位文字列PS0,0,…,PS0,J−1を選択する。i≧1の場合、エンコード部は文字列Si−1のうち処理単位文字列として選択されていない文字を先頭とした処理単位文字列PSi,0,…,PSi,J−1を選択する。J≧2の場合、PSi,j−1の直後にPSi,jが続く。After releasing the buffer boundary lock of thread i + 1, the encoding unit is a processing unit character which is a character string for r records to be processed included in the combined character string CS i from the text data based on the information specified by the reference information. column PS i, select j, selected processing unit character string PS i, encoding information E i, j is a predetermined original finite set, the process for encoding the j, performed using a cache memory. The start end of the processing unit character string PS i, j is the start end of any record, and the end end of the processing unit character string PS i, j is the end end of any record. The concatenation character string CS 0 when i = 0 is S 0 , and the concatenation character string CS i when i ≧ 1 is the concatenation character string S i immediately after the concatenation character string CS i-1 . J is a positive integer, and j = 0, ..., J-1. For example, if the number of characters in the string S i is equal to or greater than the number of characters r record content, the encoding unit, the string S i from the processing unit character string PS i, choose a j, or string S i and the string The processing unit character strings PS i and j are selected from the character string in which S i-1 is combined. When the number of characters in the character string S i is less than the number of characters for r records, the encoding unit selects the processing unit character strings PS i and j from the character string obtained by combining the character strings S i to the character string S i'. However, 0 ≦ i'≦ i-1. When i = 0, the encoding unit selects the processing unit character strings PS 0 , 0, ..., PS 0, J-1 from the beginning of the character string S 0. When i ≧ 1, the encoding unit selects the processing unit character string PS i, 0 , ..., PS i, J-1 starting from the character not selected as the processing unit character string in the character string S i-1. To do. For J ≧ 2, PS i, j followed by PS i, immediately after the j-1.
エンコード部は処理単位文字列PSi,jごとにエンコードを行う。テキストデータではコード指向でデータが並び(レコード1,レコード2,…,レコードWの順序でデータが並ぶ)、すべてのレコードは互いに同一の「属性の組」に対応する。一般に、異なる種類のデータを続けて処理するよりも、同種のデータを続けて処理した方が処理速度が速い。そのため、エンコード部は、処理単位文字列PSi,jのうち同じ属性情報に対応するrレコード分のr個のセルのエンコードを続けて行うことが望ましい。エンコード部は参照情報によって特定される情報に基づいて処理単位文字列PSi,jを選択し、選択した処理単位文字列PSi,jをエンコード情報Ei,jにエンコードする。この処理の過程で必要となるrレコード分の参照情報、処理単位文字列PSi,j、エンコード情報Ei,jをキャッシュメモリに格納して演算を行うことで高速な処理が可能となる。前述のようにC/(Scsv+Senc+Sref)に対応するレコード数rを用いることで、このような処理が可能となっている。The encoding unit encodes each processing unit character string PS i, j. In text data, data is arranged in a code-oriented manner (data is arranged in the order of
演算部は、エンコード情報Ei,jに特定の「演算」を行って演算値SSi,jを得てメインメモリに格納する処理を、キャッシュメモリを利用して行う。演算部は、同じ属性情報に対応するrレコード分のr個のセルに対応する「演算」を続けて行うことが望ましい。この処理の過程でもrレコード分の参照情報、処理単位文字列PSi,j、エンコード情報Ei,jをキャッシュメモリに格納して演算を行うことで高速な処理が可能となる。The calculation unit uses the cache memory to perform a process of performing a specific "calculation" on the encoding information E i and j to obtain the calculation values SS i and j and storing them in the main memory. It is desirable that the calculation unit continuously performs "calculation" corresponding to r cells for r records corresponding to the same attribute information. Even in this processing process, high-speed processing is possible by storing the reference information for r records, the processing unit character strings PS i, j , and the encoding information E i, j in the cache memory and performing the calculation.
演算値SSi,jが得られた後、並列性ロック解除部はスレッドi+npの並列性ロックを解除する。ただし、i+np>Tに対応するスレッドは存在せず、存在しないスレッドの並列性ロックは解除されない。その後、スレッドiの処理を行っていた処理部が開放され、当該処理部が他のスレッドの処理を行うことが可能になる。After the calculated values SS i and j are obtained, the parallelism unlocking unit releases the parallelism lock of the thread i + np . However, the thread corresponding to i + n p > T does not exist, and the parallelism lock of the nonexistent thread is not released. After that, the processing unit that has been processing the thread i is released, and the processing unit can perform the processing of another thread.
<演算装置(高速版)>
テキストファイルの各セルが、単独で「演算」の対象を表すか否かを判別可能な文字のみを含む場合、テキストファイルの各セルの位置および長さを特定する処理を並列に行うことができ、さらに高速な演算が可能となる。例えば、エスケープ文字を使用していないテキストファイルの場合にはこのような並列処理が可能になる。このようなテキストファイルに対応可能な演算装置はメインメモリとキャッシュメモリと複数の処理部とを有する。各処理部は、読み込み部とファイル読み込みロック解除部とパース部とセル特定部とバッファ境界ロック解除部とエンコード部と演算部と並列性ロック解除部とを有する。これら複数の処理部は何れかのスレッドの処理に割り当てられる。スレッドiの処理を行う処理部は以下の処理を行う。初期状態でスレッド0のファイル読み込みロックならびにバッファ境界ロックおよびスレッド0,…,np−1の並列性ロックが解除されているものとする。<Arithmetic logic unit (high-speed version)>
When each cell of the text file contains only characters that can determine whether or not it represents the target of "calculation" by itself, the process of specifying the position and length of each cell of the text file can be performed in parallel. , Even faster calculation is possible. For example, in the case of a text file that does not use escape characters, such parallel processing is possible. An arithmetic unit that can handle such a text file has a main memory, a cache memory, and a plurality of processing units. Each processing unit has a reading unit, a file reading unlocking unit, a parsing unit, a cell specifying unit, a buffer boundary unlocking unit, an encoding unit, an arithmetic unit, and a parallelism unlocking unit. These plurality of processing units are assigned to the processing of any thread. The processing unit that processes thread i performs the following processing. It is assumed that the file read lock of thread 0, the buffer boundary lock, and the concurrency lock of threads 0, ..., N p -1 are released in the initial state.
読み込み部は、スレッドiのファイル読み込みロックおよび並列性ロックが解除された後、テキストファイルの文字列からファイルバッファサイズfの領域に格納可能な文字列Siを読み込んでメインメモリに格納する。この詳細は演算装置(一般版)と同じである。Reading unit, after the file read lock and parallelism locking thread i is released, stored in the main memory by reading the string S i can be stored from a string in a region of the file buffer size f of the text file. This detail is the same as the arithmetic unit (general version).
文字列Siがメインメモリに格納された後、ファイル読み込みロック解除部がスレッドi+1のファイル読み込みロックを解除する。この詳細は演算装置(一般版)と同じである。After the character string S i is stored in the main memory, the file read unlock unit releases the file read lock of thread i + 1. This detail is the same as the arithmetic unit (general version).
パース部が文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリに格納する。パース部はスレッドiのバッファ境界ロックが解除される前にこの処理を開始できる。すなわち、パース部は、i≧1において、文字列Si−1に含まれる各セルの位置および長さを表す参照情報の計算が終わる前に、文字列Siに含まれる各セルの位置および長さを表す参照情報の計算を開始できる。例えば、パース部は文字列Siのセルを特定し、特定した各セルの参照情報を計算してメインメモリに格納する。例えば、パース部はセルの境界に位置する情報(例えば、区切り文字または改行)に基づいてセルを特定し、特定した各セルの参照情報を計算してメインメモリに格納する。i=0の場合、文字列S0に含まれる終端の文字がセルの終端である場合とセルの終端でない場合がある。文字列S0に含まれる終端の文字がセルの終端でない場合、パース部は終端の文字を含むセルを特定できず、その参照情報も計算できない。i≧1の場合、文字列Siの始端の文字がセルの始端である場合とセルの始端でない場合があり、文字列Siに含まれる終端の文字がセルの終端である場合とセルの終端でない場合がある。文字列Siの始端の文字がセルの始端でない場合、パース部は文字列Siの始端の文字を含むセルを特定できず、その参照情報も計算できない。文字列Siに含まれる終端の文字がセルの終端でない場合、パース部は終端の文字を含むセルを特定できず、その参照情報も計算できない。なお、終端の文字列ST−1に含まれる終端の文字はセルの終端である。なお、パース部は、メインメモリに参照情報を格納する領域が足りなくなったときに、rレコード分の参照情報を格納するためのバッファ領域をメインメモリにまとめて確保する。これにより、オーバーヘッドを抑制しつつ、可変長のレコードを処理できる。Parser stores to calculate the reference information representative of the location and length of each cell in a string S i in a main memory. The parsing unit can start this process before the buffer boundary lock of thread i is released. That is, the parser, in i ≧ 1, before the calculation of the reference information indicating the position and length of each cell in the string S i-1 is completed, the position of each cell in the string S i and You can start calculating the reference information that represents the length. For example, parser identifies the cell of the string S i, stored in the main memory to calculate the reference information of each cell identified. For example, the parsing unit identifies a cell based on information located at the boundary of the cell (for example, a delimiter or a line feed), calculates the reference information of each identified cell, and stores it in the main memory. When i = 0, the terminal character included in the character string S 0 may be the end of the cell or not the end of the cell. If the terminal character included in the character string S 0 is not the terminal of the cell, the parsing unit cannot identify the cell containing the terminal character, and the reference information thereof cannot be calculated. For i ≧ 1, the start of the character string S i is a cell may not be the beginning of when the cell is a beginning, end in the string S i characters if the cell is the end of the cell It may not be the end. When starting character of the string S i is not a beginning of the cell, parsing unit can not identify the cell that contains the start character string S i, not even be calculated the reference information. If the character terminating in a character string S i is not the end of the cell, parsing unit can not identify the cell containing the end character, not even be calculated the reference information. The terminal character included in the terminal character string ST-1 is the terminal of the cell. When the area for storing the reference information is insufficient in the main memory, the parsing unit collectively secures a buffer area for storing the reference information for r records in the main memory. This makes it possible to process variable-length records while suppressing overhead.
i≧1の場合、文字列Siは文字列Si‐1の直後に続く文字列である。i≧1の場合、セル特定部は、スレッドiのバッファ境界ロックが解除された後、参照情報と文字列Si‐1と文字列Siとを用い、文字列Si‐1に含まれる最後のセルの直後に続くセルの位置に対応する情報Aiを得てメインメモリに格納する。情報Aiは、例えば、文字列Si‐1に含まれる最後のセルの直後に続くセルが属するレコードを表す情報と当該セルに対応する属性を表す情報(例えば、当該レコードの最初から何番目の属性に対応するかを表す情報)であってもよいし、文字列Si‐1に含まれる最後のセルの直後に続くセルの位置および長さを表す情報であってもよい。文字列Si‐1の終端がセルの終端である場合には文字列Siの先頭のセルが「文字列Si‐1に含まれる最後のセルの直後に続くセル」となる。この場合には情報Aiのメインメモリへの格納が省略されてもよい。一方、文字列Si‐1の終端がセルの終端でない場合、文字列Siは文字列Si‐1と文字列Siとを用い、「文字列Si‐1に含まれる最後のセルの直後に続くセル」を生成して情報Aiを得る。これにより、パース部が特定できなかったセルの位置に対応する情報が得られる。参照情報と情報Aiとによってテキストファイルの各セルが属するレコードと当該セルに対応する属性(例えば、当該レコードの最初から何番目の属性であるかを表す情報)とを特定できる。なお、i=0の場合、セル特定部は何もしない。When i ≧ 1, the character string S i is a character string immediately following the character string S i-1. When i ≧ 1, the cell identification part is included in the character string S i-1 by using the reference information, the character string S i-1 and the character string S i -1 after the buffer boundary lock of the thread i is released. stored in the main memory to obtain information a i corresponding to the position of the cell immediately following the last cell. Information A i is, for example, information representing a record to which a cell immediately following the last cell included in the character string S i-1 belongs and information representing an attribute corresponding to the cell (for example, the number from the beginning of the record). Information indicating whether or not it corresponds to the attribute of), or information indicating the position and length of the cell immediately following the last cell included in the character string Si-1. When the end of the character string S i-1 is the end of the cell, the first cell of the character string S i becomes "the cell immediately following the last cell included in the character string S i-1". In this case, the storage of the information Ai in the main memory may be omitted. On the other hand, when the end of the character string S i-1 is not the end of the cell, the character string S i uses the character string S i-1 and the character string S i, and "the last cell included in the character string S i-1". obtain information a i generates a cell "that immediately follows. As a result, information corresponding to the position of the cell whose perspective portion could not be specified can be obtained. The record to which each cell of the text file belongs and the attribute corresponding to the cell (for example, information indicating the number of the attribute from the beginning of the record) can be specified by the reference information and the information Ai. When i = 0, the cell specific part does nothing.
バッファ境界ロック解除部は、情報Aiが得られた後にスレッドi+1のバッファ境界ロックを解除する。この詳細は演算装置(一般版)と同じである。その後、スレッドiの処理を行っていた処理部が開放され、当該処理部が他のスレッドの処理を行うことが可能になる。The buffer boundary unlocking unit releases the buffer boundary lock of thread i + 1 after the information Ai is obtained. This detail is the same as the arithmetic unit (general version). After that, the processing unit that has been processing the thread i is released, and the processing unit can perform the processing of another thread.
その後エンコード部は、参照情報および情報Aiによって特定される情報に基づいて、結合文字列CSiに含まれる処理対象のrレコード分の文字列である処理単位文字列PSi,jを選択し、処理単位文字列PSi,jを所定の有限集合の元であるエンコード情報Ei,jにエンコードする処理を、キャッシュメモリを利用して行う。この詳細は参照情報に加えて情報Aiを用いる以外、演算装置(一般版)と同じである。After that, the encoding unit selects the processing unit character strings PS i and j , which are the character strings for the r records to be processed included in the combined character string CS i , based on the reference information and the information specified by the information A i. , The process of encoding the processing unit character strings PS i, j into the encoding information E i, j , which is the source of a predetermined finite set, is performed using the cache memory. This detail is the same as that of the arithmetic unit (general version) except that the information Ai is used in addition to the reference information.
演算部は、エンコード情報Ei,jに特定の「演算」を行って演算値SSi,jを得てメインメモリに格納する処理を、キャッシュメモリを利用して行う。この詳細は演算装置(一般版)と同じである。The calculation unit uses the cache memory to perform a process of performing a specific "calculation" on the encoding information E i and j to obtain the calculation values SS i and j and storing them in the main memory. This detail is the same as the arithmetic unit (general version).
演算値SSi,jが得られた後、並列性ロック解除部はスレッドi+npの並列性ロックを解除する。この詳細は演算装置(一般版)と同じである。After the calculated values SS i and j are obtained, the parallelism unlocking unit releases the parallelism lock of the thread i + np . This detail is the same as the arithmetic unit (general version).
[第1実施形態]
図面を用いて第1実施形態を説明する。第1実施形態では、パラメータ設定装置が1つの単位処理で扱われるレコード数r、並列数np、ファイルバッファサイズfを設定し、演算装置(一般版)がエスケープ文字の使用が可能なCSV(Comma-Separated Values)ファイル(テキストファイル)の秘密分散(演算)を行う例を説明する。以下では、これまで説明した事項との相違点を中心に説明し、既に説明した事項については説明を省略する場合がある。[First Embodiment]
The first embodiment will be described with reference to the drawings. In the first embodiment, the parameter setting device sets the number of records r, the number of parallels np , and the file buffer size f handled in one unit processing, and the arithmetic unit (general version) can use escape characters in CSV (general version). An example of performing secret sharing (calculation) of a Comma-Separated Values) file (text file) will be described. In the following, the differences from the items described so far will be mainly described, and the items already explained may be omitted.
<構成>
図1に例示するように、本実施形態の演算システム1は、パラメータ設定装置11、演算装置12、およびN個のサーバ装置13−1〜13−Nを有する。ただし、Nは2以上の正整数である。パラメータ設定装置11から演算装置12への情報の伝達が可能であり、演算装置12からサーバ装置13−1〜13−Nへの情報の伝達が可能である。なお、情報の伝達はネットワークを介して行われてもよいし、その他の通信手段を用いて行われてもよいし、可搬型の記録媒体を介して行われてもよい。<Structure>
As illustrated in FIG. 1, the
図2に例示するように、パラメータ設定装置11は、入力部111a、出力部111b、記憶部112、制御部113、最大サイズ設定部114a、最小サイズ設定部114b、エンコードサイズ設定部114c、演算サイズ設定部114d、参照サイズ設定部114e、処理単位算出部114f、並列数算出部114g、およびバッファサイズ算出部114hを有する。パラメータ設定装置11は、制御部113の制御の下で各処理を実行する。パラメータ設定装置11で得られた各値は記憶部112に格納され、必要に応じて記憶部112から読み出されて他の処理に用いられる。
As illustrated in FIG. 2, the
図3に例示するように、演算装置12は、入力部121a、出力部121b、補助記憶部122、メインメモリ123、制御部125、および処理部126−1〜126−Qを有する。ただし、Qは2以上の整数である。演算装置12は、制御部125の制御の下で各処理を実行する。
As illustrated in FIG. 3, the
図4に例示するように、処理部126−q(ただし、q=1,…,Q)は、キャッシュメモリ1260−q、読み込み部1261−q、パース部1262−q、エンコード部1265−q、演算部1266−q、ファイル読み込みロック解除部1267−q、バッファ境界ロック解除部1268−q、および並列性ロック解除部1269−qを有する。 As illustrated in FIG. 4, the processing unit 126-q (where q = 1, ..., Q) includes a cache memory 1260-q, a reading unit 1261-q, a perspective unit 1262-q, and an encoding unit 1265-q. It has a calculation unit 1266-q, a file read unlock unit 1267-q, a buffer boundary unlock unit 1268-q, and a parallelism unlock unit 1269-q.
<パラメータ設定処理>
図5を用いて、パラメータ設定装置11のパラメータ設定処理を説明する。
演算処理対象のテキストデータの属性情報がパラメータ設定装置11(図2)の入力部111aに入力され、記憶部112に格納される。属性情報はテキストデータから読み込まれたものであってもよいし、テキストデータ以外から与えられたものであってもよい(ステップS111a)。<Parameter setting process>
The parameter setting process of the
The attribute information of the text data to be processed is input to the
最大サイズ設定部114aは、記憶部112から読み出した属性情報を入力としてテキストファイルの1レコード分の文字列のサイズの最大値Scsvを設定して出力する(ステップS114a)。Maximum
最小サイズ設定部114bは、記憶部112から読み出した属性情報を入力として1レコード分の文字列のサイズの最小値scsvを設定して出力する(ステップS114b)。 The minimum size setting unit 114b sets and outputs the minimum value s csv of the size of the character string for one record by inputting the attribute information read from the storage unit 112 (step S114b).
エンコードサイズ設定部114cは、記憶部112から読み出した属性情報を入力とし、エンコード情報が属する「所定の有限集合」を表す情報に基づいて、1レコード分の文字列を所定の有限集合の元にエンコード(変換)して得られるエンコード情報の合計サイズの最大値Sencを設定して出力する。本実施形態のエンコード情報が属する「所定の有限集合」は秘密分散が行われる有限集合であり、予め定められている(ステップS114c)。The encoding
演算サイズ設定部114dは、記憶部112から読み出した属性情報を入力とし、エンコード情報が属する所定の有限集合および秘密分散方式に基づいて、1レコード分のエンコード情報の秘密分散(演算)によって得られる秘密分散値(演算値)の合計サイズの最大値Sssを設定して出力する。本実施形態の秘密分散方式は予め定められている(ステップS114d)。The calculation
参照サイズ設定部114eは、記憶部112から読み出した属性情報を入力とし、テキストファイル内の1レコード分のセルそれぞれの位置および長さを表す参照情報の合計サイズSrefを設定して出力する(ステップS114e)。The reference
処理単位算出部114fは、Scsv、SencおよびSrefを入力とし、C/(Scsv+Senc+Sref)の関数値r(1回の単位処理で処理されるレコード数r、すなわち処理単位文字列が含むレコード数r)を得て出力する。キャッシュメモリサイズCは予め定められたものであってもよいし、入力されたものであってもよい(ステップS114f)。The processing
並列数算出部114gは、Scsv、scsv、Sref、Senc、Iおよびrを入力とし、f0/I・r・Scsvの関数値np(演算処理における並列数np)を得て出力する。f0はscsv・M/(scsv+Senc+max(Sref,Sss))の関数値である。メインメモリサイズMは予め定められたものであってもよいし、入力されたものであってもよい(ステップS114g)。The parallel
バッファサイズ算出部114hは、f0およびnpを入力とし、f0/npの関数値f(演算処理の際にテキストファイルの文字列からまとめて読み込まれるデータのファイルバッファサイズf)を得て出力する(ステップS114h)。The buffer
出力部111bは、上述のように得られたr,np,fを出力する(ステップS111b)。The
<演算処理>
図6から図12を用い、演算装置12の演算処理を説明する。
図6に例示するように、パラメータ設定装置11から出力されたr,np,fとが演算装置12(図3)の入力部121aに入力され、補助記憶部122に格納される(ステップS111aa)。また演算処理対象のテキストデータが入力部121aに入力され、補助記憶部122に格納される。図9から図12にテキストデータを例示する。図9に例示するテキストデータは、各セルがダブルクォーテーションで囲まれたCSVファイルである。セルの値としてダブルクォーテーション「“」を用いる場合にはその前にエスケープ文字として「“」が付加される。例えば、“4selddks““k304kdkk400-03d”は、「4selddks“k304kdkk400-03d」という秘密分散対象の値を表している。図10に例示するように、このテキストファイルはW個のレコードrec(1),…,rec(W)を含み、レコードrec(w)(ただし、w=1,…,W)のそれぞれは任意長のG個のセルcell(w,g)を含み(ただし、g=1,…,G)、セルcell(w,g)のそれぞれは任意個の文字を含む。セルcell(w,g)はレコードrec(w)の最初からg番目の属性att(g)に対応する(ステップS111ab)。<Calculation processing>
The arithmetic processing of the
As illustrated in FIG. 6, r, n p , and f output from the
その後、補助記憶部122からr,np,fがメインメモリ123に読み込まれ、スレッドi=0,…,T−1の演算処理が実行される。演算処理はi=0のスレッドから開始される。なお、初期状態でスレッド0のファイル読み込みロックおよびバッファ境界ロックならびにスレッド0,…,np−1の並列性ロックが解除されている。制御部125は処理部126−1〜126−Qのうち使用されていない処理部126−qをスレッドiに割り当て、可能な限り複数のスレッドが並列に各スレッドiの処理を実行する(ステップS126)。これによって得られた各秘密分散値は出力部121bから出力され、各サーバ装置13−1〜13−Nにそれぞれ送られ、各サーバ装置13−1〜13−Nに格納される(ステップS111b)。以下にスレッドiの処理の詳細を説明する。After that, r, n p , and f are read from the
≪スレッドiの処理≫
図7および図8に例示するように、スレッドiの処理を行う処理部126−qの読み込み部1261−qは、スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されたかを判定する。スレッド0のファイル読み込みロックおよび並列性ロックは初期状態で解除されている(ステップS1261a−q)。スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されていない場合にはステップS1261a−qの判定が繰り返される。≪Processing of thread i≫
As illustrated in FIGS. 7 and 8, the reading unit 1261-q of the processing unit 126-q that performs the processing of the thread i determines whether both the file reading lock and the concurrency lock of the thread i are released. The file read lock and parallelism lock of thread 0 are released in the initial state (step S1261a-q). If both the file read lock and the parallelism lock of thread i are not released, the determination in step S1261a-q is repeated.
一方、スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されている場合、読み込み部1261−qは、メインメモリ123からファイルバッファサイズfを読み込み、メインメモリ123にファイルバッファサイズfの領域を確保する。さらに、読み込み部1261−qは、補助記憶部122に格納されたテキストファイルの文字列からファイルバッファサイズfの領域に格納可能な文字列Siを読み込む。図11の例では、文字列S0として以下が読み込まれる。
“石田”,“太郎”,“1990/2/8”,“100-0002”,“sjeifdfgjrrf”,“45dkfjkejdf5”
“石田”,“次郎”,“1985/5/2”,“111-0112”,“25df4d4ed”,“1s4dlccclseed”
“石田”,“花子”,“2001/4/8”,“111-2222”,“5d4e4d4ffg”,“skekdjjfaae”
“佐藤”,“太郎”,“1992/7/11”,“111-0345”,“dlekd4f3e”,“4selddks“
図12の例では、文字列S1として以下が読み込まれる。
“k304kdkk400-03d”
“佐藤”,“次郎”,“1989/8/21”,“123-0434”,“dkesopd445e”,“4ssjdejdoseae3230dds”
“佐藤”,“花子”,“1995/2/3”,“145-0234”,“skdeofl4s3d3”,“skek94kdskd4dc”
“田中”,“太郎”,“1992/3/23”,“134-0134”,“dj394949495kf”,“47s52\n5412485d”
“田中”,“次郎”,“1979/4/21”,“11
読み込み部1261−qは、メインメモリ123に確保したファイルバッファサイズfの領域に文字列Siを格納する(図7のステップS1261b−q、図8のRi)。On the other hand, when both the file read lock and the concurrency lock of thread i are released, the read unit 1261-q reads the file buffer size f from the
“Ishida”, “Taro”, “1990/2/8”, “100-0002”, “sjeifdfgjrrf”, “45dkfjkejdf5”
"Ishida", "Jiro", "1985/5/2", "111-0112", "25df4d4ed", "1s4dlccclseed"
“Ishida”, “Hanako”, “2001/4/8”, “111-2222”, “5d4e4d4ffg”, “skekdjjfaae”
“Sato”, “Taro”, “1992/7/11”, “111-0345”, “dlekd4f3e”, “4selddks”
In the example of FIG. 12, the following are read as a string S 1.
“K304kdkk400-03d”
“Sato”, “Jiro”, “1989/8/21”, “123-0434”, “dkesopd445e”, “4ssjdejdoseae3230dds”
“Sato”, “Hanako”, “1995/2/3”, “145-0234”, “skdeofl4s3d3”, “skek94kdskd4dc”
"Tanaka", "Taro", "1992/3/23", "134-0134", "dj394949495kf", "47s52 \ n5412485d"
"Tanaka", "Jiro", "1979/4/21", "11"
Reading unit 1261-q stores the string S i in the area of the file buffer size f secured in the main memory 123 (Step S1261b-q in FIG. 7, R i in FIG. 8).
文字列Siがメインメモリ123に格納された後、ファイル読み込みロック解除部1267−qがスレッドi+1のファイル読み込みロックを解除する(図7のステップS1267−q、図8のURi+1)。After the character string S i is stored in the
パース部1262−qは、スレッドiのバッファ境界ロックが解除されたか否かを判定する。スレッド0のバッファ境界ロックは初期状態で解除されている(ステップS1262a−q)。スレッドiのバッファ境界ロックが解除されていない場合にはステップS1262a−qの判定が繰り返される。 The parsing unit 1262-q determines whether or not the buffer boundary lock of thread i has been released. The buffer boundary lock of thread 0 is released in the initial state (step S1262a-q). If the buffer boundary lock of thread i is not released, the determination in step S1262a-q is repeated.
一方、スレッドiのバッファ境界ロックが解除されている場合、パース部1262−qはi≧1であるか否かを判定する(ステップS1262b−q)。i≧1でない場合(すなわち、i=0の場合)、パース部1262−qは、メインメモリ123から読み出した文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図11に例示した文字列S0の場合、パース部1262−qは、文字列S0をパースしてセル「石田」「太郎」「1990/2/8」「100-0002」「sjeifdfgjrrf」「45dkfjkejdf5」「石田」「次郎」「1985/5/2」「111-0112」「25df4d4ed」「1s4dlccclseed」「石田」「花子「2001/4/8」「111-2222」「5d4e4d4ffg」「skekdjjfaae」「佐藤」「太郎」「1992/7/11」「111-0345」「dlekd4f3e」を特定し、それらの参照情報を計算する。最後の「“4selddks“」の終端はセルの終端ではないため、スレッド0では「“4selddks“」の参照情報は計算されない。パース部1262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。その後、処理がステップS1268−qに進む(図7のステップS1262c−q、図8のPi)。一方、i≧1である場合、パース部1262−qは、スレッドi−1でのパース結果(特定された各セルの参照情報およびセルに含まれない文字を特定する情報)をメインメモリ123から読み込み、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字を特定する。文字列Si−1の終端がセルの終端である場合には、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字は存在しない(ステップS1262d−q)。次にパース部1262−qは、メインメモリ123から文字列Siを読み出し、スレッドi−1で特定されたセルに含まれない文字と文字列Siとを結合した文字列をパースし、この文字列に含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。文字列Si−1の終端がセルの終端である場合には、パース部1262−qは文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図11および図12に例示した文字列S0およびS1の場合、パース部1262−qは、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字「“4selddks“」と文字列Si−1とを結合した文字列
“4selddks““k304kdkk400-03d”
“佐藤”,“次郎”,“1989/8/21”,“123-0434”,“dkesopd445e”,“4ssjdejdoseae3230dds”
“佐藤”,“花子”,“1995/2/3”,“145-0234”,“skdeofl4s3d3”,“skek94kdskd4dc”
“田中”,“太郎”,“1992/3/23”,“134-0134”,“dj394949495kf”,“47s52\n5412485d”
“田中”,“次郎”,“1979/4/21”,“11
をパースし、この文字列に含まれる各セル「4selddks““k304kdkk400-03d」「佐藤」「次郎」「1989/8/21」「123-0434」「dkesopd445e」「4ssjdejdoseae3230dds」「佐藤」「花子」「1995/2/3」「145-0234」「skdeofl4s3d3」「skek94kdskd4dc」「田中」「太郎」「1992/3/23」「134-0134」「dj394949495kf」「47s52\n5412485d」「田中」「次郎」「1979/4/21」の位置および長さを表す参照情報を計算してメインメモリ123に格納する。最後の“11の終端はセルの終端ではないため、スレッド1では“11の参照情報は計算されない。パース部1262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。その後、処理がステップS1268−qに進む(図7のステップS1262e−q、図8のPi)。On the other hand, when the buffer boundary lock of the thread i is released, the parsing unit 1262-q determines whether or not i ≧ 1 (step S1262b−q). If not i ≧ 1 (i.e., the case of i = 0), parser 1262-q parses the string S i read from the
“Sato”, “Jiro”, “1989/8/21”, “123-0434”, “dkesopd445e”, “4ssjdejdoseae3230dds”
“Sato”, “Hanako”, “1995/2/3”, “145-0234”, “skdeofl4s3d3”, “skek94kdskd4dc”
"Tanaka", "Taro", "1992/3/23", "134-0134", "dj394949495kf", "47s52 \ n5412485d"
"Tanaka", "Jiro", "1979/4/21", "11"
And each cell included in this string "4selddks""k304kdkk400-03d""Sato""Jiro""1989/8/21""123-0434""dkesopd445e""4ssjdejdoseae3230dds""Sato""Hanako""1995/2/3""145-0234""skdeofl4s3d3""skek94kdskd4dc""Tanaka""Taro""1992/3/23""134-0134""dj394949495kf""47s52 \ n5412485d""Tanaka""Jiro" The reference information indicating the position and length of "1979/4/21" is calculated and stored in the
ステップS1268−qでは、バッファ境界ロック解除部1268−qがスレッドi+1のバッファ境界ロックを解除する。ただし、i+1>Tに対応するスレッドは存在せず、存在しないスレッドのバッファ境界ロックは解除されない(図7のステップS1268−q、図8のUBi+1)。In step S1268-q, the buffer boundary unlocking unit 1268-q releases the buffer boundary lock of thread i + 1. However, the thread corresponding to i + 1> T does not exist, and the buffer boundary lock of the nonexistent thread is not released (step S1268-q in FIG. 7, UB i + 1 in FIG. 8).
その後、エンコード部1265−qは、参照情報によって特定される情報に基づいて、テキストデータから結合文字列CSiに含まれる処理対象のrレコード分の文字列である処理単位文字列PSi,j(ただし、j=0,…,J−1)を選択し、処理単位文字列PSi,jおよび処理単位文字列PSi,jに対応するrレコード分の参照情報をキャッシュメモリ1260−qに格納する。r=2とした図11および図12の例では、結合文字列CS0=S0から処理単位文字列PS0,0が選択され、結合文字列CS1=S0+S1から処理単位文字列PS1,0およびPS1,1が選択される(ステップS1263−q)。エンコード部1265−qは、キャッシュメモリ1260−qの処理単位文字列PSi,jおよび参照情報を用い、処理単位文字列PSi,jを所定の有限集合の元であるエンコード情報Ei,jにエンコードし、エンコード情報Ei,jをキャッシュメモリ1260−qに格納する(図7のステップS1265−q、図8のEi)。 After that, the encoding unit 1265-q is a processing unit character string PS i, j which is a character string for r records to be processed included in the combined character string CS i from the text data based on the information specified by the reference information. (However, j = 0, ..., J-1) is selected , and the reference information for the r records corresponding to the processing unit character strings PS i, j and the processing unit character strings PS i, j is stored in the cache memory 1260-q. Store. In the examples of FIGS. 11 and 12 in which r = 2, the processing unit character string PS 0, 0 is selected from the combined character string CS 0 = S 0, and the processing unit character string is selected from the combined character string CS 1 = S 0 + S 1. PS 1,0 and PS 1,1 are selected (step S1263-q). The encoding unit 1265-q uses the processing unit character strings PS i, j and the reference information of the cache memory 1260-q, and uses the processing unit character strings PS i, j as the source of the predetermined finite set of encoding information E i, j. And the encoding information E i and j are stored in the cache memory 1260-q (step S1265-q in FIG. 7, E i in FIG. 8).
演算部1266−qは、キャッシュメモリ1260−qから読み出したエンコード情報Ei,jの秘密分散を行って秘密分散値(演算値)SSi,jを得てメインメモリ123に格納する。この際、処理単位文字列PSi,jに対応するrレコード分の参照情報をメインメモリ123に格納しておく必要はないため、秘密分散値SSi,0,…,SSi,J−1がこのrレコード分の参照情報が格納されていた領域に上書きされてもよい(図7のステップS1266−q、図8のSSi)。 The calculation unit 1266-q performs secret sharing of the encoding information E i and j read from the cache memory 1260-q, obtains the secret sharing value (calculation value) SS i and j , and stores them in the
その後、並列性ロック解除部1269−qが、メインメモリ123からnpを読み込み、スレッドi+npの並列性ロックを解除する。ただし、i+np>Tに対応するスレッドは存在せず、存在しないスレッドの並列性ロックは解除されない。その後、制御部125はスレッドiへの処理部126−qの割り当てを解除する。これにより、処理部126−qを他のスレッドに割り当てることが可能になる(図7のステップS1269−q、図8のUPi+np)。After that, the parallelism unlocking unit 1269-q reads np from the
[第2実施形態]
第2実施形態では、パラメータ設定装置が1つの単位処理で扱われるレコード数r、並列数np、ファイルバッファサイズfを設定し、演算装置(高速版)がエスケープ文字の使用が禁止されたCSV(Comma-Separated Values)ファイル(テキストファイル)の秘密分散(演算)を行う例を説明する。[Second Embodiment]
In the second embodiment, the parameter setting device sets the number of records r, the number of parallels np , and the file buffer size f handled in one unit processing, and the arithmetic device (high-speed version) prohibits the use of escape characters. An example of performing secret sharing (calculation) of a (Comma-Separated Values) file (text file) will be described.
<構成>
図1に例示するように、本実施形態の演算システム2は、パラメータ設定装置11、演算装置22、およびN個のサーバ装置13−1〜13−Nを有する。パラメータ設定装置11から演算装置22への情報の伝達が可能であり、演算装置22からサーバ装置13−1〜13−Nへの情報の伝達が可能である。<Structure>
As illustrated in FIG. 1, the
図2に例示するように、パラメータ設定装置11は、入力部111a、出力部111b、記憶部112、制御部113、最大サイズ設定部114a、最小サイズ設定部114b、エンコードサイズ設定部114c、演算サイズ設定部114d、参照サイズ設定部114e、処理単位算出部114f、並列数算出部114g、およびバッファサイズ算出部114hを有する。パラメータ設定装置11は、制御部113の制御の下で各処理を実行する。パラメータ設定装置11で得られた各値は記憶部112に格納され、必要に応じて記憶部112から読み出されて他の処理に用いられる。
As illustrated in FIG. 2, the
図3に例示するように、演算装置12は、入力部121a、出力部121b、補助記憶部122、メインメモリ123、制御部125、および処理部226−1〜226−Qを有する。ただし、Qは2以上の整数である。演算装置12は、制御部125の制御の下で各処理を実行する。
As illustrated in FIG. 3, the
図4に例示するように、処理部126−q(ただし、q=1,…,Q)は、キャッシュメモリ1260−q、読み込み部1261−q、パース部1262−q、エンコード部1265−q、演算部1266−q、ファイル読み込みロック解除部1267−q、バッファ境界ロック解除部1268−q、および並列性ロック解除部1269−qを有する。 As illustrated in FIG. 4, the processing unit 126-q (where q = 1, ..., Q) includes a cache memory 1260-q, a reading unit 1261-q, a perspective unit 1262-q, and an encoding unit 1265-q. It has a calculation unit 1266-q, a file read unlock unit 1267-q, a buffer boundary unlock unit 1268-q, and a parallelism unlock unit 1269-q.
<パラメータ設定処理>
第1実施形態と同一である。<Parameter setting process>
It is the same as the first embodiment.
<演算処理>
図6および図13から図18を用い、演算装置22の演算処理を説明する。
図6に例示するように、パラメータ設定装置11から出力されたr,np,fとが演算装置22(図3)の入力部121aに入力され、補助記憶部122に格納される(ステップS111aa)。また演算処理対象のテキストデータが入力部121aに入力され、補助記憶部122に格納される。図15から図18にテキストデータを例示する。図15に例示するテキストデータは、各セルがダブルクォーテーションで囲まれていないCSVファイルである。本実施形態のテキストデータでのエスケープ文字の使用は許可されておらず、各セルは単独で秘密分散(演算)の対象を表すか否かを判別可能な文字のみを含む。図16に例示するように、このテキストファイルはW個のレコードrec(1),…,rec(W)を含み、レコードrec(w)(ただし、w=1,…,W)のそれぞれは任意長のG個のセルcell(w,g)を含み(ただし、g=1,…,G)、セルcell(w,g)のそれぞれは任意個の文字を含む。セルcell(w,g)はレコードrec(w)の最初からg番目の属性att(g)に対応する(ステップS211ab)。<Calculation processing>
The arithmetic processing of the
As illustrated in FIG. 6, r, n p , and f output from the
その後、補助記憶部122からr,np,fがメインメモリ123に読み込まれ、スレッドi=0,…,T−1の演算処理が実行される。演算処理はi=0のスレッドから開始される。なお、初期状態でスレッド0のファイル読み込みロックおよびスレッド0,…,np−1の並列性ロックが解除されている。制御部125は処理部226−1〜226−Qのうち使用されていない処理部226−qをスレッドiに割り当て、可能な限り複数のスレッドが並列に各スレッドiの処理を実行する(ステップS226)。これによって得られた各秘密分散値は出力部121bから出力され、各サーバ装置13−1〜13−Nにそれぞれ送られ、各サーバ装置13−1〜13−Nに格納される(ステップS111b)。以下にスレッドiの処理の詳細を説明する。After that, r, n p , and f are read from the
≪スレッドiの処理≫
図13および図14に例示するように、スレッドiの処理を行う処理部226−qの読み込み部1261−qは、スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されたかを判定する。スレッド0のファイル読み込みロックおよび並列性ロックは初期状態で解除されている(ステップS1261a−q)。スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されていない場合にはステップS1261a−qの判定が繰り返される。≪Processing of thread i≫
As illustrated in FIGS. 13 and 14, the reading unit 1261-q of the processing unit 226-q that performs the processing of thread i determines whether both the file reading lock and the concurrency lock of thread i have been released. The file read lock and parallelism lock of thread 0 are released in the initial state (step S1261a-q). If both the file read lock and the parallelism lock of thread i are not released, the determination in step S1261a-q is repeated.
一方、スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されている場合、読み込み部1261−qは、メインメモリ123からファイルバッファサイズfを読み込み、メインメモリ123にファイルバッファサイズfの領域を確保する。さらに、読み込み部1261−qは、補助記憶部122に格納されたテキストファイルの文字列からファイルバッファサイズfの領域に格納可能な文字列Siを読み込む。図17の例では、文字列S0として以下が読み込まれる。
石田,太郎,1990/2/8,100-0002,東京都渋谷区〇〇〇,03-3234-5678
石田,次郎,2000/4/2,274-16,神奈川県藤沢市江の島〇〇〇,03-9999-9999
石田,花子,1985/6/2,352-725,東京都港区区〇〇〇,03-1111-9999
佐藤,太郎,2001/5/1,100-0002,東京都千代田区〇〇〇,03-3234-5678
佐藤,次
図18の例では、文字列S1として以下が読み込まれる。
郎,2001/6/2,274-16,神奈川県藤沢市江の島〇〇〇,03-9999-9999
佐藤,花子,2002/7/2,352-725,東京都新宿区新宿〇〇〇,03-1111-9999
田中,太郎,2001/1/1,100-0002,東京都千代田区〇〇〇,03-1234-5678
田中,次郎,2001/1/2,251-0036,神奈川県藤沢市江の島〇〇〇
読み込み部1261−qは、メインメモリ123に確保したファイルバッファサイズfの領域に文字列Siを格納する(図13のステップS1261b−q、図14のRi)。On the other hand, when both the file read lock and the concurrency lock of thread i are released, the read unit 1261-q reads the file buffer size f from the
Ishida, Taro, 1990/2 / 8,100-0002, Shibuya-ku, Tokyo 〇〇〇, 03-3234-5678
Ishida, Jiro, 2000/4 / 2,274-16, Enoshima, Fujisawa City, Kanagawa Prefecture 〇〇〇, 03-9999-9999
Ishida, Hanako, 1985/6 / 2,352-725, Minato-ku, Tokyo 〇〇〇, 03-1111-9999
Sato, Taro, 2001/5 / 1,100-0002, Chiyoda-ku, Tokyo 〇〇〇, 03-3234-5678
Sato, in the following example 18, the following are read as a string S 1.
Ro, 2001/6 / 2,274-16, Enoshima, Fujisawa City, Kanagawa Prefecture 〇〇〇, 03-9999-9999
Sato, Hanako, 2002/7 / 2,352-725, Shinjuku, Shinjuku-ku, Tokyo 〇〇〇, 03-1111-9999
Tanaka, Taro, 2001/1 / 1,100-0002, Chiyoda-ku, Tokyo 〇〇〇, 03-1234-5678
Tanaka, Jiro, 2001/1 / 2,251-0036, Fujisawa, Kanagawa Prefecture Enoshima thousand reading unit 1261-q stores the string S i in the area of the file buffer size f secured in the main memory 123 (FIG. 13 step S1261b-q, R i in FIG. 14) of the.
文字列Siがメインメモリ123に格納された後、ファイル読み込みロック解除部1267−qがスレッドi+1のファイル読み込みロックを解除する(図13のステップS1267−q、図14のURi+1)。After the character string S i is stored in the
パース部2262−qはメインメモリ123から読み出した文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図17に例示した文字列S0の場合、パース部2262−qは、文字列S0をパースしてセル「石田」「太郎」「1990/2/8」「100-0002」「東京都渋谷区〇〇〇」「03-3234-5678」「石田」「次郎」「2000/4/2」「274-16」「神奈川県藤沢市江の島〇〇〇」「03-9999-9999」「石田」「花子」「1985/6/2」「352-725」「東京都港区区〇〇〇」「03-1111-9999」「佐藤」「太郎」「2001/5/1」「100-0002」「東京都千代田区〇〇〇」「03-3234-5678」「佐藤」を特定し、それらの参照情報を計算する。最後の「次」の終端はセルの終端ではないため、スレッド0では「次」の参照情報は計算されない。例えば、図17に例示した文字列S0の場合、パース部2262−qは、文字列S1をパースしてセル「2001/6/2」「274-16」「神奈川県藤沢市江の島〇〇〇」「03-9999-9999」「佐藤」「花子」「2002/7/2」「352-725」「東京都新宿区新宿〇〇〇」「03-1111-9999」「田中」「太郎」「2001/1/1」「100-0002」「東京都千代田区〇〇〇」「03-1234-5678」「田中」「次郎」「2001/1/2」「251-0036」を特定し、それらの参照情報を計算する。最初の「郎」の始端はセルの始端ではなく、最後の「神奈川県藤沢市江の島〇〇〇」の終端はセルの終端ではないため、スレッド1では「郎」および「神奈川県藤沢市江の島〇〇〇」の参照情報は計算されない。なお、パース部2262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。パース部2262−qはスレッドiのバッファ境界ロックが解除される前にこの処理を開始できる。すなわち、パース部2262−qは、i≧1において、文字列Si−1に含まれる各セルの参照情報の計算が終わる前に、文字列Siに含まれる各セルの参照情報の計算を開始できる(図13のステップS2262−q、図14のPi)。Parser 2262-q parses the string S i read from the
その後、セル特定部2264−qが、スレッドiのバッファ境界ロックが解除されたか否かを判定する。スレッド0のバッファ境界ロックは初期状態で解除されている(ステップS2264a−q)。スレッドiのバッファ境界ロックが解除されていない場合にはステップS2264−qの判定が繰り返される。 After that, the cell identification unit 2264-q determines whether or not the buffer boundary lock of the thread i has been released. The buffer boundary lock of thread 0 is released in the initial state (step S2264a-q). If the buffer boundary lock of thread i is not released, the determination in step S2264-q is repeated.
一方、スレッドiのバッファ境界ロックが解除されており、かつ、i≧1である場合、セル特定部2264−qは、参照情報と文字列Si‐1と文字列Siとを用い、文字列Si‐1に含まれる最後のセルの直後に続くセルの位置に対応する情報Aiを得てメインメモリに格納する。一方、スレッドiのバッファ境界ロックが解除されており、かつ、i=0の場合、セル特定部2264−qは何もしない(ステップS2264b−q)。On the other hand, when the buffer boundary lock of the thread i is released and i ≧ 1, the cell identification unit 2264-q uses the reference information, the character string S i-1, and the character string S i , and the character is displayed. obtains information a i corresponding to the position of the cell immediately following the last cell of the column contains S i-1 stored in the main memory. On the other hand, when the buffer boundary lock of thread i is released and i = 0, the cell identification unit 2264-q does nothing (step S2264b-q).
その後、バッファ境界ロック解除部1268−qがスレッドi+1のバッファ境界ロックを解除する。ただし、i+1>Tに対応するスレッドは存在せず、存在しないスレッドのバッファ境界ロックは解除されない(図13のステップS1268−q、図14のUBi+1)。After that, the buffer boundary unlocking unit 1268-q releases the buffer boundary lock of thread i + 1. However, the thread corresponding to i + 1> T does not exist, and the buffer boundary lock of the nonexistent thread is not released (step S1268-q in FIG. 13, UB i + 1 in FIG. 14).
その後、処理部126−qに代えて処理部226−qのエンコード部1265−qおよび演算部1266−qが、第1実施形態で説明したステップS1265−q,S1266−q,S1269−qの処理を実行する(図13のステップS1265−q,S1266−q,S1269−q、図14のEi,SSi,UPi+np)。After that, instead of the processing unit 126-q, the encoding unit 1265-q and the calculation unit 1266-q of the processing unit 226-q perform the processing of steps S1265-q, S1266-q, and S1269-q described in the first embodiment. (Steps S1265-q, S1266-q, S1269-q in FIG. 13, E i , SS i , UP i + np in FIG. 14).
[その他の変形例等] [Other variants]
なお、本発明は上述の実施形態に限定されるものではない。例えば、第1実施形態および第2実施形態では、パラメータ設定装置が1つの単位処理で扱われるレコード数r、並列数np、ファイルバッファサイズfを設定したが、パラメータ設定装置がファイルバッファサイズfを設定しない実施形態であってもよい。また、第1実施形態および第2実施形態では、テキストファイルとしてCSV(Comma-Separated Values)ファイルを例示したが、前述したその他のテキストファイルに対する処理が行われてもよい。さらに、第1実施形態および第2実施形態では、「演算」として秘密分散を行う例を説明したが、「演算」としてその他の演算が行われてもよい。The present invention is not limited to the above-described embodiment. For example, in the first embodiment and the second embodiment, the parameter setting device sets the number of records r, the number of parallels n p , and the file buffer size f handled in one unit processing, but the parameter setting device sets the file buffer size f. It may be an embodiment in which is not set. Further, in the first embodiment and the second embodiment, the CSV (Comma-Separated Values) file is exemplified as the text file, but the other text files described above may be processed. Further, in the first embodiment and the second embodiment, an example in which secret sharing is performed as an "operation" has been described, but other operations may be performed as an "operation".
上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。 The various processes described above are not only executed in chronological order according to the description, but may also be executed in parallel or individually as required by the processing capacity of the device that executes the processes. In addition, it goes without saying that changes can be made as appropriate without departing from the spirit of the present invention.
上記の各装置は、例えば、CPU(central processing unit)等のプロセッサ(ハードウェア・プロセッサ)およびRAM(random-access memory)・ROM(read-only memory)等のメモリ等を備える汎用または専用のコンピュータが所定のプログラムを実行することで構成される。このコンピュータは1個のプロセッサやメモリを備えていてもよいし、複数個のプロセッサやメモリを備えていてもよい。このプログラムはコンピュータにインストールされてもよいし、予めROM等に記録されていてもよい。また、CPUのようにプログラムが読み込まれることで機能構成を実現する電子回路(circuitry)ではなく、プログラムを用いることなく処理機能を実現する電子回路を用いて一部またはすべての処理部が構成されてもよい。1個の装置を構成する電子回路が複数のCPUを含んでいてもよい。 Each of the above devices is, for example, a general-purpose or dedicated computer including a processor (hardware processor) such as a CPU (central processing unit) and a memory such as a RAM (random-access memory) and a ROM (read-only memory). Is composed of executing a predetermined program. This computer may have one processor and memory, or may have a plurality of processors and memory. This program may be installed in a computer or may be recorded in a ROM or the like in advance. Further, a part or all of the processing units are configured by using an electronic circuit that realizes a processing function without using a program, instead of an electronic circuit (circuitry) that realizes a function configuration by reading a program like a CPU. You may. The electronic circuits constituting one device may include a plurality of CPUs.
上述の構成をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。このプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体の例は、非一時的な(non-transitory)記録媒体である。このような記録媒体の例は、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等である。 When the above configuration is realized by a computer, the processing contents of the functions that each device should have are described by a program. By executing this program on a computer, the above processing function is realized on the computer. The program describing the processing content can be recorded on a computer-readable recording medium. An example of a computer-readable recording medium is a non-transitory recording medium. Examples of such recording media are magnetic recording devices, optical disks, opto-magnetic recording media, semiconductor memories, and the like.
このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD−ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 The distribution of this program is performed, for example, by selling, transferring, renting, or the like a portable recording medium such as a DVD or CD-ROM on which the program is recorded. Further, the program may be stored in the storage device of the server computer, and the program may be distributed by transferring the program from the server computer to another computer via a network.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。処理の実行時、このコンピュータは、自己の記憶装置に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。 A computer that executes such a program first, for example, first stores a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. When executing the process, the computer reads the program stored in its own storage device and executes the process according to the read program. Another form of execution of this program may be for the computer to read the program directly from a portable recording medium and perform processing according to the program, and each time the program is transferred from the server computer to this computer. , Sequentially, the processing according to the received program may be executed. Even if the above processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition without transferring the program from the server computer to this computer. Good.
コンピュータ上で所定のプログラムを実行させて本装置の処理機能が実現されるのではなく、これらの処理機能の少なくとも一部がハードウェアで実現されてもよい。 Instead of executing a predetermined program on a computer to realize the processing functions of the present device, at least a part of these processing functions may be realized by hardware.
1,2 演算システム
11 パラメータ設定装置
12,22 演算装置
13−1〜13−N サーバ装置1,2
以下、本発明の実施形態を説明する。
[概要]
まず概要を説明する。
<テキストファイル>
各実施形態ではテキストファイルの文字列に対する演算処理を行う。このテキストファイルはW個のレコードを含み、レコードのそれぞれは任意長のG個のセルを含み、セルのそれぞれは任意個の文字を含む。ただし、各セルの長さには各セルの属性に応じた上限がある。WおよびGが1以上の整数である。例えば、WおよびGの少なくとも一方は2以上の整数である。Wが2以上の整数であってもよいし、Gが2以上の整数であってもよいし、WおよびGの両方が2以上の整数であってもよい。Wが2以上の整数である場合、互いに隣接するレコードの間にはレコードの区切りを特定するための情報が存在する。例えば、互いに隣接するレコードの間に改行が存在し、複数のレコードは改行によって互いに区切られている。また、Gが2以上の整数である場合、互いに隣接するセルの間にはセル間の区切りを特定するための情報が存在する。例えば、互いに隣接するセルの間に区切り文字または改行が存在し、複数のセルは区切り文字または改行によって互いに区切られている。区切り文字の例はカンマ「,」である。その他の例として、互いに隣接するセルの間にタブまたは改行が存在してもよいし、互いに隣接するセルの間に半角スペースまたは改行が存在してもよい。Wが2以上の整数である場合、各レコードに含まれるセルの個数Gは互いに同一である。各レコードのG個のセルは属性情報(「スキーマ」とも呼ぶ)に対応している。属性情報は各セルがどのような属性の情報であるかを表しており、少なくとも各セルで表される文字列のサイズ(データ量)の最大値と最小値とを特定または推定するための情報を含んでいる。例えば、属性情報はセルがどのような有限集合の元を表しているのか示す情報を含んでいる。例えば、属性情報は「セルがpを法とした剰余(mod p)を表していること(pは正整数)」を表していてもよいし、「セルが所定個(例えば10個)の所定の有限体(例えば拡大体GF(28))の要素で表現される文字列であること」を表していてもよいし、「セルが所定の整数型の整数(例えば、符号付き32ビット整数)を表す文字列であること」を表していてもよい。G個の属性情報のそれぞれが各レコードのG個のセルのそれぞれに一対一で対応していてもよいし(すなわち、1個の属性情報が1個のセルの属性を表していてもよい)、1個の属性情報が各レコードの複数個(例えばG個)のセルに対応していてもよい(すなわち、1個の属性情報が複数個のセルの属性を表していてもよい)。前者の場合、1つのレコードに属する複数のセルの属性が互いに異なっていてもよいし、互いに同一であってもよい。また、Wが2以上の整数である場合、すべてのレコードのG個のセルに対応する「G個の属性の組」は互いに同一である。すなわち、すべてのレコードが有するg番目(ただし、g=1,…,G)のセルの属性att(g)は互いに同一である。その他、属性情報がセルが表す情報の種別を表現していてもよい。また属性情報はテキストファイルに含まれていてもよいし(例えば、テキストファイルのヘッダが属性情報あってもよい)、含まれていなくてもよい。テキストファイルの例は、CSV(Comma-Separated Values)ファイル、TSV(tab-separated values)ファイル、SSV(space-separated values)ファイルなどである。これらはCSV(character-separated values)ファイルやDSV(delimiter-separated values)ファイルとして総称される。
Hereinafter, embodiments of the present invention will be described.
[Overview]
First, an outline will be described.
<Text file>
In each embodiment, arithmetic processing is performed on the character string of the text file. This text file contains W records, each of which contains G cells of arbitrary length, and each of the cells contains any number of characters. However, the length of each cell has an upper limit according to the attribute of each cell. W and G are integers greater than or equal to 1. For example, at least one of W and G is an integer greater than or equal to 2. W may be an integer of 2 or more, G may be an integer of 2 or more, and both W and G may be an integer of 2 or more. When W is an integer of 2 or more, there is information for specifying the record delimiter between the records adjacent to each other. For example, there is a line break between records adjacent to each other, and a plurality of records are separated from each other by a line break. Further, when G is an integer of 2 or more, there is information for specifying the delimiter between cells between cells adjacent to each other. For example, there is a delimiter or newline between cells adjacent to each other, and multiple cells are separated from each other by the delimiter or newline. An example of a delimiter is the comma ",". As another example, there may be tabs or line breaks between cells adjacent to each other, and half-width spaces or line breaks may exist between cells adjacent to each other. When W is an integer of 2 or more, the number G of cells included in each record is the same as each other. The G cells of each record correspond to the attribute information (also called "schema"). The attribute information represents what kind of attribute information each cell has, and is information for specifying or estimating at least the maximum value and the minimum value of the size (data amount) of the character string represented by each cell. Includes. For example, attribute information contains information indicating what kind of finite set of elements a cell represents. For example, the attribute information may represent "a cell represents a remainder (mod p) modulo p (p is a positive integer)" or "a predetermined number of cells (for example, 10)". it may represent "things is an element string represented by the finite field (for example, extension field GF (2 8)), the integer" cell is a predetermined integer (e.g., signed 32-bit integer ) Is a character string. ” Each of the G attribute information may have a one-to-one correspondence with each of the G cells of each record (that is, one attribute information may represent the attribute of one cell). One attribute information may correspond to a plurality of cells (for example, G cells) of each record (that is, one attribute information may represent an attribute of a plurality of cells). In the former case, the attributes of a plurality of cells belonging to one record may be different from each other or may be the same as each other. When W is an integer of 2 or more, the "set of G attributes" corresponding to G cells of all records are the same as each other. That is, the attribute att (g) of the gth cell (where g = 1, ..., G) possessed by all the records is the same as each other. In addition, the attribute information may represent the type of information represented by the cell. Further, the attribute information may or may not be included in the text file (for example, the header of the text file may include the attribute information). Examples of text files are CSV (Comma-Separated Values) files, TSV (tab-separated values) files, SSV (space-separated values) files , and the like. These are collectively referred to as CSV (character-separated values) files and DSV (delimiter-separated values) files.
上述した「エンコード」および「演算」はテキストファイルのrレコード分の文字列である処理単位文字列ごとに実行される。処理単位文字列ごとに実行される処理を「単位処理」と呼ぶことにする。処理単位算出部は1回の単位処理で処理されるレコード数rを表す「C/(Scsv+Senc+Sref)の関数値」を得て(レコード数rとしてC/(Scsv+Senc+Sref)の関数値を得て)出力する。キャッシュメモリサイズCは、予め定められたものであってもよいし、入力されたものであってもよい。最大値Scsvは最大サイズ設定部で得られたものであり、最大値Sencはエンコードサイズ設定部で得られたものであり、合計サイズSrefは参照サイズ設定部で得られたものである。「αの関数値」はαそのものであってもよいし、αに対応するその他の値であってもよい。「αの関数値」の例は、α以上の最小の整数、α以下の最大の整数、αに最も近い整数などである。例えば、r=C/(Scsv+Senc+Sref)であってもよいし、r=ROUNDUP(C/(Scsv+Senc+Sref))であってもよいし、r=ROUNDDOWN(C/(Scsv+Senc+Sref))であってもよいし、r=ROUND(C/(Scsv+Senc+Sref))であってもよい。ただし、ROUNDUP(α)はαを整数値に切り上げる切り上げ関数であり、ROUNDDOWN(α)はαを整数値に切り捨てる切り捨て関数であり、ROUND(α)はαをαに最も近い整数に丸める丸め関数である。ここで、Scsv+Senc+Srefは、処理部が、テキストファイルから1レコード分の文字列を読み込み、参照情報を参照しながら、エンコード情報にエンコードして秘密分散などの「演算」を行うまでの処理(以下、「1レコード分の一連の処理」という)のために必要なメモリサイズを表す。このメモリサイズがキャッシュメモリサイズ以下であれば、途中でメインメモリからデータを読み込むことなく高速に1レコード分の一連の処理を実行できる。C/(Scsv+Senc+Sref)は、何回分の「1レコード分の一連の処理」に必要なメモリサイズ(Scsv+Senc+Sref)をキャッシュメモリに確保できるかを表すものである。C/(Scsv+Senc+Sref)に対応するレコード数rの文字列を処理単位文字列とすることで、rレコード分の処理を行う際のメインメモリへのアクセス回数を削減し、高速に演算を行うことができる。 The above-mentioned "encoding" and "operation" are executed for each processing unit character string which is a character string for r records of a text file. Processing The processing executed for each unit character string is called "unit processing". The processing unit calculating section represents the record number r to be processed in unit process once to obtain the "C / function value of (S csv + S enc + S ref) " (C / (S csv + S as a record number r enc + S Obtain the function value of ref) and output it. The cache memory size C may be a predetermined one or may be an input one. The maximum value S csv is obtained by the maximum size setting unit, the maximum value Senc is obtained by the encoding size setting unit, and the total size S ref is obtained by the reference size setting unit. .. The "function value of α" may be α itself or another value corresponding to α. Examples of "function values of α" are the smallest integer greater than or equal to α, the largest integer less than or equal to α, and the integer closest to α. For example, r = C / (S csv + S enc + S ref ), r = ROUNDUP (C / (S csv + S enc + S ref )), or r = ROUNDDOWN It may be (C / (S csv + S enc + S ref )) or r = ROUND (C / (S csv + S enc + S ref )). However, ROUNDUP (α) is a rounding function that rounds up α to an integer value, ROUNDDOWN (α) is a rounding function that rounds down α to an integer value, and ROUND (α) is a rounding function that rounds α to the integer closest to α. Is. Here, in S csv + Senc + Sref , until the processing unit reads the character string for one record from the text file, encodes it into the encoded information while referring to the reference information, and performs "calculation" such as secret sharing. Represents the memory size required for the processing (hereinafter referred to as "a series of processing for one record"). If this memory size is less than or equal to the cache memory size, a series of processes for one record can be executed at high speed without reading data from the main memory on the way. C / ( Scsv + Senc + Sref ) indicates how many times the memory size (Scsv + Senc + Sref ) required for "a series of processing for one record" can be secured in the cache memory. By using the character string of the number of records r corresponding to C / (S csv + Senc + Sref ) as the processing unit character string, the number of accesses to the main memory when processing r records is reduced and the speed is increased. Can perform operations.
i≧1の場合、文字列Siは文字列Si‐1の直後に続く文字列である。i≧1の場合、セル特定部は、スレッドiのバッファ境界ロックが解除された後、参照情報と文字列Si‐1と文字列Siとを用い、文字列Si‐1に含まれる最後のセルの直後に続くセルの位置に対応する情報Aiを得てメインメモリに格納する。情報Aiは、例えば、文字列Si‐1に含まれる最後のセルの直後に続くセルが属するレコードを表す情報と当該セルに対応する属性を表す情報(例えば、当該レコードの最初から何番目の属性に対応するかを表す情報)であってもよいし、文字列Si‐1に含まれる最後のセルの直後に続くセルの位置および長さを表す情報であってもよい。文字列Si‐1の終端がセルの終端である場合には文字列Siの先頭のセルが「文字列Si‐1に含まれる最後のセルの直後に続くセル」となる。この場合には情報Aiのメインメモリへの格納が省略されてもよい。一方、文字列Si‐1の終端がセルの終端でない場合、セル特定部は文字列Si‐1と文字列Siとを用い、「文字列Si‐1に含まれる最後のセルの直後に続くセル」を生成して情報Aiを得る。これにより、パース部が特定できなかったセルの位置に対応する情報が得られる。参照情報と情報Aiとによってテキストファイルの各セルが属するレコードと当該セルに対応する属性(例えば、当該レコードの最初から何番目の属性であるかを表す情報)とを特定できる。なお、i=0の場合、セル特定部は何もしない。 When i ≧ 1, the character string S i is a character string immediately following the character string S i-1. When i ≧ 1, the cell identification part is included in the character string S i-1 by using the reference information, the character string S i-1 and the character string S i -1 after the buffer boundary lock of the thread i is released. stored in the main memory to obtain information a i corresponding to the position of the cell immediately following the last cell. Information A i is, for example, information representing a record to which a cell immediately following the last cell included in the character string S i-1 belongs and information representing an attribute corresponding to the cell (for example, the number from the beginning of the record). Information indicating whether or not it corresponds to the attribute of), or information indicating the position and length of the cell immediately following the last cell included in the character string Si-1. When the end of the character string S i-1 is the end of the cell, the first cell of the character string S i becomes "the cell immediately following the last cell included in the character string S i-1". In this case, the storage of the information Ai in the main memory may be omitted. On the other hand, if the end of the string S i-1 is not the end of the cell, the cell specific portion using a string S i-1 and the string S i, of the last cell included in the "string S i-1 obtain information a i generates a cell "immediately following. As a result, information corresponding to the position of the cell whose perspective portion could not be specified can be obtained. The record to which each cell of the text file belongs and the attribute corresponding to the cell (for example, information indicating the number of the attribute from the beginning of the record) can be specified by the reference information and the information Ai. When i = 0, the cell specific part does nothing.
一方、スレッドiのバッファ境界ロックが解除されている場合、パース部1262−qはi≧1であるか否かを判定する(ステップS1262b−q)。i≧1でない場合(すなわち、i=0の場合)、パース部1262−qは、メインメモリ123から読み出した文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図11に例示した文字列S0の場合、パース部1262−qは、文字列S0をパースしてセル「石田」「太郎」「1990/2/8」「100-0002」「sjeifdfgjrrf」「45dkfjkejdf5」「石田」「次郎」「1985/5/2」「111-0112」「25df4d4ed」「1s4dlccclseed」「石田」「花子」「2001/4/8」「111-2222」「5d4e4d4ffg」「skekdjjfaae」「佐藤」「太郎」「1992/7/11」「111-0345」「dlekd4f3e」を特定し、それらの参照情報を計算する。最後の「“4selddks“」の終端はセルの終端ではないため、スレッド0では「“4selddks“」の参照情報は計算されない。パース部1262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。その後、処理がステップS1268−qに進む(図7のステップS1262c−q、図8のPi)。一方、i≧1である場合、パース部1262−qは、スレッドi−1でのパース結果(特定された各セルの参照情報およびセルに含まれない文字を特定する情報)をメインメモリ123から読み込み、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字を特定する。文字列Si−1の終端がセルの終端である場合には、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字は存在しない(ステップS1262d−q)。次にパース部1262−qは、メインメモリ123から文字列Siを読み出し、スレッドi−1で特定されたセルに含まれない文字と文字列Siとを結合した文字列をパースし、この文字列に含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。文字列Si−1の終端がセルの終端である場合には、パース部1262−qは文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図11および図12に例示した文字列S0およびS1の場合、パース部1262−qは、文字列Si−1のうちスレッドi−1で特定されたセルに含まれない文字「“4selddks“」と文字列Si−1とを結合した文字列
“4selddks““k304kdkk400-03d”
“佐藤”,“次郎”,“1989/8/21”,“123-0434”,“dkesopd445e”,“4ssjdejdoseae3230dds”
“佐藤”,“花子”,“1995/2/3”,“145-0234”,“skdeofl4s3d3”,“skek94kdskd4dc”
“田中”,“太郎”,“1992/3/23”,“134-0134”,“dj394949495kf”,“47s52\n5412485d”
“田中”,“次郎”,“1979/4/21”,“11
をパースし、この文字列に含まれる各セル「4selddks““k304kdkk400-03d」「佐藤」「次郎」「1989/8/21」「123-0434」「dkesopd445e」「4ssjdejdoseae3230dds」「佐藤」「花子」「1995/2/3」「145-0234」「skdeofl4s3d3」「skek94kdskd4dc」「田中」「太郎」「1992/3/23」「134-0134」「dj394949495kf」「47s52\n5412485d」「田中」「次郎」「1979/4/21」の位置および長さを表す参照情報を計算してメインメモリ123に格納する。最後の“11の終端はセルの終端ではないため、スレッド1では“11の参照情報は計算されない。パース部1262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。その後、処理がステップS1268−qに進む(図7のステップS1262e−q、図8のPi)。
On the other hand, when the buffer boundary lock of the thread i is released, the parsing unit 1262-q determines whether or not i ≧ 1 (step S1262b−q). If not i ≧ 1 (i.e., the case of i = 0), parser 1262-q parses the string S i read from the
“Sato”, “Jiro”, “1989/8/21”, “123-0434”, “dkesopd445e”, “4ssjdejdoseae3230dds”
“Sato”, “Hanako”, “1995/2/3”, “145-0234”, “skdeofl4s3d3”, “skek94kdskd4dc”
"Tanaka", "Taro", "1992/3/23", "134-0134", "dj394949495kf", "47s52 \ n5412485d"
"Tanaka", "Jiro", "1979/4/21", "11"
And each cell included in this string "4selddks""k304kdkk400-03d""Sato""Jiro""1989/8/21""123-0434""dkesopd445e""4ssjdejdoseae3230dds""Sato""Hanako""1995/2/3""145-0234""skdeofl4s3d3""skek94kdskd4dc""Tanaka""Taro""1992/3/23""134-0134""dj394949495kf""47s52 \ n5412485d""Tanaka""Jiro" The reference information indicating the position and length of "1979/4/21" is calculated and stored in the
演算部1266−qは、キャッシュメモリ1260−qから読み出したエンコード情報Ei,jの秘密分散を行って秘密分散値(演算値)SSi,jを得てメインメモリ123に格納する。この際、処理単位文字列PSi,jに対応するrレコード分の参照情報をメインメモリ123に格納しておく必要はないため、秘密分散値SSi,0,…,SSi,J−1がこのrレコード分の参照情報が格納されていた領域に上書きされてもよい(図7のステップS1265−q、図8のSSi)。
The calculation unit 1266-q performs secret sharing of the encoding information E i and j read from the cache memory 1260-q, obtains the secret sharing value (calculation value) SS i and j , and stores them in the
図3に例示するように、演算装置22は、入力部121a、出力部121b、補助記憶部122、メインメモリ123、制御部125、および処理部226−1〜226−Qを有する。ただし、Qは2以上の整数である。演算装置12は、制御部125の制御の下で各処理を実行する。
As illustrated in FIG. 3, the
図4に例示するように、処理部226−q(ただし、q=1,…,Q)は、キャッシュメモリ1260−q、読み込み部1261−q、パース部2262−q、セル特定部2264−q、エンコード部1265−q、演算部1266−q、ファイル読み込みロック解除部1267−q、バッファ境界ロック解除部1268−q、および並列性ロック解除部1269−qを有する。
As illustrated in FIG. 4, the
一方、スレッドiのファイル読み込みロックおよび並列性ロックの両方が解除されている場合、読み込み部1261−qは、メインメモリ123からファイルバッファサイズfを読み込み、メインメモリ123にファイルバッファサイズfの領域を確保する。さらに、読み込み部1261−qは、補助記憶部122に格納されたテキストファイルの文字列からファイルバッファサイズfの領域に格納可能な文字列Siを読み込む。図17の例では、文字列S0として以下が読み込まれる。
石田,太郎,1990/2/8,100-0002,東京都渋谷区〇〇〇,03-3234-5678
石田,次郎,2000/4/2,274-16,神奈川県藤沢市江の島〇〇〇,03-9999-9999
石田,花子,1985/6/2,352-725,東京都港区〇〇〇,03-1111-9999
佐藤,太郎,2001/5/1,100-0002,東京都千代田区〇〇〇,03-3234-5678
佐藤,次
図18の例では、文字列S1として以下が読み込まれる。
郎,2001/6/2,274-16,神奈川県藤沢市江の島〇〇〇,03-9999-9999
佐藤,花子,2002/7/2,352-725,東京都新宿区新宿〇〇〇,03-1111-9999
田中,太郎,2001/1/1,100-0002,東京都千代田区〇〇〇,03-1234-5678
田中,次郎,2001/1/2,251-0036,神奈川県藤沢市江の島〇〇〇
読み込み部1261−qは、メインメモリ123に確保したファイルバッファサイズfの領域に文字列Siを格納する(図13のステップS1261b−q、図14のRi)。
On the other hand, when both the file read lock and the concurrency lock of thread i are released, the read unit 1261-q reads the file buffer size f from the
Ishida, Taro, 1990/2 / 8,100-0002, Shibuya-ku, Tokyo 〇〇〇, 03-3234-5678
Ishida, Jiro, 2000/4 / 2,274-16, Enoshima, Fujisawa City, Kanagawa Prefecture 〇〇〇, 03-9999-9999
Ishida, Hanako, 1985/6 / 2,352-725, Minato- ku , Tokyo 〇〇〇, 03-1111-9999
Sato, Taro, 2001/5 / 1,100-0002, Chiyoda-ku, Tokyo 〇〇〇, 03-3234-5678
Sato, in the following example 18, the following are read as a string S 1.
Ro, 2001/6 / 2,274-16, Enoshima, Fujisawa City, Kanagawa Prefecture 〇〇〇, 03-9999-9999
Sato, Hanako, 2002/7 / 2,352-725, Shinjuku, Shinjuku-ku, Tokyo 〇〇〇, 03-1111-9999
Tanaka, Taro, 2001/1 / 1,100-0002, Chiyoda-ku, Tokyo 〇〇〇, 03-1234-5678
Tanaka, Jiro, 2001/1 / 2,251-0036, Fujisawa, Kanagawa Prefecture Enoshima thousand reading unit 1261-q stores the string S i in the area of the file buffer size f secured in the main memory 123 (FIG. 13 step S1261b-q, R i in FIG. 14) of the.
パース部2262−qはメインメモリ123から読み出した文字列Siをパースし、文字列Siに含まれる各セルの位置および長さを表す参照情報を計算してメインメモリ123に格納する。例えば、図17に例示した文字列S0の場合、パース部2262−qは、文字列S0をパースしてセル「石田」「太郎」「1990/2/8」「100-0002」「東京都渋谷区〇〇〇」「03-3234-5678」「石田」「次郎」「2000/4/2」「274-16」「神奈川県藤沢市江の島〇〇〇」「03-9999-9999」「石田」「花子」「1985/6/2」「352-725」「東京都港区〇〇〇」「03-1111-9999」「佐藤」「太郎」「2001/5/1」「100-0002」「東京都千代田区〇〇〇」「03-3234-5678」「佐藤」を特定し、それらの参照情報を計算する。最後の「次」の終端はセルの終端ではないため、スレッド0では「次」の参照情報は計算されない。例えば、図18に例示した文字列S 1 の場合、パース部2262−qは、文字列S1をパースしてセル「2001/6/2」「274-16」「神奈川県藤沢市江の島〇〇〇」「03-9999-9999」「佐藤」「花子」「2002/7/2」「352-725」「東京都新宿区新宿〇〇〇」「03-1111-9999」「田中」「太郎」「2001/1/1」「100-0002」「東京都千代田区〇〇〇」「03-1234-5678」「田中」「次郎」「2001/1/2」「251-0036」「神奈川県藤沢市江の島〇〇〇」を特定し、それらの参照情報を計算する。最初の「郎」の始端はセルの始端ではないため、スレッド1では「郎」の参照情報は計算されない。なお、パース部2262−qは、メインメモリ123に参照情報を格納する領域が足りなくなったときに、メインメモリ123からrを読み込み、rレコード分の参照情報を格納するためのバッファ領域をメインメモリ123にまとめて確保する。パース部2262−qはスレッドiのバッファ境界ロックが解除される前にこの処理を開始できる。すなわち、パース部2262−qは、i≧1において、文字列Si−1に含まれる各セルの参照情報の計算が終わる前に、文字列Siに含まれる各セルの参照情報の計算を開始できる(図13のステップS2262−q、図14のPi)。
Parser 2262-q parses the string S i read from the
その後、セル特定部2264−qが、スレッドiのバッファ境界ロックが解除されたか否かを判定する。スレッド0のバッファ境界ロックは初期状態で解除されている(ステップS2264a−q)。スレッドiのバッファ境界ロックが解除されていない場合にはステップS2264a−qの判定が繰り返される。 After that, the cell identification unit 2264-q determines whether or not the buffer boundary lock of the thread i has been released. The buffer boundary lock of thread 0 is released in the initial state (step S2264a-q). If the buffer boundary lock of thread i is not released, the determination in step S2264 a-q is repeated.
その後、処理部126−qに代えて処理部226−qのエンコード部1265−qおよび演算部1266−qが、第1実施形態で説明したステップS1263−q,S1265−q,S1269−qの処理を実行する(図13のステップS1263−q,S1265−q,S1269−q、図14のEi,SSi,UPi+np)。 After that, instead of the processing unit 126-q, the encoding unit 1265-q and the calculation unit 1266-q of the processing unit 226-q perform the steps S1263-q, S1265-q , and S1269-q described in the first embodiment. process is executed (step S1263-q, S1265-q in FIG. 13, S 1269-q, E i in FIG. 14, SS i, UP i + np).
Claims (11)
前記テキストファイルはW個のレコードを含み、前記レコードのそれぞれは任意長のG個のセルを含み、前記セルのそれぞれは任意個の文字を含み、WおよびGが1以上の整数であり、前記G個のセルは属性情報に対応しており、
Cがキャッシュメモリサイズ、Mがメインメモリサイズであり、
前記属性情報を入力として前記テキストファイルの1レコード分の文字列のサイズの最大値Scsvを設定する最大サイズ設定部と、
前記属性情報を入力として前記1レコード分の文字列のサイズの最小値scsvを設定する最小サイズ設定部と、
前記1レコード分の文字列を所定の有限集合の元にエンコードして得られるエンコード情報の合計サイズの最大値Sencを設定するエンコードサイズ設定部と、
前記1レコード分の前記エンコード情報に特定の演算を行って得られる演算値の合計サイズの最大値Sssを設定する演算サイズ設定部と、
前記1レコード分の前記セルそれぞれの位置および長さを表す参照情報の合計サイズSrefを設定する参照サイズ設定部と、
前記エンコードおよび前記演算は前記テキストファイルのrレコード分の文字列である処理単位文字列ごとに実行される処理であり、レコード数rとしてC/(Scsv+Senc+Sref)の関数値を得る処理単位算出部と、
Iが前記処理単位文字列ごとに実行される前記エンコードおよび前記演算の繰り返し回数の最大値であり、Sref≧Sssのときmax(Sref,Sss)=Srefであり、Sref<Sssのときmax(Sref,Sss)=Sssであり、f0がscsv・M/(scsv+Senc+max(Sref,Sss))の関数値であり、前記演算処理における並列数npとしてf0/I・r・Scsvの関数値を得る並列数算出部と、
を有するパラメータ設定装置。It is a parameter setting device for arithmetic processing on character strings in text files.
The text file contains W records, each of the records contains G cells of arbitrary length, each of the cells contains arbitrary characters, and W and G are integers of 1 or more. G cells correspond to attribute information,
C is the cache memory size, M is the main memory size,
A maximum size setting unit that sets the maximum value Scsv of the size of the character string for one record of the text file by inputting the attribute information, and
A minimum size setting unit that sets the minimum value s csv of the size of the character string for one record by inputting the attribute information, and
An encoding size setting unit that sets the maximum value Sensor of the total size of the encoding information obtained by encoding the character string for one record based on a predetermined finite set, and
An operation size setting unit that sets the maximum value Sss of the total size of the operation values obtained by performing a specific operation on the encoding information for one record, and
A reference size setting unit for setting the total size Sref of reference information representing the position and length of each of the cells for one record, and a reference size setting unit.
The encoding and the operation are processes executed for each processing unit character string which is a character string for r records of the text file, and a function value of C / (Scsv + Senc + Sref) is obtained as the number of records r. Processing unit calculation unit and
I is the maximum value of the encoding and the number of iterations of the operations are performed for each of the processing units string is S ref ≧ S when the ss max (S ref, S ss ) = S ref, S ref < when S ss max (S ref, S ss) a = S ss, a function value of f 0 is s csv · M / (s csv + S enc + max (S ref, S ss)), in the arithmetic processing A parallel number calculation unit that obtains a function value of f 0 / I · r · S csv as a parallel number n p, and a parallel number calculation unit.
Parameter setting device having.
前記演算処理の際に前記テキストファイルの文字列からまとめて読み込まれるデータのファイルバッファサイズfとしてf0/npの関数値を得るバッファサイズ算出部をさらに有するパラメータ設定装置。The parameter setting device according to claim 1.
A parameter setting device further including a buffer size calculation unit that obtains a function value of f 0 / np as a file buffer size f of data collectively read from a character string of the text file during the arithmetic processing.
前記繰り返し回数の最大値Iは、前記処理単位文字列の前記エンコードおよび前記演算を行うための合計処理量に対する前処理の合計処理量の比率が所定値以下となるように定められている、パラメータ設定装置。The parameter setting device according to claim 1 or 2.
The maximum value I of the number of iterations is a parameter defined so that the ratio of the total processing amount of the preprocessing to the total processing amount for performing the encoding and the operation of the processing unit character string is equal to or less than a predetermined value. Setting device.
前記テキストファイルはW個のレコードを含み、前記レコードのそれぞれは任意長のG個のセルを含み、前記セルのそれぞれは任意個の文字を含み、WおよびGが1以上の整数であり、fが定められたファイルバッファサイズであり、npが並列数であり、rがレコード数を表す正整数であり、iが各スレッドを表し、i∈{0,…,T−1}であり、Tが前記テキストファイルの文字列のサイズに対応するスレッド数を表す正整数であり、1≦np≦Tであり、初期状態でスレッド0のファイル読み込みロックおよびバッファ境界ロックならびにスレッド0,…,np−1の並列性ロックが解除されており、
メインメモリとキャッシュメモリと複数の処理部とを有し、
前記複数の処理部のうちスレッドiの処理を行う処理部は、
前記スレッドiのファイル読み込みロックおよび並列性ロックが解除された後、前記テキストファイルの文字列から前記ファイルバッファサイズfの領域に格納可能な文字列Siを読み込んで前記メインメモリに格納する読み込み部と、
前記文字列Siが前記メインメモリに格納された後にスレッドi+1のファイル読み込みロックを解除するファイル読み込みロック解除部と、
スレッドiのバッファ境界ロックが解除された後、前記文字列Siに含まれる各セルの位置および長さを表す参照情報を計算して前記メインメモリに格納するパース部と、
前記文字列Siに含まれる各セルの位置および長さを表す参照情報が計算された後にスレッドi+1のバッファ境界ロックを解除するバッファ境界ロック解除部と、
i=0の場合の結合文字列CS0がS0であり、i≧1の場合の結合文字列CSiが結合文字列CSi‐1の直後に前記文字列Siを結合したものであり、Jが正整数であり、j=0,…,J−1であり、前記参照情報によって特定される情報に基づいて前記結合文字列CSiに含まれる処理対象のrレコード分の文字列である処理単位文字列PSi,jを選択し、前記処理単位文字列PSi,jを所定の有限集合の元であるエンコード情報Ei,jにエンコードする処理を、前記キャッシュメモリを利用して行うエンコード部と、
前記エンコード情報Ei,jに特定の演算を行って演算値SSi,jを得て前記メインメモリに格納する処理を、前記キャッシュメモリを利用して行う演算部と、
前記演算値SSi,jが得られた後にスレッドi+npの並列性ロックを解除する並列性ロック解除部と、
を有する演算装置。An arithmetic unit that performs arithmetic processing on a character string in a text file.
The text file contains W records, each of the records contains G cells of arbitrary length, each of the cells contains any character, W and G are integers greater than or equal to 1, f. Is the defined file buffer size, n p is the number of parallels, r is a positive integer representing the number of records, i represents each thread, and i ∈ {0, ..., T-1}. T is a positive integer representing the number of threads corresponding to the size of the character string of the text file, 1 ≤ n p ≤ T, and in the initial state, the file read lock and buffer boundary lock of thread 0 and the thread 0, ..., The parallelism lock of n p -1 is released,
It has a main memory, a cache memory, and a plurality of processing units.
Of the plurality of processing units, the processing unit that performs the processing of thread i is
Wherein after a file read lock and parallelism locking thread i is released, the reading unit for storing a character string in a text file into the main memory by reading the file buffer size string S i can be stored in an area of f When,
A file read unlocking unit that unlocks the file read lock of thread i + 1 after the character string S i is stored in the main memory,
After the buffer boundary locking thread i is canceled, and a parser for the character string to calculate a reference information representative of the location and length of each cell included in the S i and stored in the main memory,
A buffer boundary unlocking unit that releases the buffer boundary lock of thread i + 1 after the reference information representing the position and length of each cell included in the character string S i is calculated.
The combined character string CS 0 when i = 0 is S 0 , and the combined character string CS i when i ≧ 1 is the combined character string S i immediately after the combined character string CS i-1 . , J is a positive integer, j = 0, ..., J-1, and is a character string for r records to be processed included in the combined character string CS i based on the information specified by the reference information. A process of selecting a certain processing unit character string PS i, j and encoding the processing unit character string PS i, j into encoding information E i, j , which is a source of a predetermined finite set, is performed using the cache memory. Encoding part to do and
A calculation unit that uses the cache memory to perform a process of performing a specific operation on the encoding information E i, j to obtain an operation value SS i, j and storing the operation value SS i, j in the main memory.
A parallelism unlocking unit that unlocks the parallelism of threads i + np after the calculated values SS i and j are obtained.
Arithmetic logic unit.
前記テキストファイルはW個のレコードを含み、前記レコードのそれぞれは任意長のG個のセルを含み、前記セルのそれぞれは任意個の文字を含み、WおよびGが1以上の整数であり、fが定められたファイルバッファサイズであり、npが並列数であり、rがレコード数を表す正整数であり、iが各スレッドを表し、i∈{0,…,T−1}であり、Tが前記テキストファイルの文字列のサイズに対応するスレッド数を表す正整数であり、1≦np≦Tであり、初期状態でスレッド0のファイル読み込みロックおよびスレッド0,…,np−1の並列性ロックが解除されており、
メインメモリとキャッシュメモリと複数の処理部とを有し、
前記複数の処理部のうちスレッドiの処理を行う処理部は、
前記スレッドiのファイル読み込みロックおよび並列性ロックが解除された後、前記テキストファイルの文字列から前記ファイルバッファサイズfの領域に格納可能な文字列Siを読み込んで前記メインメモリに格納する読み込み部と、
前記文字列Siが前記メインメモリに格納された後にスレッドi+1のファイル読み込みロックを解除するファイル読み込みロック解除部と、
前記文字列Siに含まれる各セルの位置および長さを表す参照情報を計算して前記メインメモリに格納するパース部と、
i≧1の場合、前記文字列Siは文字列Si‐1の直後に続く文字列であり、スレッドiのバッファ境界ロックが解除された後、前記参照情報と前記文字列Si‐1と前記文字列Siとを用い、前記文字列Si‐1に含まれる最後のセルの直後に続くセルの位置に対応する情報Aiを得るセル特定部と、
前記情報Aiが得られた後にスレッドi+1のバッファ境界ロックを解除するバッファ境界ロック解除部と、
i=0の場合の結合文字列CS0がS0であり、i≧1の場合の結合文字列CSiが結合文字列CSi‐1の直後に前記文字列Siを結合したものであり、Jが正整数であり、j=0,…,J−1であり、前記参照情報および前記情報Aiによって特定される情報に基づいて、前記結合文字列CSiに含まれる処理対象のrレコード分の文字列である処理単位文字列PSi,jを選択し、前記処理単位文字列PSi,jを所定の有限集合の元であるエンコード情報Ei,jにエンコードする処理を、前記キャッシュメモリを利用して行うエンコード部と、
前記エンコード情報Ei,jに特定の演算を行って演算値SSi,jを得て前記メインメモリに格納する処理を、前記キャッシュメモリを利用して行う演算部と、
前記演算値SSi,jが得られた後にスレッドi+npの並列性ロックを解除する並列性ロック解除部と、
を有する演算装置。An arithmetic unit that performs arithmetic processing on a character string in a text file.
The text file contains W records, each of the records contains G cells of arbitrary length, each of the cells contains any character, W and G are integers greater than or equal to 1, f. Is the defined file buffer size, n p is the number of parallels, r is a positive integer representing the number of records, i represents each thread, and i ∈ {0, ..., T-1}. T is a positive integer representing the number of threads corresponding to the size of the character string of the text file, 1 ≤ n p ≤ T, and the file read lock of thread 0 and thread 0, ..., n p -1 in the initial state. The parallelism lock of
It has a main memory, a cache memory, and a plurality of processing units.
Of the plurality of processing units, the processing unit that performs the processing of thread i is
Wherein after a file read lock and parallelism locking thread i is released, the reading unit for storing a character string in a text file into the main memory by reading the file buffer size string S i can be stored in an area of f When,
A file read unlocking unit that unlocks the file read lock of thread i + 1 after the character string S i is stored in the main memory,
A parsing unit to be stored in the main memory by calculating a reference information representative of the location and length of each cell included in the string S i,
When i ≧ 1, the character string S i is a character string immediately following the character string S i-1 , and after the buffer boundary lock of the thread i is released, the reference information and the character string S i-1 are released. And the cell identification part that obtains the information A i corresponding to the position of the cell immediately after the last cell included in the character string S i-1 by using the character string S i and the character string S i.
A buffer boundary unlocking unit that releases the buffer boundary lock of thread i + 1 after the information A i is obtained, and a buffer boundary unlocking unit.
The combined character string CS 0 when i = 0 is S 0 , and the combined character string CS i when i ≧ 1 is the combined character string S i immediately after the combined character string CS i-1 . , J is a positive integer, j = 0, ..., J-1, and the processing target r included in the concatenation character string CS i is based on the reference information and the information specified by the information A i. The process of selecting the processing unit character strings PS i, j , which are character strings for records, and encoding the processing unit character strings PS i, j into the encoding information E i, j , which is the source of a predetermined finite set, is described above. The encoding part that uses the cache memory and
A calculation unit that uses the cache memory to perform a process of performing a specific operation on the encoding information E i, j to obtain an operation value SS i, j and storing the operation value SS i, j in the main memory.
A parallelism unlocking unit that unlocks the parallelism of threads i + np after the calculated values SS i and j are obtained.
Arithmetic logic unit.
前記セルは単独で前記演算の対象を表すか否かを判別可能な文字のみを含み、
前記パース部は、i≧1において、前記文字列Si−1に含まれる各セルの位置および長さを表す参照情報の計算が終わる前に、前記文字列Siに含まれる各セルの位置および長さを表す参照情報の計算を開始する、演算装置。The arithmetic unit according to claim 5.
The cell contains only characters that can be determined by itself whether or not it represents the target of the operation.
In i ≧ 1, the perspective unit is the position of each cell included in the character string S i before the calculation of the reference information representing the position and length of each cell included in the character string S i-1 is completed. And an arithmetic unit that initiates the calculation of reference information representing length.
Cが前記キャッシュメモリのキャッシュメモリサイズ、Mが前記メインメモリのメインメモリサイズであり、
Scsvが前記テキストファイルの1レコード分の文字列のサイズの最大値であり、
scsvが前記1レコード分の文字列のサイズの最小値であり、
Sencが前記1レコード分の文字列を前記有限集合の元にエンコードして得られるエンコード情報の合計サイズの最大値であり、
Sssが前記1レコード分の前記エンコード情報に前記演算を行って得られる演算値の合計サイズの最大値であり、
Srefが前記1レコード分の前記セルそれぞれの位置および長さを表す参照情報の合計サイズであり、
前記レコード数rがC/(Scsv+Senc+Sref)の関数値であり、
Iが前記処理単位文字列PSi,jごとに実行される前記エンコードおよび前記演算の繰り返し回数の最大値であり、Sref≧Sssのときmax(Sref,Sss)=Srefであり、Sref<Sssのときmax(Sref,Sss)=Sssであり、f0がscsv・M/(scsv+Senc+max(Sref,Sss))の関数値であり、前記並列数npがf0/I・r・Scsvの関数値であり、
前記ファイルバッファサイズfがf0/npの関数値である、演算装置。The arithmetic unit according to any one of claims 4 to 6.
C is the cache memory size of the cache memory, M is the main memory size of the main memory, and
S csv is the maximum value of the character string size for one record of the text file.
s csv is the minimum value of the size of the character string for one record.
S enc is the maximum value of the total size of the encoded information obtained by encoding the string of the one record based on the finite set,
S ss is the maximum value of the total size of the calculated values obtained by performing the operation on the encoding information for the one record.
S ref is the total size of reference information representing the position and length of each of the cells for the one record.
The number of records r is a function value of C / (S csv + Senc + Sref).
I is the maximum number of iterations of the encoding and the calculation is performed the processing unit character string PS i, for each j, when the S ref ≧ S ss max (S ref, S ss) be a = S ref , S ref <when the S ss max (S ref, S ss) a = S ss, is a function value of f 0 is s csv · M / (s csv + S enc + max (S ref, S ss)), The parallel number n p is a function value of f 0 / I · r · Scsv.
An arithmetic unit in which the file buffer size f is a function value of f 0 / np.
前記パース部は、前記メインメモリに前記参照情報を格納する領域が足りなくなったときに、前記rレコード分の前記参照情報を格納するためのバッファ領域を前記メインメモリにまとめて確保する、演算装置。The arithmetic unit according to any one of claims 4 to 7.
The parsing unit is an arithmetic unit that collectively secures a buffer area for storing the reference information for the r record in the main memory when the area for storing the reference information becomes insufficient in the main memory. ..
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018051009 | 2018-03-19 | ||
JP2018051009 | 2018-03-19 | ||
PCT/JP2019/009597 WO2019181594A1 (en) | 2018-03-19 | 2019-03-11 | Parameter setting apparatus, calculation apparatus, methods therefor, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2019181594A1 true JPWO2019181594A1 (en) | 2021-03-11 |
JP7010365B2 JP7010365B2 (en) | 2022-01-26 |
Family
ID=67986173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020508217A Active JP7010365B2 (en) | 2018-03-19 | 2019-03-11 | Parameter setting units, arithmetic units, their methods, and programs |
Country Status (6)
Country | Link |
---|---|
US (1) | US11907641B2 (en) |
EP (1) | EP3770889B1 (en) |
JP (1) | JP7010365B2 (en) |
CN (1) | CN111868805B (en) |
AU (1) | AU2019238219B2 (en) |
WO (1) | WO2019181594A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114514569B (en) * | 2019-10-10 | 2024-03-01 | 日本电信电话株式会社 | Secret multiple iteration computing device, method, and recording medium |
JP7464555B2 (en) | 2021-03-12 | 2024-04-09 | Kddi株式会社 | Data provision device, data collection system and data provision program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001076014A (en) * | 1999-09-03 | 2001-03-23 | Kyowa Exeo Corp | Cad data file converting method and computer-readable recording medium where cad data file converting program is recorded |
JP2013101324A (en) * | 2011-10-11 | 2013-05-23 | Nippon Telegr & Teleph Corp <Ntt> | Database disturbance parameter setting device, method and program, and database disturbance system |
KR20140055093A (en) * | 2012-10-30 | 2014-05-09 | 동국대학교 산학협력단 | System and method of distrubuted data storage, restoration |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040199537A1 (en) * | 2003-04-03 | 2004-10-07 | Duff Robert Cory | System for storing and retrieving database information |
CN101271472B (en) * | 2003-09-15 | 2011-04-13 | 起元科技有限公司 | Data processing method and data processing system |
CA2922172A1 (en) * | 2004-10-25 | 2006-05-04 | Security First Corp. | Secure data parser method and system |
US20080049930A1 (en) * | 2006-08-25 | 2008-02-28 | Samsung Electronics Co., Ltd. | Method and apparatus for encrypting data |
US10515141B2 (en) * | 2012-07-18 | 2019-12-24 | Software Ag Usa, Inc. | Systems and/or methods for delayed encoding of XML information sets |
CN104615585B (en) * | 2014-01-06 | 2017-07-21 | 腾讯科技(深圳)有限公司 | Handle the method and device of text message |
US10291396B2 (en) * | 2014-10-08 | 2019-05-14 | Nippon Telegraph And Telephone Corporation | Device, method and program for detecting positions of partial character strings |
US9959069B2 (en) * | 2015-02-12 | 2018-05-01 | Microsoft Technology Licensing, Llc | Externalized execution of input method editor |
JP6753401B2 (en) * | 2015-07-24 | 2020-09-09 | 富士通株式会社 | Coding programs, coding devices, and coding methods |
JP2017059132A (en) * | 2015-09-18 | 2017-03-23 | 株式会社デンソーウェーブ | Terminal device and computer program therefor |
US10928992B2 (en) * | 2019-03-11 | 2021-02-23 | International Business Machines Corporation | HTML editing operations |
-
2019
- 2019-03-11 AU AU2019238219A patent/AU2019238219B2/en active Active
- 2019-03-11 US US16/981,064 patent/US11907641B2/en active Active
- 2019-03-11 EP EP19771212.8A patent/EP3770889B1/en active Active
- 2019-03-11 CN CN201980019927.0A patent/CN111868805B/en active Active
- 2019-03-11 JP JP2020508217A patent/JP7010365B2/en active Active
- 2019-03-11 WO PCT/JP2019/009597 patent/WO2019181594A1/en unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001076014A (en) * | 1999-09-03 | 2001-03-23 | Kyowa Exeo Corp | Cad data file converting method and computer-readable recording medium where cad data file converting program is recorded |
JP2013101324A (en) * | 2011-10-11 | 2013-05-23 | Nippon Telegr & Teleph Corp <Ntt> | Database disturbance parameter setting device, method and program, and database disturbance system |
KR20140055093A (en) * | 2012-10-30 | 2014-05-09 | 동국대학교 산학협력단 | System and method of distrubuted data storage, restoration |
Non-Patent Citations (1)
Title |
---|
與那嶺 裕 ほか: "閾値秘密分散法に基づく広域ネットワークストレージに関する研究", 電子情報通信学会技術研究報告, vol. 105, no. 290, JPN6015013404, 9 September 2005 (2005-09-09), JP, pages 37 - 44, ISSN: 0004641133 * |
Also Published As
Publication number | Publication date |
---|---|
EP3770889A1 (en) | 2021-01-27 |
CN111868805A (en) | 2020-10-30 |
EP3770889A4 (en) | 2021-12-15 |
CN111868805B (en) | 2023-08-29 |
EP3770889B1 (en) | 2023-08-23 |
US11907641B2 (en) | 2024-02-20 |
WO2019181594A1 (en) | 2019-09-26 |
US20210027009A1 (en) | 2021-01-28 |
JP7010365B2 (en) | 2022-01-26 |
AU2019238219B2 (en) | 2021-06-24 |
AU2019238219A1 (en) | 2020-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8074068B2 (en) | Secret sharing device, method, and program | |
Li et al. | OPoR: Enabling proof of retrievability in cloud computing with resource-constrained devices | |
CN110348231A (en) | Realize the data homomorphism encryption and decryption method and device of secret protection | |
US9300471B2 (en) | Information processing apparatus, information processing method, and program | |
KR101825838B1 (en) | Method of partially encrypting data, method of decrypting a partially-encrpted data, storage medium for a program decrypting a partially-encrpted data | |
JP7010365B2 (en) | Parameter setting units, arithmetic units, their methods, and programs | |
US9762384B2 (en) | Generation and verification of alternate data having specific format | |
CN114143311B (en) | Privacy protection scheme aggregation method and device based on block chain | |
Raddum et al. | Solving multiple right hand sides linear equations | |
JP6973629B2 (en) | Secret aggregation ordering system, secret computing device, secret aggregation ordering method, and program | |
JP6273226B2 (en) | Encryption system, authentication system, encryption device, decryption device, authenticator generation device, verification device, encryption method, authentication method | |
Balmany et al. | Dynamic proof of retrievability based on public auditing for coded secure cloud storage | |
KR102306676B1 (en) | Method and system for generating host keys for storage devices | |
JP6273224B2 (en) | ENCRYPTION SYSTEM, ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD | |
JP5530025B2 (en) | Data division apparatus and data division program | |
KR102522708B1 (en) | Apparatus and method for performing statistical calculation on homomorphic ciphertext | |
JP6927332B2 (en) | Search devices, search methods, programs, and recording media | |
WO2023281693A1 (en) | Secure computing system, device, method, and program | |
US20240184760A1 (en) | Method of storing blockchain transaction data using fountain codes and apparatus for the same | |
US20240184577A1 (en) | Secret calculation system, apparatus, method and program | |
CN116484443B (en) | Trusted security storage method and device based on hong Monte-go system | |
Gorke et al. | Cloud storage file recoverability | |
JP6273225B2 (en) | ENCRYPTION SYSTEM, ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, ENCRYPTION PROGRAM, DECRYPTION PROGRAM | |
KR20140046860A (en) | Apparatus and method for generating identifier of content file based on hash, and method for hash code generation | |
KR20230130382A (en) | Device and method for parallel optimization of reject sampling using rejection sequence table, and digital signature and encryption operation method using the method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200904 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200904 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211116 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211129 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20211214 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211227 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7010365 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |