JP6355514B2 - File division system and method - Google Patents

File division system and method Download PDF

Info

Publication number
JP6355514B2
JP6355514B2 JP2014206336A JP2014206336A JP6355514B2 JP 6355514 B2 JP6355514 B2 JP 6355514B2 JP 2014206336 A JP2014206336 A JP 2014206336A JP 2014206336 A JP2014206336 A JP 2014206336A JP 6355514 B2 JP6355514 B2 JP 6355514B2
Authority
JP
Japan
Prior art keywords
data
division
processing unit
determination
storage area
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.)
Active
Application number
JP2014206336A
Other languages
Japanese (ja)
Other versions
JP2016076100A (en
Inventor
秀夫 酒井
秀夫 酒井
矢野 純一
純一 矢野
平野 智哉
智哉 平野
佑希 今西
佑希 今西
信二 田嶋
信二 田嶋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2014206336A priority Critical patent/JP6355514B2/en
Publication of JP2016076100A publication Critical patent/JP2016076100A/en
Application granted granted Critical
Publication of JP6355514B2 publication Critical patent/JP6355514B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明はファイル分割システム及び方法に係り、特に、大容量データに対するキーブレイク処理等の並列化を実現するための前処理として、当該大容量データをブレイクポイント等において複数のグループに分割する技術に関する。   The present invention relates to a file dividing system and method, and more particularly, to a technique for dividing large-capacity data into a plurality of groups at break points or the like as preprocessing for realizing parallel processing such as key break processing for large-capacity data. .

キーブレイク処理とは、ある項目(キー)でソート済みのデータをシーケンシャルに読み込み、属性(キー)が変わったタイミングで集計等の処理を実行することを指す(非特許文献1参照)。   Key break processing refers to sequentially reading data sorted by a certain item (key) and executing processing such as counting at the timing when the attribute (key) changes (see Non-Patent Document 1).

例えば、図5に示すように、仕入先コードに基づいてソートされた5件のデータについて「仕入先毎に金額を集計する」という処理が与えられた場合、各データの仕入先コードを上から順にチェックしていき、仕入先コードが変化した時点でそれ以前のデータを抽出し、それぞれの金額を合計する処理が実行される。   For example, as shown in FIG. 5, when a process of “aggregating the amount for each supplier” is given to five data sorted based on the supplier code, the supplier code of each data Are checked in order from the top, and when the supplier code changes, the previous data is extracted, and the process of summing the respective amounts is executed.

2-2.キーブレイク処理インターネットURL:http://www003.upp.so-net.ne.jp/NAMBOKU/ruby/ruby022.html 検索日:2014年9月10日2-2. Key break processing Internet URL: http://www003.upp.so-net.ne.jp/NAMBOKU/ruby/ruby022.html Search date: September 10, 2014

このキーブレイク処理の実行に際しては、各データのキー値を直前のキー値と1件毎に比較していく必要があるため、処理対象となるデータの件数が数百万超の大容量データともなると膨大な時間を要し、営業時間後のバッチ処理では翌日の営業開始までに集計が完了しないといった事態も生じ得る。   When executing this key break process, it is necessary to compare the key value of each data with the previous key value one by one, so both large-capacity data with the number of data to be processed exceeding several millions Then, it takes a lot of time, and in batch processing after business hours, there may be a situation in which aggregation is not completed by the start of business the next day.

本来であれば、データを複数のファイルに分割し、複数台のコンピュータまたは複数個のCPUコアを用いて並列処理を実行することにより、処理時間の短縮化を図りたいところであるが、図6に示すように、一連のデータを適当な位置で分割すると同じキー値を備えたデータが複数のファイル中に分散する所謂「泣き別れ」が生じてしまい、後続の処理に悪影響を及ぼすこととなる。   Originally, we would like to reduce the processing time by dividing the data into multiple files and executing parallel processing using multiple computers or multiple CPU cores. As shown, when a series of data is divided at an appropriate position, so-called “crying separation” occurs in which data having the same key value is dispersed in a plurality of files, which adversely affects subsequent processing.

かといって、正確なブレイクポイントでファイルを分割するとなると、そのブレイクポイントを発見するためにデータを上から1件ずつチェックしていく必要が生じ、本末転倒な結果となる。   However, when a file is divided at an accurate break point, it is necessary to check the data one by one from the top in order to find the break point.

なお、大容量ファイルをデータの分量ベースで分割した際に生じる「泣き別れ」により、後続処理に不都合が生じるのは上記の場合に限られるものではく、大容量のテキストファイル中から特定の文字列が含まれる行を行単位で出力する処理を複数のCPUコアを用いて並列的に実行するに先立ち、当該テキストファイルを複数ファイルに分割するケースなどにも該当する。   In addition, it is not limited to the above case that the inconvenience occurs in subsequent processing due to the “breaking up” that occurs when a large file is divided on the basis of the amount of data. A specific character string from a large text file This also applies to the case where the text file is divided into a plurality of files prior to parallel processing using a plurality of CPU cores to output a line including the line.

例えば、「…あいうえお\nかきくけこ\nさしすせそ\n…」というテキストファイルに対して「きく」というキーワードが与えられた際に、「かきくけこ」の行を正しく抽出するためには、元ファイルが改行文字(\n)の直後で分割がなされる必要がある。仮に「あいうえお\nかき」と「くけこ\nさしすせそ」に分割されてしまうと「きく」が泣き別れとなり、検索対象として認識されなくなる。   For example, when the keyword “Kiku” is given to the text file “… Aiueo \ nKashikaseko \ nSashisuseso \ n…” The original file needs to be split immediately after the newline character (\ n). If it is divided into “Aiueo \ n Kaki” and “Kukeko \ n Sashisoseso”, “Kiku” will cry and will not be recognized as a search target.

この発明は、このような現状を鑑みて案出されたものであり、大容量データをブレイクポイント等の分割許容ポイントで分割する処理を、効率的に実行できる技術の提供を目的としている。   The present invention has been devised in view of such a current situation, and an object of the present invention is to provide a technique capable of efficiently executing a process of dividing large-capacity data at a division allowable point such as a break point.

上記の目的を達成するため、請求項1に記載したファイル分割システムは、複数の分割処理部と、複数の分割許容ポイントを有している元データを、データの分量ベースで複数のグループに区分し、各グループに含まれるデータを上記の各分割処理部に割当データとして順番に関連付けるデータ割当処理部と、複数の後続処理部を備え、上記の各分割処理部の中、元データの最初のグループが割り当てられた先頭の分割処理部を除き、各分割処理部がそれぞれ自己の割当データについて先頭から分割許容ポイントを探索する処理を実行し、最初の分割許容ポイントを発見した時点で、当該最初の分割許容ポイントより前のデータを判定済データとして判定済データ記憶領域に出力すると共に、当該最初の分割許容ポイント以降のデータを判定不要データとして判定不要データ記憶領域に出力し、上記先頭の分割処理部が、自己の割当データについて分割許容ポイントを探索する処理を実行することなく、そのまま判定不要データとして上記判定不要データ記憶領域に出力し、上記の各後続処理部は、自己の担当する分割処理部の次の分割処理部に係る判定済データが存在する場合には、自己の担当する分割処理部に係る判定不要データの末尾に上記判定済データを仮想的に連結した上で必要な後続処理を実行し、上記の判定済データが存在しない場合には、自己の担当する分割処理部に係る判定不要データのみに対して必要な後続処理を実行することを特徴としている。   In order to achieve the above object, the file division system according to claim 1 divides original data having a plurality of division processing units and a plurality of division allowable points into a plurality of groups based on the amount of data. A data allocation processing unit for sequentially associating the data included in each group with each of the above-described division processing units as allocation data, and a plurality of subsequent processing units. Except for the first division processing unit to which a group is assigned, each division processing unit executes a process of searching for division allowable points from the beginning for its own allocation data, and when the first division allowable point is found, The data before the division allowable point is output to the determined data storage area as determined data, and the data after the first division allowable point is determined The data is output to the determination-unnecessary data storage area as the necessary data, and the first division processing unit directly performs the process of searching for the division allowable point with respect to the assigned data as it is to the determination-unnecessary data storage area. When each of the subsequent processing units outputs determined data related to the division processing unit next to the division processing unit that is in charge of itself, the end of the determination-unnecessary data related to the division processing unit that is in charge Virtually concatenating the determined data to the above, execute the necessary subsequent processing, and if the determined data does not exist, it is necessary only for the determination-unnecessary data related to the division processing unit in charge It is characterized by executing subsequent processing.

請求項2に記載したファイル分割システムは、請求項1のシステムであって、上記データ割当処理部が、キー項目の値に基づいてソートされた複数のレコードからなる元データをレコードの件数ベースで複数のグループに区分し、上記分割処理部が、上記元データに含まれる各レコードのキー項目の値が変化するブレイクポイントを分割許容ポイントとして探索することを特徴としている。   The file division system according to claim 2 is the system according to claim 1, wherein the data allocation processing unit converts the original data including a plurality of records sorted based on the value of the key item on the basis of the number of records. The division processing unit is divided into a plurality of groups, and the division processing unit searches for a break point at which the value of the key item of each record included in the original data changes as a division allowable point.

請求項3に記載したファイル分割システムは、請求項1のシステムであって、上記データ割当処理部が、複数の改行文字を含むテキストファイルからなる元データを文字数ベースで複数のグループに区分し、上記分割処理部が、上記元データに含まれる各改行文字の直後を分割許容ポイントとして探索することを特徴としている。   The file division system according to claim 3 is the system according to claim 1, wherein the data allocation processing unit divides original data composed of text files including a plurality of line feed characters into a plurality of groups based on the number of characters, The division processing unit searches for a division allowable point immediately after each line feed character included in the original data.

請求項4に記載したファイル分割システムは、請求項1〜3のシステムであって、上記の各分割処理部による処理が、それぞれ別個のCPUコアによって実行されることを特徴としている。   A file division system according to a fourth aspect is the system according to any one of the first to third aspects, wherein the processing by each of the division processing units is executed by a separate CPU core.

請求項5に記載したファイル分割方法は、コンピュータにより実行される方法であって、複数の分割許容ポイントを有している元データを、データの分量ベースで複数のグループに区分するステップと、上記複数のグループの中、上記元データの最初のグループ以外の各グループについて、それぞれ先頭から分割許容ポイントを探索し、最初の分割許容ポイントを発見した時点で、当該最初の分割許容ポイントより前のデータを判定済データとして判定済データ記憶領域に出力するステップと、当該最初の分割許容ポイント以降のデータを、判定不要データとして判定不要データ記憶領域に出力するステップと、上記先頭のグループについては、分割許容ポイントを探索することなく、そのまま判定不要データとして上記判定不要データ記憶領域に出力するステップと、上記判定不要データ記憶領域に格納された判定不要データの中、元データの最後のグループに係る判定不要データ以外の各判定不要データに対しては、それぞれ次のグループに係る判定済データを仮想的に連結した上で必要な後続処理を実行し、上記元データの最後のグループに係る判定不要データに対しては、そのまま必要な後続処理を実行するステップからなることを特徴としている。


The file division method according to claim 5 is a method executed by a computer , wherein the original data having a plurality of division allowable points is divided into a plurality of groups based on the amount of data, and For each group other than the first group of the original data among a plurality of groups, the search is made for a division allowable point from the beginning, and when the first division allowable point is found, the data before the first division allowable point is detected. Are output to the determined data storage area as determined data, the data after the first division allowable point is output to the determination unnecessary data storage area as determination unnecessary data, and the first group is divided. Without searching for allowable points, the above judgment-unnecessary data is stored as judgment-unnecessary data. Each of the determination unnecessary data other than the determination unnecessary data related to the last group of the original data among the determination unnecessary data stored in the determination unnecessary data storage area, and The necessary subsequent processing is executed after virtually linking the determined data, and the necessary subsequent processing is directly performed on the determination-unnecessary data related to the last group of the original data. It is a feature.


請求項1に記載したファイル分割システムの場合、各分割処理部によって切り出された判定済データは分割許容ポイントよりも前のものであり、これが一つ前の分割処理部に係る判定不要データの最後尾に仮想的に連結された上で必要な後続処理が実行される仕組みであるため、後続処理の対象データ間において所謂「泣き別れ」が生じることがない。
しかも、各分割処理部による逐次的な分割許容ポイント探索処理は、各グループにおいて最初の分割許容ポイントが発見されるまでに限定され、それ以降のデータに対しては分割許容ポイント探索処理が省略される仕組みであるため、元データのすべてについて同処理を実行する場合に比べ、処理の大幅な簡素化が実現できる。
In the case of the file division system according to claim 1, the determined data cut out by each division processing unit is before the division allowable point, and this is the last of the determination-unnecessary data related to the previous division processing unit. Since it is a mechanism in which necessary subsequent processing is executed after being virtually connected to the tail, so-called “crying separation” does not occur between target data of subsequent processing.
Moreover, the sequential division permissible point search process by each division processing unit is limited to the time when the first division permissible point is found in each group, and the division permissible point search process is omitted for the subsequent data. Therefore, the processing can be greatly simplified as compared with the case where the same processing is executed for all of the original data.

請求項4に記載したファイル分割システムの場合、各分散処理部による分割許容ポイント探索処理を並列化することができ、ファイル分割処理をより効率化することが可能となる。   In the file division system according to the fourth aspect, the division allowable point search processing by each distributed processing unit can be parallelized, and the file division processing can be made more efficient.

請求項5に記載したファイル分割方法の場合にも、各グループから切り出された判定済データは分割許容ポイントよりも前のものであり、これが一つ前のグループに係る判定不要データの最後尾に仮想的に連結された上で必要な後続処理が実行される仕組みであるため、後続処理の対象データ間において所謂「泣き別れ」が生じることがない。
しかも、データに対する逐次的な分割許容ポイント探索処理は、各グループにおいて最初の分割許容ポイントが発見されるまでに限定され、それ以降のデータに対しては分割許容ポイント探索処理が省略される仕組みであるため、元データのすべてについて同処理を実行する場合に比べ、処理の大幅な簡素化が実現できる。
In the case of the file dividing method according to claim 5, the determined data cut out from each group is before the division allowable point, and this is at the end of the determination unnecessary data related to the previous group. Since it is a mechanism in which necessary subsequent processing is executed after being virtually connected, so-called “crying separation” does not occur between target data of subsequent processing.
In addition, the sequential division permissible point search process for data is limited until the first division permissible point is found in each group, and the division permissible point search process is omitted for subsequent data. Therefore, the process can be greatly simplified as compared with the case where the same process is executed for all of the original data.

図1は、この発明に係るファイル分割システム10の機能構成を示すブロック図であり、データ割当処理部12と、元データ記憶領域13と、判定済データ記憶領域14と、判定不要データ記憶領域15と、集計結果記憶領域16と、第1の分割処理部21と、第2の分割処理部22と、第3の分割処理部23と、第4の分割処理部24と、第5の分割処理部25と、第6の分割処理部26と、第7の分割処理部27と、第1の集計処理部(後続処理部)31と、第2の集計処理部(後続処理部)32と、第3の集計処理部(後続処理部)33と、第4の集計処理部(後続処理部)34と、第5の集計処理部(後続処理部)35と、第6の集計処理部(後続処理部)36と、第7の集計処理部(後続処理部)37を備えている。   FIG. 1 is a block diagram showing a functional configuration of a file division system 10 according to the present invention, in which a data allocation processing unit 12, an original data storage area 13, a determined data storage area 14, and a determination unnecessary data storage area 15 are shown. A total result storage area 16, a first division processing unit 21, a second division processing unit 22, a third division processing unit 23, a fourth division processing unit 24, and a fifth division process. Unit 25, sixth division processing unit 26, seventh division processing unit 27, first totalization processing unit (subsequent processing unit) 31, second totalization processing unit (subsequent processing unit) 32, The third totalization processing unit (subsequent processing unit) 33, the fourth totalization processing unit (subsequent processing unit) 34, the fifth totalization processing unit (subsequent processing unit) 35, and the sixth totalization processing unit (subsequent) A processing unit) 36 and a seventh tabulation processing unit (subsequent processing unit) 37.

上記元データ記憶領域13、判定済データ記憶領域14、判定不要データ記憶領域15及び集計結果記憶領域16は、コンピュータ40の補助記憶装置42内に設けられている。
また、上記データ割当処理部12、第1の分割処理部21〜第7の分割処理部27及び第1の集計処理部31〜第7の集計処理部37は、同コンピュータ40のCPUが特定のアプリケーションプログラムに従って動作することにより実現される。
The original data storage area 13, the determined data storage area 14, the determination-unnecessary data storage area 15 and the total result storage area 16 are provided in the auxiliary storage device 42 of the computer 40.
The data allocation processing unit 12, the first division processing unit 21 to the seventh division processing unit 27, and the first aggregation processing unit 31 to the seventh aggregation processing unit 37 are specified by the CPU of the computer 40. This is realized by operating according to an application program.

このコンピュータ40は複数のCPUコアを備えており、第1の分割処理部21〜第7の分割処理部27が動作する際には、それぞれ別個のCPUコアが割り当てられる。この結果、第1の分割処理部21〜第7の分割処理部27は同時並行的に別個の処理を実行可能となされている。
また、第1の集計処理部31〜第7の集計処理部37が動作する際にも、それぞれには別個のCPUコアが割り当てられる結果、第1の集計処理部31〜第7の集計処理部37は同時並行的に別個の処理を実行できる。
The computer 40 includes a plurality of CPU cores, and when the first division processing unit 21 to the seventh division processing unit 27 operate, separate CPU cores are assigned to each of them. As a result, the first division processing unit 21 to the seventh division processing unit 27 can execute separate processes in parallel.
In addition, when the first totalization processing unit 31 to the seventh totalization processing unit 37 operate, as a result of assigning a separate CPU core to each, the first totalization processing unit 31 to the seventh totalization processing unit 37 can execute separate processes concurrently.

つぎに、図2のフローチャート及び図3の概念図に基づき、このファイル分割システム10の処理内容を説明する。   Next, processing contents of the file dividing system 10 will be described based on the flowchart of FIG. 2 and the conceptual diagram of FIG.

まずデータ割当処理部12は、元データ記憶領域13に格納された元データ46のレコード件数をチェックし、第1の分割処理部21〜第7の分割処理部27用に等分に割り当てる(S10)。   First, the data allocation processing unit 12 checks the number of records of the original data 46 stored in the original data storage area 13, and allocates equally for the first division processing unit 21 to the seventh division processing unit 27 (S10 ).

元データ46は、例えば仕入先、伝票番号、金額のデータ項目を備えた数百万件超の大容量データであり、予め仕入先コードに基づいて昇順又は降順に整列されている。
データ割当処理部12は、この大容量データを件数ベースで先頭から順に7等分し、それぞれのグループを第1の分割処理部21〜第7の分割処理部27に対して順に割り当てるのであるが、正確に7等分できずに端数が生じる場合、適当な分割処理部に対して他より多目にデータを割り当てる。
図3においては、第1の分割処理部21〜第7の分割処理部27に対して、それぞれ割当データ51〜57が関連付けられた状態が示されている。
The original data 46 is, for example, millions of pieces of large-capacity data including data items of suppliers, slip numbers, and amounts, and is arranged in advance in ascending order or descending order based on supplier codes.
The data allocation processing unit 12 divides this large-capacity data into seven equal parts in order from the top, and allocates each group to the first division processing unit 21 to the seventh division processing unit 27 in order. In the case where a fraction is generated without being accurately divided into seven, data is allocated more frequently than the other to an appropriate division processing unit.
FIG. 3 shows a state in which the allocation data 51 to 57 are associated with the first division processing unit 21 to the seventh division processing unit 27, respectively.

つぎに、元データ46の先頭のグループを担当する第1の分割処理部21を除き、第2の分割処理部22〜第7の分割処理部27は、それぞれ自己に関連付けられた割当データに対してブレイク判定処理を上から順に実行し(S12)、最初のブレイクポイントαを発見した時点でブレイク判定処理を停止し、当該ブレイクポイントαより前に位置する判定済データを判定済データ記憶領域14にファイルとして出力する(S14)。ここでは、ブレイクポイントが「分割可能ポイント」に相当することとなる。
図3においては、判定済データ記憶領域14に判定済データ62〜67が配置されている状態が示されている。
Next, except for the first division processing unit 21 in charge of the leading group of the original data 46, the second division processing unit 22 to the seventh division processing unit 27 respectively perform the allocation data associated with itself. The break determination process is executed in order from the top (S12), the break determination process is stopped when the first break point α is found, and the determined data located before the break point α is determined as the determined data storage area 14 Is output as a file (S14). Here, the break point corresponds to a “dividable point”.
FIG. 3 shows a state where the determined data 62 to 67 are arranged in the determined data storage area 14.

同時に、第2の分割処理部22〜第7の分割処理部27は、最初のブレイクポイントα以降に存在する全データを、判定不要データとして判定不要データ記憶領域15にファイルとして出力する(S16)。
これに対し第1の分割処理部21は、ブレイク判定処理を一切実行することなく、自己の割当データ51をそのまま判定不要データとして判定不要データ記憶領域15に出力する(S18)。
図3においては、判定不要データ記憶領域15に判定不要データ71〜77が配置されている状態が示されている。
At the same time, the second division processing unit 22 to the seventh division processing unit 27 output all data existing after the first break point α as files to the determination unnecessary data storage area 15 as determination unnecessary data (S16). .
On the other hand, the first division processing unit 21 outputs its own allocation data 51 as it is to the determination unnecessary data storage area 15 as the determination unnecessary data without executing any break determination processing (S18).
FIG. 3 shows a state in which determination unnecessary data 71 to 77 are arranged in the determination unnecessary data storage area 15.

図4は、ブレイク判定処理の具体例を示すものである。
まず第2の分割処理部22は、仕入先コードが「003」から「004」に変わる箇所を最初のブレイクポイントαと認定し、この最初のブレイクポイントαより前に配置された全データ(ここでは「003」の仕入先コードを備えたデータ)を判定済データ62として判定済データ記憶領域14に出力する。
図示の通り、最初のブレイクポイントα以降に配置された判定不要データ72中にも次のブレイクポイントが存在しているが、第2の分割処理部22はブレイク判定処理を再開することなく、判定不要データ72を一括して判定不要データ記憶領域14に出力する。
FIG. 4 shows a specific example of the break determination process.
First, the second division processing unit 22 recognizes a place where the supplier code changes from “003” to “004” as the first break point α, and all the data arranged before the first break point α ( Here, the data having the supplier code “003”) is output to the determined data storage area 14 as the determined data 62.
As shown in the figure, the next break point exists in the determination-unnecessary data 72 arranged after the first break point α, but the second division processing unit 22 makes the determination without restarting the break determination process. The unnecessary data 72 is collectively output to the determination unnecessary data storage area 14.

つぎに、第1の集計処理部31は、判定不要データ記憶領域15に格納された第1の分割処理部21に係る判定不要データ71と、判定済データ記憶領域14に格納された第2の分割処理部22に係る判定済データ62を仮想的にマージして第1の分割ファイル81となした上で、仕入先単位での集計処理を実行し(S20)、その結果を集計結果記憶領域16に格納する(S24)。
ここで「仮想的にマージ」とは、先行グループに係る判定不要データと一つ後ろのグループに係る判定済データを、連続する一つのファイルとして読み込むことを意味している。
Next, the first tabulation processing unit 31 includes the determination unnecessary data 71 related to the first division processing unit 21 stored in the determination unnecessary data storage area 15 and the second data stored in the determined data storage area 14. The determined data 62 related to the division processing unit 22 is virtually merged into the first division file 81, and then the aggregation process is performed for each supplier (S20), and the result is stored as the aggregation result. Store in area 16 (S24).
Here, “virtual merge” means that the determination unnecessary data related to the preceding group and the determined data related to the next group are read as one continuous file.

同様に、第2の集計処理部32〜第6の集計処理部36も、それぞれ判定不要データ記憶領域15に格納された判定不要データ72〜76に対し、一つ後ろの分割処理部によって出力された判定済データ62〜67を仮想的にマージして第2の分割ファイル82〜第6の分割ファイル86となした上で集計処理を実行し(S20)、その結果を集計結果記憶領域16に格納する(S24)。   Similarly, the second aggregation processing unit 32 to the sixth aggregation processing unit 36 are also output by the next division processing unit with respect to the determination unnecessary data 72 to 76 stored in the determination unnecessary data storage area 15, respectively. The determined data 62 to 67 are virtually merged into the second divided file 82 to the sixth divided file 86, and the totaling process is executed (S20), and the result is stored in the totaling result storage area 16. Store (S24).

これに対し、元データ46の最後尾のグループを担当する第7の分割処理部27に係る判定不要データ77には、マージの対象となる判定済データが存在しないため、第7の集計処理部37は判定不要データ77をそのまま第7の分割ファイル87として取り扱い、これに対する集計処理を実行した後(S22)、集計結果記憶領域16に集計結果を格納する(S24)。   On the other hand, since the determination unnecessary data 77 related to the seventh division processing unit 27 in charge of the last group of the original data 46 does not include the determined data to be merged, the seventh aggregation processing unit 37 treats the judgment-unnecessary data 77 as it is as the seventh divided file 87, executes the aggregation processing for this (S22), and stores the aggregation results in the aggregation result storage area 16 (S24).

上記のように、第1の集計処理部31〜第6の集計処理部36が仮想マージ機能を備えているため、判定不要データ記憶領域15に格納された判定不要データのファイルと、判定済データ記憶領域14に格納された判定済データのファイルを物理的に結合し、第三のファイルとして別の領域に書き込む際の時間とディスク容量を節約することができる。   As described above, since the first aggregation processing unit 31 to the sixth aggregation processing unit 36 have the virtual merge function, the files of the determination unnecessary data stored in the determination unnecessary data storage area 15 and the determined data The determined data files stored in the storage area 14 can be physically combined to save time and disk capacity when writing to another area as a third file.

ただし、この発明はこれに限定されるものではない。すなわち、第1の集計処理部31〜第6の集計処理部36が、それぞれ自己が担当する判定不要データ71〜76のファイルと判定済データ62〜67のファイルを物理的にマージし、独立した分割ファイルとしてディスク上の所定の領域に出力すると共に、第7の集計処理部37が、自己が担当する判定不要データ77をそのまま分割ファイルとして上記領域に出力するように構成してもよい。この後、第1の集計処理部31〜第7の集計処理部37によって、各分割ファイルに対して集計処理が実行される。   However, the present invention is not limited to this. In other words, the first aggregation processing unit 31 to the sixth aggregation processing unit 36 physically merge the files of the determination unnecessary data 71 to 76 and the files of the determined data 62 to 67 that are in charge of each of them independently. The seventh aggregation processing unit 37 may be configured to output the determination unnecessary data 77 that it is in charge of as it is to the area as it is as a divided file, while outputting the divided file to a predetermined area on the disk. Thereafter, the first totalization processing unit 31 to the seventh totalization processing unit 37 execute the totalization processing for each divided file.

各分割ファイル81〜87に含まれるデータの件数は区々であり、また一つの分割ファイル中には複数のブレイクポイントが含まれているが、少なくとも同一のキー値を備えたデータが異なる分割ファイル中に分散する「泣き別れ」が生じることはない。   The number of data included in each of the divided files 81 to 87 varies, and a single divided file includes a plurality of breakpoints, but at least the divided files having the same key value are different. There is no “crying farewell” that scatters inside.

例えば、図4に示すように、第1の分割処理部21の割当データ51の最後尾には仕入先コードが「003」のデータが含まれているが、第2の分割処理部22の判定済データ62はすべて仕入先コード「003」のデータで占められており、これらが第1の分割処理部21の判定不要データ71の最後尾に仮想的に結合されるため、仕入先コード「003」のデータが第1の分割ファイル81内に集約されることとなる。   For example, as shown in FIG. 4, the end of the allocation data 51 of the first division processing unit 21 includes data with the supplier code “003”. Since all the judged data 62 is occupied by the data of the supplier code “003”, and these are virtually combined with the tail of the judgment unnecessary data 71 of the first division processing unit 21, the supplier Data of code “003” is collected in the first divided file 81.

各分割処理部においては逐次的なブレイク判定処理が実行されることになるが、第1の分割処理部21〜第7の分割処理部27には異なるCPUコアが割り当てられているため、並列処理による効率化が実現される。   In each division processing unit, sequential break determination processing is executed. Since different CPU cores are assigned to the first division processing unit 21 to the seventh division processing unit 27, parallel processing is performed. Efficiency improvement is realized.

しかも、ブレイク判定処理は最初のブレイクポイントαが発見されるまでのことであり、それ以降は判定不要データとしてブレイク判定処理が施されることなく、一括して判定不要データ記憶領域15に出力されるため、すべてのデータを1件毎にチェックする場合に比べて処理の大幅な簡素化が期待できる。   In addition, the break determination process is performed until the first break point α is found, and thereafter, the break determination process is not performed as the determination unnecessary data and is output to the determination unnecessary data storage area 15 in a lump. Therefore, the process can be expected to be greatly simplified as compared with the case where all data are checked one by one.

各分割ファイル81〜87については、上記のように同種データの泣き別れが生じていないことが保証されているため、各分割ファイル中のデータについて集計処理を行う場合に、それぞれ別個のCPUコアが割り当てられた第1の集計処理部31〜第7の集計処理部37による並列処理が可能となる。   For each of the divided files 81 to 87, it is guaranteed that the same kind of data does not break up as described above. Parallel processing by the first totalization processing unit 31 to the seventh totalization processing unit 37 is possible.

上記において元データ46を7つのファイルに分割したのはあくまでも一例であり、対応する数の分割処理部(CPUコア)を用意することにより、任意の数のファイルに分割できることは当然である。   In the above, dividing the original data 46 into seven files is merely an example, and it is natural that the original data 46 can be divided into an arbitrary number of files by preparing a corresponding number of division processing units (CPU cores).

なお、本願発明は上記のようにマルチコアCPUを備えたコンピュータ32による並列処理を必須要件とするものではなく、シングルコアCPUのコンピュータを用いて元データ46の各グループについて順番に処理を実行する方式を採用することもできる。   Note that the present invention does not require parallel processing by the computer 32 having a multi-core CPU as described above, but a method for executing processing in order for each group of the original data 46 using a single-core CPU computer Can also be adopted.

上記においては、キーブレイク処理の前処理としてファイルを複数に分割するケースを例示したが、このファイル分割システム10は他の用途にも応用可能である。
その一例として、大容量のテキストファイル中から、特定の文字列が含まれる行を行単位で出力する処理を複数のCPUコアを用いて並列的に実行するに先立ち、当該テキストファイルを複数ファイルに分割するケースが該当する。
In the above, the case where a file is divided into a plurality of parts as a pre-process of the key break process has been exemplified.
As an example, prior to executing parallel processing using multiple CPU cores to output a line containing a specific character string from a large-capacity text file, the text file is converted into multiple files. This is the case when splitting.

すなわち、「…あいうえお\nかきくけこ\nさしすせそ\n…」というテキストファイルに対して「きく」というキーワードが与えられた際に、「かきくけこ」の行を正しく抽出するためには、元ファイルが改行文字(\n)の直後で分割がなされる必要がある。仮に「あいうえお\nかき」と「くけこ\nさしすせそ」に分割されてしまうと「きく」が泣き別れとなり、検索対象として認識されなくなる。   In other words, when the keyword "Kiku" is given to the text file "... Aiueo \ nKakikukuko \ nSashisuseso \ n ..." The original file needs to be split immediately after the newline character (\ n). If it is divided into “Aiueo \ n Kaki” and “Kukeko \ n Sashisoseso”, “Kiku” will cry and will not be recognized as a search target.

このような場面において、元データの分割処理にこのファイル分割システム10を適用すれば、以下の通り、元データを改行文字の直後の位置で正確に分割することが可能となる。   In this situation, if the file dividing system 10 is applied to the original data dividing process, the original data can be accurately divided at the position immediately after the line feed character as follows.

(1) データ割当処理部12が、元データを文字数ベースで7つのグループに区分し、第1の分割処理部21〜第7の分割処理部27に割り当てる。 (1) The data allocation processing unit 12 divides the original data into seven groups on the basis of the number of characters, and allocates the original data to the first division processing unit 21 to the seventh division processing unit 27.

(2) これに対し、第2の分割処理部22〜第7の分割処理部27は、自己の割当データに対して、先頭の文字から順に改行文字に該当するか否かを判定していき、最初の改行文字を発見した時点で、当該改行文字を含む判定済の文字列を判定済データとして判定済データ記憶領域14にファイル出力する。ここでは、改行文字の直後が「分割可能ポイント」に相当することとなる。 (2) On the other hand, the second division processing unit 22 to the seventh division processing unit 27 determine whether or not the assigned data corresponds to a line feed character in order from the first character. When the first line feed character is found, the determined character string including the line feed character is output to the determined data storage area 14 as determined data. Here, immediately after the line feed character corresponds to a “dividable point”.

(3) 同時に、第2の分割処理部22〜第7の分割処理部27は、最初の改行文字より後の文字列については、判定不要データとして判定不要データ記憶領域15に一括してファイル出力する。 (3) At the same time, the second division processing unit 22 to the seventh division processing unit 27 collectively output the character string after the first line feed character to the determination unnecessary data storage area 15 as the determination unnecessary data. To do.

(4) 第1の分割処理部21は、自己の割当データについて上記の改行文字探索処理を行うことなく、そのまま判定不要データ記憶領域15にファイル出力する。 (4) The first division processing unit 21 outputs the file as it is to the determination-unnecessary data storage area 15 without performing the above-described line feed character search process for its assigned data.

(5) 以上の結果、判定不要データ記憶領域15には7つの判定不要データがファイルとして格納されると共に、判定済データ記憶領域14には6つの判定済データがファイルとして格納されることとなる。 (5) As a result, seven determination unnecessary data are stored as files in the determination unnecessary data storage area 15 and six determination data are stored as files in the determined data storage area 14. .

(6) この後、7つの検索処理部(後続処理部)がコンピュータ上に起動され、「きく」の文字列を含む行を行単位で抽出する処理を並列的に実行する。 (6) After that, seven search processing units (subsequent processing units) are started on the computer, and the process of extracting the line including the character string “KIKU” in units of lines is executed in parallel.

(7) この際、第1の検索処理部は、第1の分割処理部21に係る判定不要データと第2の分割処理部22に係る判定済データを仮想的にマージし、一つのファイルとして取り扱う。 (7) At this time, the first search processing unit virtually merges the determination-unnecessary data related to the first division processing unit 21 and the determined data related to the second division processing unit 22 into one file. handle.

(8) この判定済データは、最後の文字列が改行文字で終わっているため、これを上記の判定不要データの最後尾に連結すれば、第1の分割ファイル中に泣き別れが生じることはない。 (8) Since the last character string of this judged data ends with a line feed character, if this is connected to the end of the above judgment-unnecessary data, no tearing will occur in the first divided file. .

(9) 以下同様に、第2の検索処理部〜第6の検索処理部は、第2の判定不要データ〜第6の判定不要データと、第2の判定済データ〜第6の判定済データとを、それぞれ仮想的にマージした上で、必要な検索処理を実行する。 (9) Similarly, the second search processing unit to the sixth search processing unit perform the second determination unnecessary data to the sixth determination unnecessary data, and the second determined data to the sixth determined data. Are virtually merged, and necessary search processing is executed.

(10)これに対し、第7の検索処理部は、第7の判定済データが存在しないため、第7の判定不要データのみを検索対象として取り扱う。 (10) On the other hand, since the seventh determined data does not exist, the seventh search processing unit treats only the seventh determination unnecessary data as a search target.

この発明に係るファイル分割システムの機能構成を示すブロック図である。It is a block diagram which shows the function structure of the file division | segmentation system which concerns on this invention. このシステムにおける処理手順を示すフローチャートである。It is a flowchart which shows the process sequence in this system. このシステムにおける処理手順を示す概念図である。It is a conceptual diagram which shows the process sequence in this system. ブレイク判定処理の具体例を示す説明図である。It is explanatory drawing which shows the specific example of a break determination process. キーブレイク処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of a key break process. これまでのファイル分割によって生じる問題点を示す説明図である。It is explanatory drawing which shows the problem which arises by the conventional file division | segmentation.

10 ファイル分割システム
12 データ割当処理部
13 元データ記憶領域
14 判定済データ記憶領域
15 判定不要データ記憶領域
16 集計結果記憶領域
21 第1の分割処理部
22 第2の分割処理部
23 第3の分割処理部
24 第4の分割処理部
25 第5の分割処理部
26 第6の分割処理部
27 第7の分割処理部
31 第1の集計処理部
32 第2の集計処理部
33 第3の集計処理部
34 第4の集計処理部
35 第5の集計処理部
36 第6の集計処理部
37 第7の集計処理部
40 コンピュータ
42 補助記憶装置
46 元データ
51〜57 割当データ
62〜67 判定済データ
71〜77 判定不要データ
81〜87 分割ファイル
α 最初のブレイクポイント
10 File division system
12 Data allocation processing part
13 Original data storage area
14 Judgment data storage area
15 Judgment unnecessary data storage area
16 Total result storage area
21 First division processing section
22 Second division processing section
23 Third division processing section
24 Fourth division processing section
25 Fifth division processing section
26 Sixth division processing section
27 Seventh division processing section
31 First tabulation processing section
32 Second tabulation processing section
33 Third tabulation processing section
34 Fourth tabulation processing section
35 Fifth tabulation processing section
36 Sixth tabulation processing section
37 Seventh tabulation processing section
40 computers
42 Auxiliary storage
46 source data
51-57 Allocation data
62 to 67 Judgment data
71 to 77 Judgment unnecessary data
81 ~ 87 Split file α First breakpoint

Claims (5)

複数の分割処理部と、
複数の分割許容ポイントを有している元データを、データの分量ベースで複数のグループに区分し、各グループに含まれるデータを上記の各分割処理部に割当データとして順番に関連付けるデータ割当処理部と、
複数の後続処理部を備え、
上記の各分割処理部の中、元データの最初のグループが割り当てられた先頭の分割処理部を除き、各分割処理部がそれぞれ自己の割当データについて先頭から分割許容ポイントを探索する処理を実行し、最初の分割許容ポイントを発見した時点で、当該最初の分割許容ポイントより前のデータを判定済データとして判定済データ記憶領域に出力すると共に、当該最初の分割許容ポイント以降のデータを判定不要データとして判定不要データ記憶領域に出力し、
上記先頭の分割処理部が、自己の割当データについて分割許容ポイントを探索する処理を実行することなく、そのまま判定不要データとして上記判定不要データ記憶領域に出力し、
上記の各後続処理部は、自己の担当する分割処理部の次の分割処理部に係る判定済データが存在する場合には、自己の担当する分割処理部に係る判定不要データの末尾に上記判定済データを仮想的に連結した上で必要な後続処理を実行し、上記の判定済データが存在しない場合には、自己の担当する分割処理部に係る判定不要データのみに対して必要な後続処理を実行することを特徴とするファイル分割システム。
A plurality of division processing units;
A data allocation processing unit that divides original data having a plurality of division permissible points into a plurality of groups based on the amount of data, and sequentially associates the data included in each group as the allocation data with each of the above division processing units When,
A plurality of subsequent processing units,
Except for the first division processing unit to which the first group of the original data is assigned among the above-mentioned division processing units, each division processing unit executes a process of searching for a division allowable point from the top for its own assigned data. When the first division allowable point is found, the data before the first division allowable point is output as determined data to the determined data storage area, and the data after the first division allowable point is determined as unnecessary data Output to the unnecessary data storage area,
The first division processing unit outputs the determination unnecessary data as it is to the determination unnecessary data storage area as it is without executing a process of searching for a division allowable point for its assigned data.
If there is already determined data related to the division processing unit next to the division processing unit in charge of each of the subsequent processing units, the above determination is made at the end of the determination unnecessary data related to the division processing unit in charge of the self. When necessary data is virtually connected and the necessary subsequent processing is executed, and if the above-mentioned determined data does not exist, the necessary subsequent processing is performed only for the unnecessary determination data related to the division processing unit in charge. A file division system characterized by executing
上記データ割当処理部が、キー項目の値に基づいてソートされた複数のレコードからなる元データを、レコードの件数ベースで複数のグループに区分し、
上記分割処理部が、上記元データに含まれる各レコードのキー項目の値が変化するブレイクポイントを分割許容ポイントとして探索することを特徴とする請求項1に記載のファイル分割システム。
The data allocation processing unit divides the original data consisting of a plurality of records sorted based on the value of the key item into a plurality of groups based on the number of records,
2. The file division system according to claim 1, wherein the division processing unit searches for a break point at which a value of a key item of each record included in the original data changes as a division allowable point.
上記データ割当処理部が、複数の改行文字を含むテキストファイルからなる元データを、文字数ベースで複数のグループに区分し、
上記分割処理部が、上記元データに含まれる各改行文字の直後を分割許容ポイントとして探索することを特徴とする請求項1に記載のファイル分割システム。
The data allocation processing unit divides the original data composed of text files including a plurality of line feed characters into a plurality of groups based on the number of characters,
The file division system according to claim 1, wherein the division processing unit searches as a division allowable point immediately after each line feed character included in the original data.
上記の各分割処理部による処理が、それぞれ別個のCPUコアによって実行されることを特徴とする請求項1〜3の何れかに記載のファイル分割システム。   The file division system according to claim 1, wherein the processing by each of the division processing units is executed by a separate CPU core. コンピュータにより実行されるファイル分割方法であって、
複数の分割許容ポイントを有している元データを、データの分量ベースで複数のグループに区分するステップと、
上記複数のグループの中、上記元データの最初のグループ以外の各グループについて、それぞれ先頭から分割許容ポイントを探索し、最初の分割許容ポイントを発見した時点で、当該最初の分割許容ポイントより前のデータを判定済データとして判定済データ記憶領域に出力するステップと、
当該最初の分割許容ポイント以降のデータを、判定不要データとして判定不要データ記憶領域に出力するステップと、
上記先頭のグループについては、分割許容ポイントを探索することなく、そのまま判定不要データとして上記判定不要データ記憶領域に出力するステップと、
上記判定不要データ記憶領域に格納された判定不要データの中、元データの最後のグループに係る判定不要データ以外の各判定不要データに対しては、それぞれ次のグループに係る判定済データを仮想的に連結した上で必要な後続処理を実行し、上記元データの最後のグループに係る判定不要データに対しては、そのまま必要な後続処理を実行するステップと、
からなることを特徴とするファイル分割方法。
A file division method executed by a computer,
Dividing the original data having a plurality of division allowable points into a plurality of groups based on the amount of data;
For each group other than the first group of the original data among the plurality of groups, a search is made for a division allowable point from the beginning, and when the first division allowable point is found, a point before the first division allowable point is found. Outputting data to the determined data storage area as determined data;
Outputting data after the first division permissible point to the determination unnecessary data storage area as determination unnecessary data;
For the top group, without searching for division allowable points, outputting the determination unnecessary data as it is to the determination unnecessary data storage area as it is,
Of the determination unnecessary data stored in the determination unnecessary data storage area, for each determination unnecessary data other than the determination unnecessary data related to the last group of the original data, the determined data related to the next group is virtually To perform necessary subsequent processing, and for the determination-unnecessary data related to the last group of the original data, performing the necessary subsequent processing as it is,
A file dividing method comprising:
JP2014206336A 2014-10-07 2014-10-07 File division system and method Active JP6355514B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014206336A JP6355514B2 (en) 2014-10-07 2014-10-07 File division system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014206336A JP6355514B2 (en) 2014-10-07 2014-10-07 File division system and method

Publications (2)

Publication Number Publication Date
JP2016076100A JP2016076100A (en) 2016-05-12
JP6355514B2 true JP6355514B2 (en) 2018-07-11

Family

ID=55951423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014206336A Active JP6355514B2 (en) 2014-10-07 2014-10-07 File division system and method

Country Status (1)

Country Link
JP (1) JP6355514B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6906434B2 (en) * 2017-11-28 2021-07-21 キオクシア株式会社 Electronic devices and file management methods
JP7185133B2 (en) * 2018-11-21 2022-12-07 富士通株式会社 Information processing device, information processing program and analysis method
JP7174245B2 (en) * 2018-12-27 2022-11-17 富士通株式会社 Information processing program, information processing apparatus, and information processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08147283A (en) * 1994-11-18 1996-06-07 Brother Ind Ltd Document processor
JP3199680B2 (en) * 1997-12-25 2001-08-20 三菱電機株式会社 Data aggregation device
JP2007086951A (en) * 2005-09-21 2007-04-05 Hitachi Software Eng Co Ltd File division processing method and file division program

Also Published As

Publication number Publication date
JP2016076100A (en) 2016-05-12

Similar Documents

Publication Publication Date Title
US9633010B2 (en) Converting data into natural language form
JP6605573B2 (en) Parallel decision tree processor architecture
US11734364B2 (en) Method and system for document similarity analysis
JP5138046B2 (en) Search system, search method and program
KR101768181B1 (en) Optimized browser rendering process
US9626434B2 (en) Systems and methods for generating and using aggregated search indices and non-aggregated value storage
US10579616B2 (en) Data search system, data search method, and program product
CN109791492B (en) Pipeline dependency tree query optimizer and scheduler
JP6355514B2 (en) File division system and method
WO2018118302A1 (en) Methods and apparatus to identify a count of n-grams appearing in a corpus
CN104035822A (en) Low-cost efficient internal storage redundancy removing method and system
CN109901978A (en) A kind of Hadoop log lossless compression method and system
US8667008B2 (en) Search request control apparatus and search request control method
CN113918807A (en) Data recommendation method and device, computing equipment and computer-readable storage medium
US20110191347A1 (en) Adaptive routing of documents to searchable indexes
JP5838871B2 (en) Data analysis device, data division device, data analysis method, data division method, data analysis program, and data division program
JP2002041551A (en) Compile method for data and storage medium storing the same
KR101331383B1 (en) Method and apparatus for processing data
US20190205394A1 (en) Method for generating text string dictionary, method for searching text string dictionary, and system for processing text string dictionary
CN113868249A (en) Data storage method and device, computer equipment and storage medium
CN112965939A (en) File merging method, device and equipment
US20130185401A1 (en) Configuration management device, configuration management method, and configuration management program
CN110543622A (en) Text similarity detection method and device, electronic equipment and readable storage medium
KR20150077669A (en) Data Analysis Method and System Using MapReduce Approach
US7840583B2 (en) Search device and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170522

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180214

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180410

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: 20180611

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180612

R150 Certificate of patent or registration of utility model

Ref document number: 6355514

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250