# US 11,907,641 B2 · Parameter setting apparatus, computation apparatus, method, program, and recoding medium thereof

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,907,641 B2
- Document ID: US11907641B2
- Status: Granted
- Kind: B2
- Application number: 16/981,064
- Filed: 2019-03-11
- Published: 2021-01-28
- Granted: 2024-02-20
- Earliest claimed: 2018-03-19
- Assignees: Nippon Telegraph and Telephone Corporation
- Applicants: Nippon Telegraph and Telephone Corporation
- Inventors: Dai Ikarashi
- Web page: https://patentgrep.com/patent/US11907641B2

## CPC

- G06F 40/126: Character encoding
- H04L 9/085: {Secret sharing or secret splitting, e.g. threshold schemes}
- G06F 40/131: Fragmentation of text files, e.g. creating reusable text-blocks; Linking to fragments, e.g. using XInclude; Namespaces
- G06F 40/44: Statistical methods, e.g. probability models
- G09C 1/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 (cryptographic typewriters G09C3/00)
- H04L 9/36: with means for detecting characters not meant for transmission
- H04L 2209/34: Encoding or coding, e.g. Huffman coding or error correction
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G09C: CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY

## Abstract

A calculation process is efficiently performed to a text file in which one or more records are included, each of the records includes one or more cells having an arbitrary length, and each of the cells includes arbitrary pieces of characters. A parameter setting apparatus sets a maximum value Scsv and a minimum value scsv of a size of character strings for one record by using attribute information as an input, a maximum value Senc of a total size of encode information, a maximum value Sss of a total size of a calculation value obtained by performing specific calculation to the encode information, and a total size Sref of reference information, obtains a function value of C/(Scsv+Senc+Sref) as the number of records which is a process unit of encoding and calculation, and obtains a function value of f0/I·r·Scsv as the number of parallels in the calculation process. Here, C is a cache memory size, M is a main memory size, and f0 is a function value of scsv·M/(scsv+Senc+max(Sref,Sss)).

## Claims

### Claim 1

A parameter setting apparatus for a calculation process to character strings of a text file, in which
the text file includes W pieces of records, each of the records includes G pieces of cells having an arbitrary length, each of the cells includes arbitrary pieces of characters, W and G are an integer which is 1 or greater, and the G pieces of cells correspond to attribute information, and
C is a cache memory size and M is a main memory size,
the parameter setting apparatus comprising processing circuitry configured to implement:
a maximum size setting unit that sets a maximum value Scsv of a size of character strings for one record of the text file by using the attribute information as an input;
a minimum size setting unit that sets a minimum value scsv of the size of character strings for one record by using the attribute information as an input;
an encoding size setting unit that sets a maximum value Senc of a total size of encode information obtained by encoding the character strings for one record into an element of a predetermined finite set;
a calculation size setting unit that sets a maximum value Sss of a total size of a calculation value obtained by performing specific calculation to the encode information for one record;
a reference size setting unit that sets a total size Sref of reference information indicating a position and a length of each of the cells for one record;
a process unit calculation unit that obtains and outputs a number r of records, the number r being a function value of C/(Scsv+Senc+Sref), where the encoding and the calculation are a process being executed for every process unit character string, the process unit character string being a character string for r records of the text file; and
a parallel number calculation unit that obtains and outputs a number np of parallels in the calculation process, the number np being a function value of f0/I·r·Scsv, where I is a maximum value of the number of repetition times of the encoding and the calculation, the encoding and the calculation being executed for every process unit character string, max(Sref,Sss)=Sref holds when Sref≥Sss, max(Sref,Sss)=Sss holds when Sref<Sss, and f0 is a function value of scsv·M/(scsv+Senc+max(Sref,Sss)), wherein
the number r and the number np are parameters for the calculation process to character strings of the text tile.

### Claim 2 (depends on 1)

The parameter setting apparatus according to claim 1, further comprising:
a buffer size calculation unit that obtains a file buffer size f of data which is collectively read from character strings of the text file in the calculation process, the file buffer size f being a function value of f0/np.

### Claim 3 (depends on 1, 2)

The parameter setting apparatus according to claim 1 or 2, wherein the maximum value I of the number of repetition times is defined so that a ratio of a total processing amount of preprocessing to a total processing amount for performing the encoding and the calculation of the process unit character string is equal to or smaller than a predetermined value.

### Claim 4

A computation apparatus that performs a calculation process to character strings of a text file, in which
the text file includes W pieces of records, each of the records includes G pieces of cells having an arbitrary length, each of the cells includes arbitrary pieces of characters, W and G are an integer which is 1 or greater, f is a file buffer size which is defined, np is the number of parallels, r is a positive integer indicating the number of records, i denotes each thread, i∈{0, . . . , T−1} holds, T is a positive integer indicating the number of threads corresponding to a size of character strings of the text file, 1≤np≤T holds, and a file read-in lock and a buffer boundary lock of a thread 0 and a parallelism lock of threads 0, . . . , np−1 are released in an initial state,
the computation apparatus comprising processing circuitry configured to implement:
a main memory;
a cache memory; and
a plurality of processing units, wherein
a processing unit for performing processing for a thread i among the plurality of processing units includes
a read-in unit that reads a character string Si, the character string Si being able to be stored in a region of the file buffer size f, from character strings of the text file and stores the character string Si in the main memory after a file read-in lock and a parallelism lock of the thread i are released,
a file read-in lock releasing unit that releases a file read-in lock of a thread i+1 after the character string Si is stored in the main memory,
a parsing unit that calculates reference information indicating a position and a length of each cell included in the character string Si and stores the reference information in the main memory after a buffer boundary lock of the thread i is released,
a buffer boundary lock releasing unit that releases a buffer boundary lock of the thread i+1 after the reference information indicating a position and a length of each cell included in the character string Si is calculated,
an encoding unit that performs processing, in which a process unit character string PSi,j which is a character string for r records, the character strings being processing targets and being included in a concatenated character string CSi, is selected based on information specified based on the reference information and the process unit character string PSi,j is encoded into encode information Ei,j which is an element of a predetermined finite set, by using the cache memory, where a concatenated character string CS0 when i=0 is S0, the concatenated character string CSi when i≥1 is obtained by concatenating the character string Si immediately after a concatenated character string CSi−1, J is a positive integer, and j=0, . . . , J−1 holds,
a calculation unit that performs processing, in which specific calculation is performed to the encode information Ei,j to obtain a calculation value SSi,j and the calculation value SSi,j is stored in the main memory, by using the cache memory, and
a parallelism lock releasing unit that releases a parallelism lock of a thread i+np after the calculation value SSi,j is obtained.

### Claim 5

A computation apparatus that performs a calculation process to character strings of a text file, in which
the text file includes W pieces of records, each of the records includes G pieces of cells having an arbitrary length, each of the cells includes arbitrary pieces of characters, W and G are an integer which is 1 or greater, f is a file buffer size which is defined, np is the number of parallels, r is a positive integer indicating the number of records, i denotes each thread, i∈{0, . . . , T−1} holds, T is a positive integer indicating the number of threads corresponding to the size of character strings of the text file, 1≤np≤T holds, and a file read-in lock of a thread 0 and a parallelism lock of threads 0, . . . , np−1 are released in an initial state,
the computation apparatus comprising processing circuitry configured to implement:
a main memory;
a cache memory; and
a plurality of processing units, wherein
a processing unit for performing processing for a thread i among the plurality of processing units includes
a read-in unit that reads a character string S1, the character string Si being able to be stored in a region of the file buffer size f, from character strings of the text file and stores the character string Si in the main memory after a file read-in lock and a parallelism lock of the thread i are released,
a file read-in lock releasing unit that releases a file read-in lock of a thread i+1 after the character string Si is stored in the main memory,
a parsing unit that calculates reference information indicating a position and a length of each cell included in the character string Si and stores the reference information in the main memory,
a cell specifying unit that obtains information Ai corresponding to a position of a cell coming immediately after a last cell included in a character string Si−1 by using the reference information, the character string Si−1, and the character string Si, after a buffer boundary lock of the thread i is released, where the character string Si is a character string coming immediately after the character string Si−1 when i≥1,
a buffer boundary lock releasing unit that releases a buffer boundary lock of the thread i+1 after the information Ai is obtained,
an encoding unit that performs processing, in which a process unit character string PSi,j which is a character string for r records, the character strings being processing targets and being included in a concatenated character string CSi, is selected based on information specified based on the reference information and the information Ai and the process unit character string PSi,j is encoded into encode information Ei,j which is an element of a predetermined finite set, by using the cache memory, where a concatenated character string CS0 when i=0 is S0, the concatenated character string CSi when i≥1 is obtained by concatenating the character string Si immediately after a concatenated character string CSi−1, J is a positive integer, and j=0, . . . , J−1 holds,
a calculation unit that performs processing, in which specific calculation is performed to the encode information Ei,j to obtain a calculation value SSi,j and the calculation value SSi,j is stored in the main memory, by using the cache memory, and
a parallelism lock releasing unit that releases a parallelism lock of a thread i+np after the calculation value SSi,j is obtained.

### Claim 6 (depends on 5)

The computation apparatus according to claim 5, wherein
the cell only includes a character which enables determining whether or not the character independently indicates a target of the calculation, and
when i≥1, the parsing unit starts calculation of the reference information indicating a position and a length of each cell included in the character string Si before calculation of reference information indicating a position and a length of each cell included in the character string is finished.

### Claim 7 (depends on 4, 5, 6)

The computation apparatus according to any one of claims 4 to 6, wherein
C is a cache memory size of the cache memory and M is a main memory size of the main memory,
Scsv is a maximum value of a size of character strings for one record of the text file,
scsv is a minimum value of the size of the character strings for one record,
Senc is a maximum value of a total size of encode information, the encode information being obtained by encoding the character strings for one record into an element of the predetermined finite set,
Sss is a maximum value of a total size of a calculation value, the calculation value being obtained by performing the calculation to the encode information for one record,
Sref is a total size of reference information indicating a position and a length of each of the cells for one record,
the number r of records is a function value of C/(Scsv+Senc+Sref),
I is a maximum value of the number of repetition times of the encoding and the calculation, the encoding and the calculation being executed for every process unit character string PSi,j, max(Sref,Sss)=Sref holds when Sref≥Sss, max(Sref,Sss)=Sss holds when Sref<Sss, f0 is a function value of scsv·M/(scsv+Senc+max(Sref,Sss)), and the number np of parallels is a function value of f0/I·r·Scsv, and
the file buffer size f is a function value of f0/np.

### Claim 8 (depends on 4, 5, 6)

The computation apparatus according to any one of claims 4 to 6, wherein when there is not enough region to store the reference information in the main memory, the parsing unit collectively secures a buffer region for storing the reference information for r records in the main memory.

### Claim 9 (depends on 1, 2)

A method for executing processing of each unit of the apparatus according to any one of claims 1, 2, or 4 to 6.

### Claim 10 (depends on 1, 2)

A non-transitory computer-readable recording medium storing a computer readable recording medium that stores a program for making a computer function as the apparatus according to any one of claims 1, 2, or 4 to 6.
