JP2005275440A - Data analyzing method and information processor - Google Patents
Data analyzing method and information processor Download PDFInfo
- Publication number
- JP2005275440A JP2005275440A JP2004083298A JP2004083298A JP2005275440A JP 2005275440 A JP2005275440 A JP 2005275440A JP 2004083298 A JP2004083298 A JP 2004083298A JP 2004083298 A JP2004083298 A JP 2004083298A JP 2005275440 A JP2005275440 A JP 2005275440A
- Authority
- JP
- Japan
- Prior art keywords
- data processing
- analysis
- data
- slave
- master
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
本発明は、データ分析方法に係り、特に、複数のデータ処理装置を用いて並列に分析を行うデータ分析方法に関する。 The present invention relates to a data analysis method, and more particularly to a data analysis method for performing analysis in parallel using a plurality of data processing devices.
大量のデータから知識を発見する技術はデータマイニングと呼ばれている。発見される知識の具体例としては、特徴ルール(Characteristic Rule)が知られている。特徴ルールとその発見法に関しては、特許文献1に記載されている。
A technique for discovering knowledge from a large amount of data is called data mining. As a specific example of discovered knowledge, a characteristic rule is known. The feature rule and its discovery method are described in
特徴ルールは、「IF A THEN B」の形式で書き表すことができる。A(条件部と呼ばれる)は、1個以上の条件の組み合わせであり、B(結論部と呼ばれる)は、単一の条件である。ここで、「条件」は、データの属性とその値の組であり、例えば「年齢=20代」のように記述される。特徴ルールには、一般性(ある特徴ルールがどのくらい多くのデータに適用できるかを示す指標)と精度(ある特徴ルールの条件部がどのくらい正確に結論部をあらわしているかを示す指標)とのトレードオフを考えて計算した評価尺度が定義される。この評価尺度は、「IF A THEN B」という特徴ルールにおいて、P(A)とP(B|A)との関数として算出される。ここで、P(A)及びP(B|A)は、それぞれ、全データのなかで条件Aを満たすデータの割合、P(B|A)は、条件Aを満たすデータのなかで、さらに条件Bも満たすデータの割合である。特徴ルール生成のアルゴリズムによれば、この評価尺度を用いてルールが評価され、その値の高い順にソートされたランキングの上位が結果として出力される。 The feature rule can be written in the form of “IF A THEN B”. A (called a condition part) is a combination of one or more conditions, and B (called a conclusion part) is a single condition. Here, “condition” is a set of data attributes and their values, and is described as “age = 20s”, for example. A feature rule is a trade-off between generality (an index that indicates how much data a feature rule can be applied to) and accuracy (an index that indicates how accurately the conditional part of a feature rule represents a conclusion). An evaluation scale calculated considering off is defined. This evaluation scale is calculated as a function of P (A) and P (B | A) in the feature rule “IF A THEN B”. Here, P (A) and P (B | A) are ratios of data satisfying the condition A among all data, and P (B | A) is a further condition among the data satisfying the condition A. It is the ratio of data that also satisfies B. According to the feature rule generation algorithm, rules are evaluated using this evaluation scale, and the higher rankings sorted in descending order of the values are output as results.
また、データマイニングのアルゴリズムは、膨大な量の計算を必要とすることがある。このため、分散環境においてアルゴリズムを実行するための方法が考案されている。 Also, data mining algorithms may require enormous amounts of computation. For this reason, a method for executing the algorithm in a distributed environment has been devised.
特徴ルールを複数の分析装置を用いて発見する技術については、特許文献2に記載されている。この技術においては、与えられた問題について、考えうる全ての特徴ルールの評価尺度を算出するのに必要な値を計数するカウンタが、複数のデータ分析装置で分割して保持されている。そして、一台のデータ格納装置が全分析装置に対して同時に1レコードづつデータを送信し、全分析装置が、P(A)、P(B|A)の値を算出するために、受信した1レコードのデータについて条件を満たすカウンタをカウントアップする。全分析装置がこの処理を終えると、データ格納装置が次のデータを分析装置に送信する。このような処理が繰り返されることによって全レコードについてデータが処理され、その後、全ての特徴ルールの評価値が算出されて、評価尺度が上位の特徴ルールが結果として出力される。
A technique for discovering feature rules using a plurality of analyzers is described in
また、データ分析問題を複数の分析装置を用いて解く技術について、非特許文献1に記載されている。この文献に記載されているSETI@homeによれば、電波望遠鏡から得られる信号データが、固定長のWork Unit(WU)に分割されて、多数のコンピュータ上で実行されるクライアントプログラムにインターネット経由で分配される。クライアントプログラムは、計算結果をサーバに返し、次のWUを得る。クライアント間ではお互いに一切の関わりを持たない。
Further, Non-Patent
ところが、上記従来の技術には以下のような課題がある。 However, the above conventional techniques have the following problems.
特許文献1記載のアルゴリズムは、単一の処理装置を用いてルールを発見することを前提にしている。このため、項目数が増えて探索するルールの数が増加した場合、1台の装置では十分な計算能力が得られず、アルゴリズムが停止するまでに非常に長い時間がかかる。特に、条件部に許される条件の数を増やして特徴ルール発見の探索を行った場合、探索すべきルールの数が爆発的に増加する。このため、探索にかかる時間が膨大になることがある。
The algorithm described in
また、特許文献2記載の技術においては、全処理装置が、分析対象データ1レコードの処理を終えるまで次のレコードの処理に移らない。このため、分析を行うシステム全体の処理速度が、最も処理の遅い分析装置の処理速度以上にはならない。
Further, in the technique described in
また、非特許文献1記載の技術においては、分析すべき問題全体を、クライアントとなるコンピュータの数以上に分割する手段が提供されていない。このため、分析に参加するクライアント数よりも少ない数のジョブに分割するようなケースについては、一台のマシンに少なくとも一つの問題を割り当てることができず、計算機リソースの利用に無駄が生じることがある。
In the technique described in
そこで、本発明は、複数のデータ処理装置で実行されるデータ分析処理において、全体の処理効率を向上させることを目的とする。 Accordingly, an object of the present invention is to improve the overall processing efficiency in data analysis processing executed by a plurality of data processing devices.
本発明は、
通信路を介して接続された第1データ処理装置と複数の第2データ処理装置を用いて、分析問題のデータ分析を行うデータ分析方法において、
前記第1データ処理装置が、前記分析問題を、前記第2データ処理装置の数よりも多い複数の部分問題に分割し、前記複数の第2データ処理装置のそれぞれに当該部分問題を1ずつ割り当てる処理と、
前記複数の部分問題のすべてがいずれかの第2データ処理装置に割り当て済みとなるまで、前記第1データ処理装置が、前記複数の第2データ処理装置のいずれかが、当該第2データ処理装置に割り当てられた部分問題の処理を終了させるごとに、前記複数の部分問題のうち、未割り当ての部分問題を当該第2データ処理装置に割り当てる処理と、
前記第1データ処理装置が、前記各第2データ処理装置から、当該第2データ処理装置に割り当てられた部分問題の処理結果を受け付ける処理と、
を有することを特徴とするデータ分析方法。
The present invention
In a data analysis method for performing data analysis of an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
The first data processing device divides the analysis problem into a plurality of partial problems larger than the number of the second data processing devices, and assigns the partial problem to each of the plurality of second data processing devices one by one. Processing,
Until all of the plurality of partial problems have been assigned to any of the second data processing devices, the first data processing device is one of the plurality of second data processing devices. A process of allocating an unassigned partial problem among the plurality of partial problems to the second data processing device each time processing of the partial problem assigned to
A process in which the first data processing device receives a processing result of a partial problem assigned to the second data processing device from each of the second data processing devices;
A data analysis method characterized by comprising:
また、本発明は、
通信路を介して接続された第1データ処理装置と複数の第2データ処理装置を用いて、分析問題のデータ分析を行うデータ分析方法において、
前記第1データ処理装置からの、前記分析問題の部分問題の割り当てが停止するまで、前記各第2データ処理装置が、前記第1データ処理装置から前記分析問題の部分問題が割り当てられるごとに、当該部分問題を処理して、当該処理の結果を保存する処理と、
前記分析問題の部分問題の割り当てが停止した第2データ処理装置が、前記保存している処理結果を前記第1データ処理装置へ送信する処理と、
を有することを特徴とするデータ分析方法を提供する。
The present invention also provides:
In a data analysis method for performing data analysis of an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
Each time the second data processing device is assigned the partial problem of the analysis problem from the first data processing device until the assignment of the partial problem of the analysis problem from the first data processing device is stopped, Processing the subproblem and storing the result of the processing;
A process in which the second data processing apparatus in which assignment of the partial problem of the analysis problem is stopped transmits the stored processing result to the first data processing apparatus;
A data analysis method characterized by comprising:
さらに、本発明は、
通信路を介して接続された第1データ処理装置と複数の第2データ処理装置を用いて分析問題の分析を行うデータ分析方法において、
前記各第2データ処理装置は、中断指示を受け付ける入力手段を有し、
当該データ分析方法は、
前記各第2データ処理装置は、前記入力手段が中断指示を受け付けるまで、前記第1データ処理装置から、前記分析問題の部分問題を割り当てられるごとに、当該部分問題を処理して、当該処理の結果を保存する処理と、
前記入力手段が中断指示を受け付けた第2データ処理装置が、前記保存している処理結果を前記第1データ処理装置へ送信する処理と、
を有することを特徴とするデータ分析方法を提供する。
Furthermore, the present invention provides
In a data analysis method for analyzing an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
Each of the second data processing devices has input means for receiving an interruption instruction,
The data analysis method is
Each of the second data processing devices processes the partial problem each time the partial problem of the analysis problem is assigned from the first data processing device until the input means receives an interruption instruction, and Processing to save the results;
A process in which the second data processing apparatus that has received the interruption instruction by the input means transmits the stored processing result to the first data processing apparatus;
A data analysis method characterized by comprising:
本発明によれば、分析問題を、分析に参加するデータ処理装置の数以上のジョブに分割し、各データ処理装置が処理するジョブを送信し、一つのジョブを処理し終えたデータ処理装置に、他のデータ処理装置のジョブの終了を待たずに次のジョブを与えることにより、各データ処理装置の処理能力の差による待ち時間を抑え、情報処理システムの計算機リソースを効率的に利用することができる。 According to the present invention, the analysis problem is divided into more jobs than the number of data processing devices participating in the analysis, the job processed by each data processing device is transmitted, and the data processing device that has finished processing one job. By giving the next job without waiting for the end of the job of another data processing device, the waiting time due to the difference in processing capacity of each data processing device is suppressed, and the computer resources of the information processing system are used efficiently Can do.
以下、本発明に係る第1の実施形態について説明する。 The first embodiment according to the present invention will be described below.
図1に、本発明の第1の実施形態に係るデータ分析システムの構成を示す。 FIG. 1 shows the configuration of a data analysis system according to the first embodiment of the present invention.
本データ分析システムにおいては、第1データ処理装置(マスタ)0101、データ記憶装置0108及び1以上の第2データ処理装置(スレーブ)0109が、バス型の通信路0110を介して接続されている。ここで、マスタ0101は、分析を管理する管理装置、スレーブは、実際に分析を行う分析装置0109である。
In this data analysis system, a first data processing device (master) 0101, a
マスタ0101は、処理装置0102、入出力装置0105、記憶装置0107、これら各装置を互いに接続する通信路0111、等を備える。処理装置0102は、処理装置0102が実行する処理に必要なデータを一時的に格納するメモリ0103を備え、メモリ0103には、処理装置0102が実行する処理が記述されたプログラム0104が記憶装置0107からロードされる。入出力装置0105は、キーボード、ディスプレイ等の入力装置、出力装置を含む入出力機器と、装置の外部との通信を管理する通信装置0106とを有する。マスタ0101は、この通信装置0106を介して通信路0110と接続されている。記憶装置0107は、大量のデータを記憶する容量を持つ、例えばハードディスク装置のような機器である。本実施の形態において、分析実行装置0109とデータ記憶装置0108も、同様の処理装置、記憶装置、入出力装置等を備えている。なお、記憶装置0107に格納されたプログラムは、CD―ROM等の記憶媒体からインストールされたものであってもよいし、通信回線0110を介してインストールされたものであってもよい。
The
本実施形態では、知識の発見に特徴ルール生成のアルゴリズムを用いる。以下に、特徴ルール生成について詳細を説明する。 In this embodiment, a feature rule generation algorithm is used for knowledge discovery. Details of the feature rule generation will be described below.
まず、分析対象データと、分析結果として出力される特徴ルールとについて説明する。 First, analysis target data and feature rules output as analysis results will be described.
本実施形態で用いられる分析対象データの例を図2に示す。 An example of analysis target data used in this embodiment is shown in FIG.
分析対象データは、複数の属性項目(以下、簡単に項目と書く場合がある)からなるレコードの集合である。全てのレコードは同じ属性項目を持っている。各属性項目には、それぞれのレコードの、ある属性をあらわす値が格納されている。レコード及び属性項目が具体的に何を表すかは分析対象データに依存する。例えば、ある商店の購買履歴のデータを分析対象とする場合、1つのレコードは、1人の顧客に対応し、各属性項目は、その顧客の顧客ID、性別、年齢、購買頻度、購入総額等の属性に対応する。 The analysis target data is a set of records composed of a plurality of attribute items (hereinafter sometimes simply referred to as items). All records have the same attribute items. Each attribute item stores a value representing a certain attribute of each record. What the records and attribute items specifically represent depends on the data to be analyzed. For example, when the purchase history data of a certain store is to be analyzed, one record corresponds to one customer, and each attribute item includes the customer ID, sex, age, purchase frequency, total purchase amount, etc. of the customer Corresponds to the attribute of.
特徴ルール生成では、前処理として、それぞれの属性項目の属性値を少数のカテゴリに変換する場合がある。この処理をカテゴリ化と呼ぶ。例えば、年齢という属性項目は通常10〜100程度の属性値を取り得るが、これを、「25歳以下」、「26歳から35歳」、「36歳以上」等の複数のカテゴリに変換する。この場合、年齢という属性項目を3つのカテゴリに変換したことになる。性別のように、元々「男」「女」の2値の属性値しか取らないものは、属性値をそのままカテゴリとして用いることもある。具体的には、性別は、2つのカテゴリ「男」「女」を持つ属性項目である。図2に示した分析対象データの属性項目は、このようなカテゴリ化の処理が施されたものである。 In feature rule generation, as pre-processing, attribute values of each attribute item may be converted into a small number of categories. This process is called categorization. For example, the attribute item “age” can normally have an attribute value of about 10 to 100, but this is converted into a plurality of categories such as “25 years old or younger”, “26 to 35 years old”, “36 years old or older”, and the like. . In this case, the attribute item of age is converted into three categories. As in the case of gender, an attribute value that originally takes only binary attribute values of “male” and “female” may be used as a category as it is. Specifically, the sex is an attribute item having two categories “male” and “female”. The attribute items of the analysis target data shown in FIG. 2 have been subjected to such categorization processing.
特徴ルールは、例えば、次のように書き表すことができる。 The feature rule can be written as follows, for example.
「IF 年齢=26〜35 AND 購買頻度=高 THEN 購入総額=高」。 “IF age = 26 to 35 AND purchase frequency = high THEN purchase total = high”.
すなわち、特徴ルールは、属性項目とそのカテゴリとを組み合わせた節をIF以下の条件部とTHEN以下の結論部とに有する、IF〜THENルールとして表される。条件部に現れる属性を条件項目、結論部に現れる属性を結論項目、特徴ルールの条件部に現れる条件項目とそのカテゴリとの組を条件節と呼ぶ。 That is, the feature rule is expressed as an IF to THEN rule having a clause combining the attribute item and its category in a condition part below IF and a conclusion part below THEN. An attribute appearing in the condition part is called a condition item, an attribute appearing in the conclusion part is called a conclusion item, and a combination of the condition item appearing in the condition part of the feature rule and its category is called a conditional clause.
特徴ルールは、そのルールが対象データの特徴をどの程度よく表しているかを定量的に評価する指標となる評価値を有する。特徴ルールを一般的に「IF A THEN B」と表す場合、評価値は、次式で定義される。 The feature rule has an evaluation value that serves as an index for quantitatively evaluating how well the rule represents the feature of the target data. When the characteristic rule is generally expressed as “IF A THEN B”, the evaluation value is defined by the following expression.
P(A)^a * log(P(B|A)/P(B))
ここで、P(A)、P(B)は、それぞれ、分析対象データ全体のうち、条件A、条件Bを満足するレコードの割合、P(B|A)は、条件Aを満足するレコードのうち、条件Aと条件Bの両方を満足するレコードの割合である。また、指数aは、ルールの評価において一般性(あるルールがどのくらい多くのデータに適用できるかを示す指標)と精度(あるルールの条件部がどのくらい正確に結論部を表しているを示す指標)のいずれに重点をおくかを定める正の定数である。この評価値は、分析者によって指定されてもよいし、次式によって定められてもよい。
P (A) ^ a * log (P (B | A) / P (B))
Here, P (A) and P (B) are ratios of records satisfying the condition A and the condition B, respectively, and P (B | A) is a record of the records satisfying the condition A. Of these, the ratio is the ratio of records satisfying both condition A and condition B. The index a is generality (an index indicating how much data a rule can be applied to) and accuracy (an index indicating how accurately the condition part of a rule represents a conclusion part) in the rule evaluation. It is a positive constant that determines which of these should be emphasized. This evaluation value may be specified by an analyst or may be determined by the following equation.
P(A)^a * P(B|A) * log(P(B|A)/P(B))
評価値にいずれの値を用いるにしても、ある特徴ルールに現れる条件部を満たすレコードの数、結論部を満たすレコードの数、条件部と結論部とを満たすレコードの数、および分析対象データ全体のレコード数を知ることによって、評価値を算出することができる。特徴ルール生成では、この評価値によって特徴ルールを評価し、評価値の高い特徴ルールから順にソートしてその上位を結果として出力する。ソートされた特徴ルールの例を図3に示す。
P (A) ^ a * P (B | A) * log (P (B | A) / P (B))
Regardless of which value is used for the evaluation value, the number of records that satisfy the condition part that appears in a certain characteristic rule, the number of records that satisfy the conclusion part, the number of records that satisfy the condition part and the conclusion part, and the entire analysis target data The evaluation value can be calculated by knowing the number of records. In the feature rule generation, the feature rules are evaluated based on the evaluation value, sorted in descending order from the feature rule having the highest evaluation value, and the higher order is output as a result. An example of the sorted feature rules is shown in FIG.
特徴ルール生成とは、上記で定義した評価値に基づき、評価値の大きな特徴ルールを発見するアルゴリズムである。この処理を行うにあたっては、処理を実行する前に分析者によって、発見すべき特徴ルール数の上限、結論項目となる属性項目とそのカテゴリ、条件部に含まれる属性項目の候補となる複数の属性項目(以下、条件項目という)、一つの特徴ルールに含まれる条件項目の数の上限(以下、最大条件節数という)が与えられているものとする。 The feature rule generation is an algorithm for finding a feature rule having a large evaluation value based on the evaluation value defined above. Before performing this process, the analyst should limit the number of feature rules to be discovered, the attribute item that is the conclusion item, its category, and the multiple attributes that are candidates for the attribute item included in the condition part. It is assumed that an upper limit (hereinafter referred to as the maximum number of conditional clauses) of items (hereinafter referred to as condition items) and the number of condition items included in one feature rule is given.
いま、条件項目A(1)〜A(M) (Mは条件項目の数)が与えられており、各条件項目はB(A(m),1)〜B(A(m), N(A(m))にカテゴリ化されているものとする(ここで、N(A(m))は、条件項目A(m)のカテゴリ数、mは1≦m≦Mの整数である)。最大条件節数をC_maxとすると、特徴ルール「IF X THEN Y」は、以下のように述べることができる。 Now, condition items A (1) to A (M) (M is the number of condition items) are given, and each condition item is B (A (m), 1) to B (A (m), N ( (N (A (m)) is the number of categories of the condition item A (m), and m is an integer of 1 ≦ m ≦ M). If the maximum number of conditional clauses is C_max, the feature rule “IF X THEN Y” can be described as follows.
条件部Xは、条件節C(i)の論理積「C(1) and … and C(k)」と表すことができる。ここで、iは1≦i≦kの整数、kは1≦k≦C_maxの整数である。条件節C(i)は、条件項目A(m)とA(m)のカテゴリB(A(m),n)との組み合わせであり、ルール中、「A(m)=B(A(m),n)」と表現される。 The condition part X can be expressed as a logical product “C (1) and... And C (k)” of the conditional clause C (i). Here, i is an integer of 1 ≦ i ≦ k, and k is an integer of 1 ≦ k ≦ C_max. Conditional clause C (i) is a combination of condition item A (m) and category B (A (m), n) of A (m). In the rule, “A (m) = B (A (m ), n) ".
ここで、条件節が複数個含まれる特徴ルールは、以下のような性質を持つものとする。k個の条件節からなる条件部C(1) and … and C(k) (2≦k≦C_max)において、任意の2個の条件節をC(i),C(j) (C(i)はA(m)=B(A(m),n)、C(j)はA(P)=B(A(P),q)とする)としたとき、i<jならばm<Pとなる。すなわち、一つのルールにおいて、同じ条件項目は現れず、条件節は条件項目の添え字で昇順に並んでいるものとする。 Here, a feature rule including a plurality of conditional clauses has the following properties. In a conditional part C (1) and... and C (k) (2 ≦ k ≦ C_max) composed of k conditional clauses, arbitrary two conditional clauses are represented by C (i), C (j) (C (i ) Is A (m) = B (A (m), n), and C (j) is A (P) = B (A (P), q)). P. That is, in one rule, the same condition item does not appear, and the condition clauses are arranged in ascending order by the subscript of the condition item.
上記の説明より考え得る特徴ルールは数多く存在するが、それらの関係は図4及び図5に示すような木構造で表わすことができる。特徴ルール生成においては、この木(以下、探索木と呼ぶ)を走査(探索)することによってルールを発見する。 There are many feature rules that can be considered from the above description, but their relationship can be represented by a tree structure as shown in FIGS. In feature rule generation, a rule is found by scanning (searching) this tree (hereinafter referred to as a search tree).
探索木におけるルール間の順序関係を以下の通り定める。 The order relation between rules in the search tree is defined as follows.
条件項目の順序関係と、各条件項目のカテゴリ間の順序関係とは、予め定められていることとする。例えば、条件項目に適当なインデックス番号を与え、それぞれの条件項目において、含まれるカテゴリにもインデックス番号を与えると、インデックス番号の大小によって順序関係を定めることができる。条件節、カテゴリの順序関係は、それぞれインデックス番号が小さい方の順序が先になる。 It is assumed that the order relationship of the condition items and the order relationship between the categories of the condition items are determined in advance. For example, when an appropriate index number is given to a condition item and an index number is given to an included category in each condition item, the order relationship can be determined by the size of the index number. As for the order relationship between the conditional clauses and the categories, the order with the smaller index number is first.
条件項目の順序関係とカテゴリの順序関係とに基づき、条件節と条件部との順序関係を定める。条件節の順序関係は、まず条件項目の順序関係によって決定され、条件項目が同じ場合には、カテゴリの順序関係によって決定される。条件部の順序関係は、条件部に含まれる条件節を順序関係の早い順に整列し、これらの順序関係を先頭の条件節から比較することによって定める。 Based on the order relation of the condition items and the order relation of the categories, the order relation between the conditional clause and the condition part is determined. The order relation of the conditional clauses is first determined by the order relation of the condition items. When the condition items are the same, the order relation of the categories is determined. The order relation of the condition parts is determined by arranging the condition clauses included in the condition part in the order of the order relation, and comparing these order relations from the first condition clause.
探索木の具体例を図4に示す。この探索木において、ルートノード0401を除く全てのノードが一つの特徴ルールに対応する。ルートノード0401からあるノードに至るまでの枝の数を深さと呼び、同一の深さにあるノードの集合をレイヤと呼ぶことにすると、破線で囲まれた深さ1のノードの集合0404が一つのレイヤを形成している。
A specific example of the search tree is shown in FIG. In this search tree, all nodes except the
レイヤ0404には条件項目とそのカテゴリの考え得る全ての組み合わせがノードとして含まれており、それぞれのノードは、1つの条件節を持つルールに対応している。結論部を「購入総額=高」として特徴ルールを発見する場合を仮定すると、例えばノード0402は、「IF 性別=男 THEN 購入総額=高」というルールに対応する。また、レイヤ0404の下位に位置する深さ2のレイヤ0405には、2つの条件節を持つ特徴ルールに対応するノードが含まれている。例えば、ノード0403は、「IF 性別=男性 AND 購買頻度=高 THEN 購入総額=高」というルールに対応する。つまり、ノードの深さはルールの条件節数に対応する。
The
ここで、枝で結ばれた二つのノードのうち、上位にあるノードを親ノード、下位にあるノードを子ノードと呼び、それぞれのノードに対応するルールを親ルール及び子ルールと呼ぶことにする。探索木においては、子ルールが条件部「C(1) and … and C(k−1) and C(k)」を有する場合、その親ルールの条件部は、子ルールの条件部から、最後に現れる条件節C(k)を取り除いた「C(1) and … and C(k−1)」という条件部を持つ。 Here, of the two nodes connected by branches, the upper node is called a parent node, the lower node is called a child node, and the rules corresponding to each node are called a parent rule and a child rule. . In the search tree, when the child rule has a condition part “C (1) and... And C (k−1) and C (k)”, the condition part of the parent rule is the last from the condition part of the child rule. The conditional part “C (1) and... And C (k−1)” is removed from the conditional clause C (k) appearing in FIG.
探索木の別の例として、探索木の木全体の概要を描いたものを、図5に示す。図5は、5つの条件項目A〜Eがそれぞれ5つのカテゴリに分割された、最大条件節数を3として探索を行う場合の探索木の概念図である。 As another example of the search tree, FIG. 5 shows an outline of the entire search tree. FIG. 5 is a conceptual diagram of a search tree in the case where the search is performed with the maximum number of conditional clauses being 3, in which the five condition items A to E are each divided into five categories.
本実施形態に係る特徴ルールの性質を考慮すると、特徴ルール生成における探索木は、N個(Nは条件項目数)の項目からM個以下(Mは最大条件節数)の項目を選ぶときの組み合わせを書き出し、さらに各条件項目がそれぞれカテゴリ化されていることを考慮して、条件項目とカテゴリ値との取り得る組み合わせを、重複なく書き出したものである、ということができる。 Considering the characteristics of the feature rule according to the present embodiment, the search tree for generating the feature rule is selected when N or less items (M is the maximum number of conditional clauses) are selected from N items (N is the number of conditional items). Considering that the combination is written and each condition item is categorized, it can be said that the possible combinations of the condition item and the category value are written without duplication.
探索木において全てのノードを評価する手順として、幅優先探索、深さ優先探索などのアルゴリズムが考えられる。幅優先探索とは、探索木の深さ1のレイヤより、同じレイヤにあるノードをまず評価し、そのレイヤの全てのノードを評価し終えたら、次のレイヤに移るという探索方法である。深さ優先探索とは、ノードの親子関係に着目し、同じレイヤにあるノードより子ノードを優先してノードを巡回する探索方法である。 As procedures for evaluating all nodes in the search tree, algorithms such as a breadth-first search and a depth-first search can be considered. The breadth-first search is a search method in which a node in the same layer is evaluated first from a layer having a depth of 1 in the search tree, and when all nodes in the layer have been evaluated, the process moves to the next layer. The depth-first search is a search method that pays attention to the parent-child relationship of nodes and circulates the nodes by giving priority to the child nodes over the nodes in the same layer.
次に、本実施形態に係る探索木の分割処理について説明する。探索木を部分木に分割する方法の一例を、図6を用いて説明する。なお、図6に示す探索木は、図5と同様のものである
図6において、破線で囲まれたノード群0601は、深さ1のレイヤに含まれる全てのノードを表している。同じ条件項目を持つノードを一つのグループとして、ノード群0601に含まれるノードをより小さなノード群に分けると、ノード群0602〜0604となる。同様に深さ2のレイヤに含まれるノード群も、深さ1のレイヤで同じグループになったノードの子ノードが一つのグループとなるようにノード群に分割する。以下、深さ2以上のレイヤに含まれるノード群も同様に分割する。このようにして分割されたそれぞれのノード群を、探索木を探索する際のジョブと呼ぶことにする。
Next, search tree division processing according to the present embodiment will be described. An example of a method for dividing the search tree into partial trees will be described with reference to FIG. The search tree shown in FIG. 6 is the same as that in FIG. 5. In FIG. 6, the
このような分割方法によれば、ジョブがそれぞれのレイヤを基準として独立して切り分けられるので、幅優先探索のアルゴリズムを適用して特徴ルール生成を行うことができる。 According to such a dividing method, since jobs are separated independently based on each layer, feature rule generation can be performed by applying a breadth-first search algorithm.
また、分割方法の別の例を、図7を用いて説明する。図7に示す木は、特徴ルール生成における探索木であり、図5と同様のものである。 Another example of the division method will be described with reference to FIG. The tree shown in FIG. 7 is a search tree in feature rule generation, and is the same as FIG.
1条件を持つ特徴ルールの集合であるレイヤ0701に着目する。このレイヤ0701において、同一の条件項目を条件部にもつルールに対応するノードと、それらのノードをルートノードとして持つ部分木の集合とを一つのジョブとみなして、探索木全体を分割する。すなわち、図7においては、部分木0702〜0704がそれぞれ一つのジョブを表す。このような分割方法によれば、それぞれの部分木に深さ優先探索のアルゴリズムを適用して特徴ルール生成を行うことができる。
Focus on
本実施形態においては、図6に示した探索木の分割方法を採用し、この分割方法により分割されたジョブを複数のスレーブで処理することによって特徴ルールの生成を行うことを考える。 In the present embodiment, it is considered that the search tree dividing method shown in FIG. 6 is adopted, and a feature rule is generated by processing a job divided by this dividing method with a plurality of slaves.
各ジョブの探索アルゴリズムには幅優先探索を用いる。幅優先探索で特徴ルール生成を行う場合、深さ1のレイヤから順にノードを評価する。各レイヤにおいて特徴ルールの探索を行う際には、その前のレイヤ(深さが1少ないレイヤ)までのルール生成結果を参照し、冗長なルールを排除しつつ特徴ルールの探索を行う必要がある。ここで、冗長ルールとは以下のようなルールのことである。すなわち、ルールR_a,R_bを含むルールの集合Rにおいて、条件部R_aが条件部R_bに含まれる条件節のいくつかからなり、かつ、R_aの評価値がR_bと同じかまたは大きいとき、ルール集合Rのなかにおいて、R_bは冗長ルールである。 A breadth-first search is used as a search algorithm for each job. When feature rule generation is performed by breadth-first search, nodes are evaluated in order from a layer having a depth of 1. When searching for a feature rule in each layer, it is necessary to refer to the rule generation result up to the previous layer (layer having a depth of 1 less) and to search for a feature rule while eliminating redundant rules. . Here, the redundancy rule is the following rule. That is, in the rule set R including the rules R_a and R_b, when the condition part R_a is composed of some condition clauses included in the condition part R_b and the evaluation value of R_a is equal to or larger than R_b, the rule set R Among these, R_b is a redundancy rule.
つまり、幅優先探索では、レイヤn(ただし、1≦n≦C_max-1)のルール探索が完了するまではレイヤn+1の探索に進めないことになる。このため、本実施形態に係るルール生成の手順においては、待ち合わせの処理を行い、マスタがレイヤnのジョブの分析結果全てをスレーブから受け取るまで、レイヤn+1に含まれるジョブの処理を開始しないようになっている。 That is, in the breadth-first search, the search for the layer n + 1 cannot proceed until the rule search for the layer n (where 1 ≦ n ≦ C_max−1) is completed. For this reason, in the rule generation procedure according to this embodiment, processing for waiting is performed, and processing of jobs included in layer n + 1 is not started until the master receives all analysis results of jobs in layer n from the slave. It is like that.
図8〜図13を用いて、本実施形態に係る特徴ルール生成の詳細を説明する。 Details of feature rule generation according to the present embodiment will be described with reference to FIGS.
図8は、マスタが分析実行装置(スレーブ)を管理するための処理の詳細なフローチャートである。マスタがスレーブを管理する処理は、ルール生成中と、ルール生成が行われていないときとでは異なる。図8に示したのは、特徴ルール生成の分析が行われていない場合の処理のフローチャートである。 FIG. 8 is a detailed flowchart of a process for the master to manage the analysis execution device (slave). The process of managing the slave by the master differs between when the rule is being generated and when the rule is not being generated. FIG. 8 is a flowchart of processing when the analysis of feature rule generation is not performed.
スレーブ管理テーブルの一例を図9に示す。 An example of the slave management table is shown in FIG.
このスレーブ管理テーブルは、マスタと通信して分析を行うスレーブの情報を管理するためのもので、メモリ0103に保持される。このスレーブ管理テーブルには、スレーブごとに、少なくとも、スレーブを一意に識別するためのID0901、スレーブと通信路を用いて通信する際に必要な情報0902と、が格納されている。この情報0902は、例えばTCP/IPを用いて通信を行う場合には、スレーブのIPアドレス及びポート番号である。
This slave management table is used to manage information on slaves that perform analysis by communicating with the master, and is held in the
図8において、マスタ0101は、スレーブ0109を管理する処理S0801〜S0804を実行するのと並行して、パラメータ入力受付処理を実行する。処理S0801〜S0804とパラメータ入力受付処理は、マルチスレッドなど、処理装置内で複数のタスクを同時に実行する機構を用いて並行に処理される。
In FIG. 8, the
パラメータ入力受付処理では、分析者が、入出力装置0105により、データ記憶装置0108に格納されている分析対象データのファイル名を指定し、これをメモリ0103に読み込む。ここで、分析対象データは、特徴ルール生成を用いてルール生成を行う対象となるデータであり、例えば、表形式のファイル、データベース内のデータ等の形式で、データ記憶装置0108に格納されている。なお、ここでは、データ記憶装置0108に分析対象データを格納しているが、マスタ内の記憶装置0107に分析対象データを格納し、記憶装置0107から分析対象データがメモリ0103に読み込まれるようにしてもよい。
In the parameter input acceptance process, the analyst designates the file name of the analysis target data stored in the
分析対象データをメモリ0103に格納するに当たって、各属性項目には、それぞれ、項目を一意に特定するためのインデックス番号が割り当てられる。例えば、分析対象データのなかで属性項目が現れる順に属性項目に通し番号を振り、この値をインデックス番号として用いることができる。
In storing the analysis target data in the
分析者は、さらに、分析対象データのカテゴリ化に関する情報、ルール生成に用いる条件項目と結論部、ルール生成パラメータ、分析に参加するスレーブ数の想定最大値を、入出力装置0105により入力し、これらをメモリ0103に格納する。
The analyst further inputs information related to the categorization of the analysis target data, condition items and conclusion part used for rule generation, rule generation parameters, and assumed maximum value of the number of slaves participating in the analysis, using the input /
分析対象データのカテゴリ化に関する情報は、分析対象データに含まれる各属性項目をカテゴリ化するための情報である。この情報には、それぞれの属性項目のカテゴリ数、属性項目のとる値をカテゴリに変換するための境界値、それぞれのカテゴリに含まれるデータのレコード数が含まれている。それぞれの属性項目において、項目の各カテゴリには、インデックス番号が付与される。 The information regarding the categorization of the analysis target data is information for categorizing each attribute item included in the analysis target data. This information includes the number of categories of each attribute item, the boundary value for converting the value of the attribute item into a category, and the number of records of data included in each category. In each attribute item, an index number is assigned to each category of the item.
条件項目と結論部とに関する情報は、ルール生成で用いる条件項目と結論項目、および結論部として用いる結論部のカテゴリの情報が含まれる。これらは、マスタ0101の内部において、属性項目、カテゴリに付与したインデックス番号で管理される。
The information regarding the condition item and the conclusion part includes information on the condition item and the conclusion item used in rule generation, and the category of the conclusion part used as the conclusion part. These are managed in the
ルール生成に用いる条件項目及び結論部は、条件部に現れる属性項目の候補となる項目の組み合わせと、結論部となる属性項目とカテゴリとの組である。 A condition item and a conclusion part used for rule generation are a combination of an item that is a candidate for an attribute item that appears in the condition part, and a combination of an attribute item that is a conclusion part and a category.
ルール生成パラメータには、発見する特徴ルールの個数R_max、最大条件節数C_maxが含まれる。 The rule generation parameters include the number R_max of feature rules to be discovered and the maximum number of conditional clauses C_max.
スレーブ数の想定最大値には、分析に用いるスレーブの数より大きい値が指定される。 As the assumed maximum value of the number of slaves, a value larger than the number of slaves used for analysis is designated.
パラメータ入力受付処理は、これらの情報の入力後に終了する。 The parameter input acceptance process ends after the input of these pieces of information.
S0801において、マスタ0101は、スレーブ0109からの信号を受信していないかどうかをチェックする。その結果、スレーブ追加の信号をスレーブから受信したと判断した場合には、マスタ0101は、スレーブ追加処理S0802を実行する。また、スレーブ削除の信号をスレーブから受信したと判断した場合には、マスタ0101は、スレーブ削除処理S0803を実行する。一方、いずれの信号も受信していないと判断した場合には、マスタ0101は、分岐処理S0804を実行する。
In S0801, the
スレーブ追加処理S0802において、マスタ0101は、S0801で受け取った信号の発信元スレーブに、このスレーブを識別するためのID番号を割り当て、スレーブのIPアドレスとスレーブが通信に用いるポート番号を取得し、これらの値を、スレーブ管理テーブルに格納する。ID番号は、例えば、信号の発信元スレーブに、マスタにおける信号受信順に通し番号を付与する等によってスレーブに割り当てられる。その後、マスタ0101は、処理をS0801に戻す。
In the slave addition process S0802, the
スレーブ削除処理0802において、マスタ0101は、S801で受け取った中断要求の信号の発信元スレーブを管理テーブルから削除する。
In the slave deletion process 0802, the
一方、S0804では、マスタ0101は、入出力装置0105からの入力内容をチェックし、ルール生成実行開始の信号の入力があるか否かを調べる。その結果、ルール生成実行開始の信号の入力があれば、マスタ0101は、分析実行開始処理S0805を実行し、そうでなければ、マスタ0101は、S0801に処理を戻す。
On the other hand, in S0804, the
分析実行開始処理S0805では、マスタ0101は、ルール生成を行うための準備((1)分析対象データをスレーブに送信する準備、(2)分析結果のルールを格納する準備、(3)探索木のジョブへの分割、(4)分析の初期条件の設定)を行う。
(1)分析対象データをスレーブに送信する準備
マスタ0101は、メモリ0103内に格納されている分析対象データの、条件項目、結論部の項目に対応する各属性項目のデータをカテゴリ化する。
(2)分析結果のルールを格納する準備
マスタ0101は、メモリ0103内に分析結果の特徴ルールを格納するのに十分な領域を確保する。この領域には、分析の途中結果として、分析中のある時点でスレーブから受け取った上位R_max個のルールが格納される。
(3)探索木のジョブへの分割
マスタ0101は、図6で示した方法にしたがって、以下のように探索木をジョブに分割する。
In the analysis execution start process S0805, the
(1) Preparation for transmitting analysis target data to slave The
(2) Preparation for storing analysis result rules The
(3) Division of Search Tree into
マスタ0101は、分析対象データの条件項目に、条件項目メモリ0103に格納された順に条件項目A(1)、条件項目A(2)等のインデックス番号を与えて、順序関係を定める。それぞれの条件項目のカテゴリについても、同様にインデックス番号を与え、順序関係を定める。これにより、条件項目とカテゴリとに関して順序関係が定められ、条件部の順序関係を定めることができる。
The
分割した各ジョブに関する情報は、マスタ0101内のジョブ管理テーブルで管理する。ジョブ管理テーブルの一例を図10に示す。図10に示すように、ジョブ管理テーブルには、ジョブごとに、少なくとも、ジョブを一意に識別するためのジョブID1001、レイヤ番号1002、ジョブの分析開始ノード1003、分析終了ノード1004、そのジョブの分析を担当するスレーブのIDを格納する担当スレーブ1005、分析の状態(例えば、分析中、分析完了等)に関する情報を保持するジョブ状態フラグ1006が含まれている。このジョブ管理テーブルは、メモリ0103に格納されている。
Information regarding each divided job is managed by a job management table in the
マスタ0101は、上記の順序関係に基づいて、ジョブの分析開始ノードと分析終了ノードを特定することにより、各ジョブに含まれるノードを一意に決定することができる。例えば、ジョブ0602の分析開始ノードとして条件部「A=a(1)」、ジョブ0602の分析終了ノードとして「A=a(5)」を指定することにより、ジョブ0602で分析するノードを一意に決定することができる。ノードは、マスタ0101、スレーブ0109においては、条件項目とカテゴリのインデックス番号の組として表現される。例えば、条件項目Aのインデックス番号を1、カテゴリa(1)のインデックス番号を1、カテゴリa(5)のインデックス番号を5とすれば、ジョブ0601の開始ノード及び終了ノードは、それぞれ、(1,1)、(1,5)と表すことができる。条件節が複数ある場合、一つのノードは、複数の条件項目とカテゴリのインデックス番号との組で表現される。なお、以下において、ノードが計算機内で操作されている場合、実際には、このようなインデックス番号が計算機の内部で操作されていることとする。
The
これを踏まえて、探索木のジョブへの分割は、以下のように実現される。 Based on this, the search tree is divided into jobs as follows.
マスタ0101は、レイヤの深さを表す変数Iの初期値=1、条件項目の番号を表す変数mの初期値=1として以下の処理を繰り返し実行する。
The
あるジョブの分析開始ノードに対応する条件節X_sをC_s(1) and … and C_s(I)、分析終了ノードに対応する条件節X_eをC_e(1) and … and C_e(I)と書くことにする。ここで、C_s(1)は(m,1)、C_s(i)(2≦i≦I)は(m+i-1,1)、C_e(1)は(m,N(A(m)))、C_e(i)(2≦i≦I)は(M-I+i,N(A(M-I+i)))、Mは条件項目の数である。この方法によって、マスタ0101は、分析開始ノードと分析終了ノードの条件項目とカテゴリの組を決定し、この分析開始ノード1003、分析終了ノード1004、ジョブを一意に識別するジョブID1001、そのジョブが含まれるレイヤ1002をジョブ管理テーブルに格納する。ここで、ジョブIDは、例えばジョブの登録順に通し番号付与することによってジョブに与えられる。また、このジョブの担当スレーブ1005を「未割り当て」とする。
The conditional clause X_s corresponding to the analysis start node of a job is written as C_s (1) and C_s (I), and the conditional clause X_e corresponding to the analysis end node is written as C_e (1) and… and C_e (I). To do. Here, C_s (1) is (m, 1), C_s (i) (2 ≦ i ≦ I) is (m + i−1,1), and C_e (1) is (m, N (A (m)) )), C_e (i) (2 ≦ i ≦ I) is (M−I + i, N (A (M−I + i))), and M is the number of condition items. By this method, the
マスタ0101は、この処理を、変数mを1づつ増加させながら、mがM-I+1に等しくなるまで繰り返す。mがM-I+1に等しくなったら、マスタ0101は、mを初期値「1」に戻してIを1だけ増加させ、Iが最大条件節数C_maxに等しくなるまで同様の処理を繰り返す。
The
分析に参加するスレーブの数の想定最大値よりも各レイヤに含まれるジョブの数が少ない場合には、マスタ0101は、一番多くのルールを含むジョブを2分割する処理を繰り返すことによって、レイヤに含まれるジョブの数をスレーブの数の想定最大値よりも大きくする。この処理は全レイヤについて同様に行う。ここで、ジョブを2分割する処理は、以下のようにして実現する。
When the number of jobs included in each layer is smaller than the assumed maximum value of the number of slaves participating in the analysis, the
ジョブJをジョブJ(1)及ジョブJ(2)に分割する場合、マスタ0101は、各条件項目のカテゴリ分割数から、ジョブに含まれるルールの数を算出し、これを2で割る。なお、カテゴリ分割数の情報はメモリ0103に格納されている。その後、マスタ0101は、ルール数を2で割ることによって得た商の端数を切り捨て、得られた整数をNとする。マスタ0101は、Jの開始ノードを、J(1)の開始ノードとし、J(1)の開始ノードから、ノードの順序関係に従ってノードを数え、N番目のノードをJ(1)の終了ノードとする。
When dividing the job J into the job J (1) and the job J (2), the
また、マスタ0101は、J(1)の終了ノードの次ノードをJ(2)の開始ノードとし、Jの終了ノードをJ(2)の終了ノードとして、J(1)及びJ(2)の情報をジョブ管理テーブルへ格納する。これにより、ジョブ管理テーブル内のジョブJの情報がJ(1)の情報で上書きされ、J(2)の情報が管理テーブルに追加される。
In addition, the
以上により、1つのレイヤに含まれるノードの数がスレーブの想定最大値を下回らない限り、1つのレイヤのルール探索を、スレーブより多くのジョブに分割することができる。
(4)分析の初期条件を設定する処理
マスタ0101は、割り当て可能レイヤ番号を格納するためのパラメータを用意し、レイヤ番号1を割り当て可能レイヤ番号に設定する。また、マスタ0101は、採用されるルールの最小評価値を格納するためのパラメータを用意し、そのパラメータを初期化する。パラメータの初期化に用いられる値はルールの評価方法によって異なるが、本実施形態に係る評価値を用いる場合には、パラメータに「0」を設定することによって初期化を行う。このパラメータは、スレーブによってルールを評価する際に用いられる。具体的には、ルールの評価値がこのパラメータ値を下回ることがわかった時点で、そのルールに関するそれ以降の評価処理を行わない、というように用いられる。これにより、処理の削減が図られる。なお、これらのパラメータを格納する領域はメモリ0103に確保する。
As described above, as long as the number of nodes included in one layer does not fall below the assumed maximum value of the slave, the rule search of one layer can be divided into more jobs than the slave.
(4) Process for Setting Initial Conditions for Analysis The
これらの準備処理(1)〜(4)が実行された後、分析実行開始処理S0805において、マスタ0101は、図11に示すスレーブ管理処理と、図12に示す分析処理とを開始する。これらの処理は、マスタ0101内において、図8における処理と並行に実行される。この処理は、マルチスレッドなど、処理装置内で複数のタスクを同時に実行する機構を用いて実現される。なお、図11に示すスレーブ管理処理は、分析の実行中にスレーブを管理する処理である。
After these preparation processes (1) to (4) are executed, in analysis execution start process S0805,
分析実行開始処理S0805が終了すると、分析実行通知処理S0806に進む。 When the analysis execution start process S0805 ends, the process proceeds to the analysis execution notification process S0806.
分析実行通知処理S0806は、マスタ0101は、スレーブ管理テーブルに登録されている、全てのスレーブに対して、通信路0110を介して分析実行通知信号を送信する。分析実行通知処理の完了後、この手順における処理を終了する。
In the analysis execution notification process S0806, the
図11に、分析実行開始処理S0805中に実行されるスレーブ管理処理の詳細なフローチャートを示す。 FIG. 11 shows a detailed flowchart of the slave management process executed during the analysis execution start process S0805.
分岐処理S1101において、マスタ0101は、スレーブからのスレーブ管理に関する信号をチェックする。その結果、マスタ0101は、その信号がスレーブ追加信号である場合にはスレーブ追加処理1102、その信号がスレーブ削除信号である場合にはスレーブ削除処理1103を実行する。一方、スレーブ0109からそれらの信号を受信していない場合には、マスタ0101は、分岐処理S1104を実行する。
In branch processing S1101, the
スレーブ追加処理S1102において、マスタ0101は、図8のスレーブ追加処理0802と同様の処理を実行した後、さらに分析実行通知処理S1105を実行する。分析実行通知処理S1105において、マスタ0101は、スレーブ追加処理S1102で追加されたスレーブに分析実行通知の信号を送信してから、S1101に処理を戻す。
In the slave addition process S1102, the
スレーブ削除処理1103において、マスタ0101は、図8のスレーブ削除処理0803と同様の処理を行い、S1101に処理を戻す。
In the slave deletion process 1103, the
分岐処理S1104において、マスタ0101は、図12の分析処理が終了しているかどうかをチェックし、終了していれば、図11の手順における処理を終了し、終了していなければS1101に処理を戻す。
In the branch process S1104, the
図12に、分析実行開始処理S0805中に実行される分析処理の詳細なフローチャートを示す。 FIG. 12 shows a detailed flowchart of the analysis process executed during the analysis execution start process S0805.
分岐処理S1201において、マスタ0101は、分析中のスレーブから受信した信号の内容をチェックし、その種類に応じて処理を分岐させる。本実施形態において、スレーブからの受信信号の種類は、データ・パラメータ要求信号、途中経過要求信号、ジョブ要求信号、ジョブ分析完了通知信号及び結果送信信号のいずれかである。
In branch processing S1201, the
スレーブからの通信内容がデータ・パラメータ要求信号である場合、マスタ0101は、データ・パラメータ送信処理1202において、その信号の発信元スレーブに分析対象データ及び分析パラメータを送信してから、S1201に処理を戻す。ここで、分析対象データは、分析対象データのカテゴリ化により得られたデータのカテゴリ値のインデックスの列に変換されて送信される。また、この処理で送信される分析パラメータには、発見すべき特徴ルール数の上限R_max、結論項目となる属性項目のインデックス番号とそのカテゴリのインデックス番号、条件項目のインデックス番号、最大条件節数C_maxが含まれている。
When the communication content from the slave is a data parameter request signal, the
スレーブからの通信内容が途中経過要求信号である場合、マスタ0101は、途中経過送信処理S1203を実行する。マスタ0101は、途中経過送信処理S1203において、メモリ0103に格納している分析結果のルール群をスレーブ0109に送信してから、S1201に処理を戻す。
When the communication content from the slave is a halfway progress request signal, the
スレーブ0109からの信号がジョブ要求信号である場合、マスタ0101は分岐処理S1204を実行する。分岐処理S1204において、マスタ0101は、割り当て可能なジョブがあるか否かチェックする。具体的には、マスタ0101は、ジョブ管理テーブルを参照し、割り当て可能レイヤ番号と等しいレイヤ番号1002を持つジョブのうち、担当スレーブ1005の項目が「未割り当て」のジョブが存在するかどうかをチェックする。その結果、そのようなジョブが存在すれば、マスタ0101は、割り当て可能なジョブがあると判定して、ジョブ割り当て処理S1205を実行する。一方、そのようなジョブが存在しなければ、マスタ0101は、割り当て可能なジョブなしと判定して、現在のレイヤにおけるジョブ割り当て終了処理S1206を実行する。
When the signal from the
ジョブ割り当て処理S1205において、マスタ0101は、担当スレーブの項目が「未割り当て」ジョブのうちの一つをジョブ要求信号の発信元スレーブに割り当て、ジョブ管理テーブルにおいて、該当するジョブのジョブ状態フラグ1006を「分析中」の状態とし、このスレーブのIDを担当スレーブ1005の項目に格納する。その後、S1201に処理を戻す。この割り当て処理においては、ジョブ管理テーブルに格納されている分析開始ノード1003及び分析終了ノード1004の値、マスタ0101に格納されている最小評価値の情報が、マスタ0101からスレーブ0109に送信される。
In the job assignment process S1205, the
現在のレイヤにおけるジョブ割当て終了処理S1206において、マスタ0101は、現レイヤの分析結果の送信を要求する信号をスレーブ0109に送信してから、S1201に処理を戻す。
In job assignment end processing S1206 in the current layer, the
スレーブ0109からの信号がジョブ分析完了通知である場合、マスタ0101は、パラメータ更新処理S1207を行う。この信号には、そのスレーブが保持している特徴ルールの最小評価値が含まれている。パラメータ更新処理S1207において、マスタ0101は、ジョブ管理テーブルにおける、このスレーブが分析中であったジョブのジョブ状態フラグ1006を「分析完了」に更新する。また、マスタ0101は、スレーブから受け取った最小評価値に関するパラメータ値と、マスタで保存中の最小評価値の値とを比較し、両者のうちの大きな方の値で、マスタで保存中の最小評価値を更新する。その後、S1201に処理を戻す。
When the signal from the
スレーブからの信号が結果送信である場合、マスタ0101は、途中結果マージ処理S1208を実行する。途中結果マージ処理S1208において、マスタ0101は、スレーブ0109から、そのスレーブが行った分析の結果を受信し、この分析結果を、メモリ0103に格納されている分析結果とマージする。具体的には、マスタ0101は、メモリに保存中の特徴ルールとスレーブ0109からの受信特徴ルールとを参照し、それらのルールのなかから、評価値が上位のルールR_max個を選択し、マスタが格納している結果ルールを更新する。
When the signal from the slave is a result transmission, the
その後、マスタ0101は、ジョブ管理テーブルの担当スレーブ1005の項目を参照し、この項目に格納されているスレーブIDが、結果を送信してきたスレーブのIDと同一のジョブについて、ジョブ管理テーブルのジョブ状態フラグ1005を「結果受理」とする。
Thereafter, the
その後、分岐処理S1209において、マスタ0101は、ジョブ管理テーブルを参照して、現在分析中のレイヤ番号1002を持つジョブについて、全てのジョブのジョブ状態フラグ1006が結果受理を示す値になっているかどうかをチェックする。その結果、結果受理であれば、マスタ0101は、分岐処理S1210を実行し、そうでなければ、マスタ0101は、S1201に処理を戻す。
After that, in branch processing S1209, the
S1210において、マスタ0101は、現在分析中のレイヤ番号と最大条件節数の値を参照し、現在分析中のレイヤ番号が最大条件節数よりも小さければ、分析続行通知処理S1211を実行し、同じであれば、分析終了通知処理S1212を実行する。
In S1210, the
分析続行通知処理S1211において、マスタ0101は、割り当て可能レイヤ番号を1増加させ、スレーブ管理テーブルに登録されている全スレーブに分析続行通知を送信してから、S1201に処理を戻す。
In the analysis continuation notification process S1211, the
一方、分析終了通知処理1212において、マスタ0101は、スレーブ管理テーブルに登録されている全スレーブに分析終了の信号を送信してから、S1213を実行する。結果出力処理S1213において、マスタ0101は、現在保持している特徴ルールの集合を、最終的な結果として入出力装置に出力する。これにより、ルール生成の処理を終了する。
On the other hand, in the analysis end notification process 1212, the
つぎに、図13により、本実施形態に係るスレーブ処理の詳細を説明する。 Next, details of the slave processing according to the present embodiment will be described with reference to FIG.
スレーブ0109は、分析実行登録処理S1301において、マスタ0101にスレーブ追加の信号を送信し、分析実行初期化処理S1302において、マスタ0101からの分析実行通知の信号を待つ。スレーブ0109は、分析実行通知の信号を受信すると、データ・パラメータ送信要求をマスタ0101に送信して、分析対象データ及びルール生成に用いるパラメータをマスタ0101から受信する。また、スレーブ0109は、分析結果のルール群を格納する領域、および、途中結果のルール群を格納する領域をメモリに確保し、これらの領域を空に初期化する。なお、これらの領域として、R_max個のルールを格納するために十分なメモリ領域が確保されることとする。
The
その後、途中結果要求処理S1303において、スレーブ0109は、マスタ0101に途中結果要求の信号を送信することによって、マスタ0101が保持しているルール生成の結果である特徴ルールの集合を含む途中結果をマスタ0101から受信する。そして、スレーブ0109は、マスタ0101から受信した途中結果を、S1302で確保した、途中結果のルール群を格納するためのメモリに格納する。
Thereafter, in the intermediate result request process S1303, the
その後、スレーブ0109は、ジョブ要求処理S1304において、マスタ0101にジョブ要求の信号を送信し、分岐処理S1305において、S1304で送信したジョブ要求に対する応答信号を参照し、その応答信号が、新しいジョブの割り当て信号及び分析結果の送信要求信号のいずれであるかをチェックする。その結果、新しいジョブの割り当ての信号であれば、スレーブ0109は分析実行処理S1306を実行し、分析結果の送信を要求する信号であれば、スレーブ0109は途中結果送信処理S1307を実行する。
Thereafter, the
分析実行処理1306において、スレーブ0109は、マスタ0101から受信した最小評価値をメモリに保持し、割り当てられたジョブの分析開始ノード及び分析終了ノードを参照し、以下のように、本実施形態に係るノードの順序関係にしたがってノードを評価する。
In the analysis execution process 1306, the
スレーブ0109は、分析開始ノードをカレントノードに設定し、このカレントノードに対応するルール(以下、カレントルールと呼ぶ)の評価値を算出する。その後、スレーブ0109は、このルールの採用判定を行う。具体的には、スレーブ0109は、(1)カレントルールの評価値が、このスレーブにおけるルールの最小評価値よりも大きいこと、(2)S1303で受信した途中結果のルール群において、カレントルールが冗長ルールに当らないこと、の2つの条件がいずれも真であれば、このルールを採用する。
The
カレントルールが採用になった場合、スレーブ0109は、このカレントルールを、S1302で確保した分析結果格納領域に格納されているルールと、評価値が小さいルールから順に比較し、比較対象のルールの評価値がカレントルールの評価値を下回ったときに比較対象ルールの上位にカレントルールを挿入する。これにより、分析結果格納領域に格納されているルールの数がR_max個を上回った場合には、スレーブ0109は、一番評価値の低いルールを削除し、その後、改めて分析結果格納領域に格納されている最下位のルールの評価値を参照し、最小評価値のパラメータをこの値で更新する。その後、スレーブ0109は、カレントノードが分析終了ノードと等しいか否かをチェックし、両者が等しければノードの評価を終了し、そうでなければ、現在のカレントノードの次ノードをカレントノードに設定してノードの評価及び採用判定を再度実行する。
When the current rule is adopted, the
その後、ジョブ分析結果送信処理S1308において、スレーブ0109は、格納している分析結果の特徴ルールのうち、最も評価値が低いルールの評価値をマスタ0101に送信してから、S1304に処理を戻す。ただし、分析結果のルール群を保持する領域に格納されているルール数がR_max個に満たない場合には、スレーブ0109は、評価値として「0」をマスタ0101に送信して、S1304に処理を戻す。
Thereafter, in job analysis result transmission processing S1308, the
一方、途中結果送信処理S1307においては、スレーブ0109は、保持している分析結果の特徴ルールに関する情報をマスタ0101に送信する。ここでマスタ0101に送信する特徴ルールの情報は、分析結果の特徴ルールの、条件部に含まれる条件項目とカテゴリの組、およびそれぞれの特徴ルールの評価値を含んでいる。その後、分岐処理S1309において、スレーブ0100は、分析の続行に関する信号をマスタ0101から受信するまで待機する。ここで、マスタ0101から分析続行通知を受信すれば、スレーブ0109はS1303に処理を戻し、マスタ0101から分析終了通知を受信すれば、スレーブ0109は分析終了処理S1310を実行する。
On the other hand, in the intermediate result transmission process S1307, the
分析終了処理S1310において、スレーブ0109は、分析で使用したメモリの開放等の、分析終了のために必要な処理を実行してから、処理を終了する。なお、スレーブ0109が、ここで処理を終了せずにS1302に処理を戻し、次のルール生成問題の開始を待機するようにしてもよい。
In the analysis end process S1310, the
本実施形態に係るスレーブ処理は、スレーブ0109が、入出力装置0105から分析中断の指示を受け付けるように変更することも可能である。分析中断の指示の有無は、例えば、S1304においてスレーブ0109がマスタ0101にジョブを要求する前にチェックされればよい。分析中断の指示があった場合には、スレーブ0109が、途中結果送信処理S1307及び分析終了処理S1309を行い、スレーブ削除の信号をマスタ0101に送信してから、処理を終了するようにすればよい。
The slave processing according to the present embodiment can be changed so that the
このように、本実施形態によれば、分析問題が分析装置の数以上のジョブに分割されて、一つのジョブを処理し終えた分析装置には、他の分析装置のジョブの終了を待たずに次のジョブが与えられる。このため、分析に参加する処理装置の処理能力の差による待ち時間が抑され、処理装置の計算機リソースを効率的に利用することができる。 As described above, according to the present embodiment, the analysis problem is divided into more than the number of jobs of the analysis device, and the analysis device that has finished processing one job does not wait for the end of the job of the other analysis device. Is given the following job. For this reason, the waiting time due to the difference in the processing capabilities of the processing devices participating in the analysis is suppressed, and the computer resources of the processing devices can be used efficiently.
以下、本発明に係る第2の実施形態について説明する。 Hereinafter, a second embodiment according to the present invention will be described.
本実施形態では、上述の第1の実施形態と同様の処理でスレーブの管理が行われる。その詳細は一部を除き、図8、図11で説明したものと同様であるが、本実施形態では、分析実行開始処理S0805において、上述の第1の実施形態で説明した処理を行う代わりに、以下の処理が実行される。 In the present embodiment, slave management is performed by the same processing as in the first embodiment described above. The details are the same as those described in FIG. 8 and FIG. 11 except for a part. In this embodiment, instead of performing the processing described in the first embodiment in the analysis execution start processing S0805. The following processing is executed.
分析実行開始処理S0805では、ルール生成を行うための準備として、分析対象データをスレーブに送信する準備、分析結果のルールを格納する準備、探索木の部分木への分割、分析の初期条件の設定を行う。スレーブに送信する準備、分析結果のルールを格納する準備に関する処理は、第1の実施形態で示した処理と同様である。 In the analysis execution start process S0805, as preparations for generating a rule, preparations for transmitting analysis target data to a slave, preparations for storing analysis result rules, division of search trees into subtrees, and setting of initial conditions for analysis I do. Processing related to preparation for transmission to the slave and preparation for storing the rule of the analysis result is the same as the processing described in the first embodiment.
探索木の部分木への分割は、第1の実施形態と異なり、探索木全体を、図7に示すような部分木の集合に分割する。探索木の分割方法の詳細を説明するのに先立って、本実施形態において、マスタ0101内でジョブを管理するためのテーブルのデータ構造を図14に示す。このジョブ管理テーブルには、部分問題ごとに、少なくとも、ジョブを一意に識別するジョブID(部分問題ID)1401、そのジョブの分析を担当するスレーブのIDを格納する担当スレーブ1403、それぞれのジョブが分析を担当する条件項目を格納する担当条件項目1402、分析の状態(例えば「分析中」や「分析完了」など)に関する情報を保持するジョブ状態フラグ1404が含まれている。
Unlike the first embodiment, the search tree is divided into subtrees as shown in FIG. 7, unlike the first embodiment. Prior to explaining the details of the search tree dividing method, FIG. 14 shows the data structure of a table for managing jobs in the
探索木の分割方法の詳細は、以下の通りである。 Details of the search tree division method are as follows.
探索木の部分木への分割では、ジョブ管理テーブルの担当条件項目1402に、条件項目のインデックス番号が1から順に条件項目数まで格納し、担当スレーブ1403を「未割り当て」とする。本実施形態においては、深さ1のレイヤにおける条件項目を基準として、それらのノードをルートとする部分木を一つのジョブとして扱う。このため、その条件項目を特定する情報をジョブ管理テーブルに格納しておけば、ジョブに対応する部分木を一意に表すことができる。
In the division of the search tree into subtrees, the condition item index number is stored in order from 1 to the condition item number in the assigned
分析実行開始処理S0805では、また、マスタ0101は、図11に示したスレーブ管理処理と、図15に示した分析処理を開始する。マスタ0101は、分析実行開始処理S0805を終了すると、分析実行通知処理S0806を実行する。
In the analysis execution start process S0805, the
本実施形態に係るマスタ0101の処理の詳細を、図15を用いて説明する。
Details of processing of the
マスタ0101は、分岐処理S1501において、分析中のスレーブからの通信内容をチェックし、その内容に対応する処理に分岐する。ここで、スレーブ0109からの通信内容は、データ・パラメータ要求信号、ジョブ要求信号、ジョブ分析完了通知、結果送信のいずれかである。
In the branch process S1501, the
スレーブ0109からの通信内容がデータ・パラメータ要求信号である場合には、マスタ0101は、データ・パラメータ送信処理として、その信号の送信元スレーブに分析対象データ及び分析パラメータを送信し、分岐処理S1501に戻る。ここで、分析対象データのカテゴリ化により得られたデータのカテゴリ値のインデックスの列に変換されて送信される。この処理で送信するパラメータには、発見すべき特徴ルール数の上限R_max、結論項目となる属性項目のインデックス番号とそのカテゴリのインデックス番号、条件項目のインデックス番号、最大条件節数C_maxが含まれている。
When the communication content from the
スレーブ0109からの信号がジョブ要求信号である場合には、マスタ0101は、分岐処理1503において、ジョブ管理テーブルを参照して、担当スレーブの項目1403が「未割り当て」となっているジョブがあるかどうかをチェックする。その結果、そのようなジョブがあれば、マスタ0101は、ジョブ割り当て処理S1504を実行し、そのようなジョブがなければ、マスタ0101は、ジョブ割り当て終了処理S1505を実行する。
If the signal from the
ジョブ割り当て処理S1504においては、マスタ0101は、担当スレーブの項目が「未割り当て」であるジョブの一つを、ジョブ要求信号の送信元スレーブに割り当てる。具体的には、マスタ0101は、担当条件項目番号と、マスタ0101が格納しているルールの最小評価値を含むデータをスレーブ0109に送信する。その後、マスタ0101は、ジョブ管理テーブルにおける、割り当てたジョブのジョブ状態フラグ1404を「分析中」とし、担当スレーブ1403の項目に、割り当てたスレーブのIDを格納してから、分岐処理S1501に戻る。
In the job assignment processing S1504, the
ジョブ割り当て終了処理S1505においては、マスタ0101は、分析結果の送信を要求する信号をスレーブ0109に送信する。その後、マスタ0101は、分岐処理S1501に戻る。
In the job assignment end process S1505, the
スレーブからの信号がジョブ分析完了通知の場合、マスタ0101は、パラメータ更新処理S1506において、スレーブ0109から、そのスレーブにおける生成ルールの最小評価値を含むパラメータを受け取り、その最小評価値を、マスタに格納されている最小評価値の値と比較する。この比較結果、値の大きかった方の評価値を新しい値として、マスタの最小評価値を更新する。そして、マスタ0101は、ジョブ管理テーブルの担当スレーブ1403とジョブ状態フラグ1404の項目を参照し、担当スレーブのIDが、信号を送ってきたスレーブと同一であり、ジョブ状態フラグ1404が「分析中」であるジョブのジョブ状態フラグ1404を「分析完了」とする。その後、分岐処理S1501に戻る。
When the signal from the slave is a job analysis completion notification, the
スレーブ0109からの信号が結果送信である場合、マスタ0101は、結果マージ処理S1507において、スレーブ0109から、そのスレーブの分析結果を受信する。マスタ0101は、この結果を、以下の処理によって、メモリ0103に格納している分析結果とマージする。すなわち、マスタは、メモリ0103に格納された特徴ルール及びスレーブから受信した特徴ルールの評価値を参照し、それらのルールのなかから、評価値が上位のルールR_max個を選択し、マスタが格納する結果ルールを更新する。
When the signal from the
その後、マスタ0101は、ジョブ管理テーブルの担当スレーブ1403の項目を参照し、結果を送信してきたスレーブのIDと同一のIDが格納されているジョブについて、ジョブ状態フラグ1404の項目を「結果受理」とする。
Thereafter, the
分岐処理S1508において、マスタ0101は、ジョブ管理テーブルにおける、全てのジョブのジョブ状態フラグ1404が「結果受理」となったか否かをチェックする。その結果、ジョブ管理テーブルにおける全てのジョブのジョブ状態フラグ1404が「結果受理」となっていれば、マスタ0101は、結果出力処理S1509を実行し、そうでなければ、マスタ0101は、分岐処理S1501に戻る。
In branch processing S1508, the
結果出力処理S1509において、マスタ0101は、現在マスタで保持している特徴ルールの集合を、最終的な結果として入出力装置0105に出力する。これにより、分析処理が終了する。
In result output processing S1509, the
つぎに、図16により、本実施形態に係るスレーブ処理の詳細を説明する。 Next, details of the slave processing according to the present embodiment will be described with reference to FIG.
スレーブ0109は、分析実行登録処理S1601において、スレーブ追加の信号をマスタ0101に送り、分析実行初期化処理S1602において、マスタ0101からの分析実行通知の信号を待つ。スレーブ0109は、この信号を受け取ると、データ・パラメータ送信要求の信号をマスタ0101に送信して、マスタ0101から、分析対象データ及びルール生成に用いるパラメータを受信する。また、スレーブ0109は、分析実行初期化処理S1602において、分析結果のルール群を格納する領域をメモリに確保し、これらの領域を空に初期化する。ここでは、R_max個のルールを格納するために十分なメモリ領域が確保されるものとする。
The
その後、スレーブ0109は、ジョブ要求処理S1603において、ジョブ要求の信号をマスタ0101に送信し、分岐処理S1604において、そのジョブ要求に対する応答信号が、新しいジョブの割り当て信号、及び、分析結果の送信を要求する信号のいずれであるかをチェックする。その結果、新しいジョブの割り当ての信号であれば、スレーブ0109は、分析実行処理S1605を実行し、分析結果の送信を要求する信号であれば、スレーブ0109は、途中結果送信処理S1606を実行する。
After that, the
分析実行処理S1605において、スレーブ0109は、割り当てられたジョブに対応する部分木を探索し、評価値の高いR_max個のルールを抽出する。ジョブの割り当て処理で伝達された担当項目番号をmとすると、この処理は、具体的には、以下のような手順で実現される。
In the analysis execution process S1605, the
スレーブ0109は、条件部「A(m)=B(A(m),1)」をカレントノードに設定して、カレントノードに対応するルール(カレントルール)の評価値を算出する。そして、スレーブ0109は、このスレーブの採用判定を行う。具体的には、スレーブ0109は、カレントルールの評価値が、このスレーブにおけるルールの最小評価値よりも大きいとの条件を満たすか否かを判定し、これが真であれば(カレントルールの評価値の方が大きければ)、このルールを採用する。
The
スレーブ0109は、カレントルールを採用した場合、このカレントルールを、S1602で確保した分析結果テーブルに格納されたルールと、評価値が小さいルールから順番に比較してゆき、比較対象のルールの評価値がカレントルールの評価値を下回った時点で比較対象ルールの上位にカレントルールを挿入する。これにより分析結果テーブルに格納されているルールの数がR_max個を上回った場合には、スレーブ0109は、一番評価値の低いルールを削除してから、改めて分析結果テーブルに格納されている最下位のルールの評価値を参照し、最小評価値のパラメータをこの値で更新する。この後、スレーブ0109は、次に評価及び採用判定を行うノードの生成を試みる。その結果、ノード生成に成功すれば、スレーブ0109は、生成したルールをカレントノードに設定して、ノードの評価及び採用判定を再度実行し、ノード生成に失敗すれば、スレーブ0109は、ノードの評価を終了する。
When the
カレントノードの次のノードの生成は、以下のようにして行われる。 Generation of a node next to the current node is performed as follows.
ここでは、カレントルールの条件部XをC(1) and C(2) and …と表す。 Here, the condition part X of the current rule is expressed as C (1) and C (2) and.
スレーブ0109は、まず、カレントノードの子ルールの生成を試みる。カレントルールの条件節の一番右端にある条件節C(k)が条件項目A(n)を有する場合、スレーブ0109は、カレントルールの条件部にA(n+1)=B(A(n+1),1)を付け加えた条件部を有するルールを生成する。ただし、カレントルールの条件節数が既に最大条件節数C_maxに達している場合、または、C(k)が条件節A(M) (Mは条件項目の数)を条件項目に持つ場合には、子ルールの生成は失敗する。子ルールの生成が成功した場合には、スレーブ0109は、生成したルールを次の評価を行うルールに設定する。一方、子ルールの生成が失敗した場合には、スレーブ0109は、次の処理に移る。
First, the
次に、スレーブ0109は、「次のルールもカレントルールと同じ親ルールを持つ」という制約条件のもとで次のルールの生成を試みる。ここで、次のルールは、第1の実施形態において述べた条件部の順序関係に基づいて決定される。スレーブ0109は、上記の制約条件によって、次のルールを生成摺ることができれば、このルールを、次に評価を行うルールに設定する。一方、上記の制約条件を満たす次のルールが存在しなければ(生成が失敗すれば)、スレーブ0109は、カレントルールから親ルールに戻り(具体的には、カレントルールの条件部から一番右の条件節を削除し)、そのレイヤにおいて、上記と同様の制約条件で、次のルールの生成を試みる。ただし、深さ1のレイヤで次のルールの生成を試みる場合、条件節がA(m)=B(A(m),N(A(m)))の次のルールの生成は失敗するものとする。
Next, the
スレーブ0109は、このような、同じレイヤにおける次のルールの生成に失敗するたびに親ルールに戻るという処理を繰り返し、ルートノードまで戻ったときには、次に評価するルールの生成が失敗したと判断する。
The
このような処理を実行した後、スレーブ0109は、ジョブ分析結果送信処理S1607において、スレーブ0109が保持している特徴ルールのうち、最も表価値が低いルールの評価値をマスタ0101に送信する。その後、スレーブ0109は、ジョブ要求処理S1603に戻る。ただし、途中結果のルール群を保持する領域に格納されているルール数がR_max個に満たない場合には、スレーブ0109は、S1607で、評価値として「0」をマスタ0101に送信してから、S1603に戻る。
After executing such processing, the
結果送信処理S1606において、スレーブ0109は、保持している特徴ルールに関する情報をマスタ0101に送信する。このときマスタに送信される特徴ルールの情報には、それぞれの特徴ルールの条件部に含まれる条件項目とカテゴリの組、それぞれの特徴ルールの評価値が含まれている。
In the result transmission process S1606, the
その後、分析終了処理S1608において、スレーブ0109は、分析で使用したメモリの開放等、分析終了時に必要な処理を実行してから、処理を終了する。なお、スレーブ0109が、ここで処理を終了せずにS1602に処理を戻し、次のルール生成問題の開始を待機するようにしてもよい。
Thereafter, in the analysis end process S1608, the
また、本実施形態に係るスレーブ処理においては、スレーブ0109が、入出力装置0105から、分析中断の指示を受け付けるよう変更することも可能である。分析中断の指示の有無は、例えばS1603において、スレーブ0109がマスタ0101にジョブを要求する前にチェックされればよい。分析中断の指示があった場合には、スレーブ0109が、結果送信処理S1606及び分析終了処理S1608を行って、分析中断の信号をマスタ0101に送信してから、処理を終了するようにすればよい。
In the slave processing according to the present embodiment, the
以上、本発明に係る2つの実施形態について説明したが、これらの実施形態は、例えば、以下のように変更することが可能である。 As mentioned above, although two embodiment which concerns on this invention was described, these embodiment can be changed as follows, for example.
第1に、第1及び第2実施形態における、スレーブへのジョブの割り当ては、ジョブに含まれるノードの数の多い順に割り当てを行うように変更してもよい。 First, the assignment of jobs to slaves in the first and second embodiments may be changed so that assignment is performed in descending order of the number of nodes included in the job.
第2に、第1及び第2実施形態における、スレーブへのジョブの割り当ては、ルール生成の進行状況に応じてジョブの大きさを動的に変更して再分割し、再分割したジョブをスレーブに割り当てるように変更してもよい。例えば、ルール生成において、スレーブへの割り当てを行っていないジョブの数が、分析者が定める一定の数を下回った場合に、一回のルール生成を通して一回だけ、残りのジョブを、分析者が指定する分割方法によって、より小さなジョブに再分割し、これをスレーブに割り当てるように変更することができる。このような分割方法として、例えば、分析が行われていない全ジョブを2等分するなどの方法が考えられる。 Secondly, in the first and second embodiments, the job assignment to the slave is performed by dynamically changing the job size according to the progress of the rule generation, and re-dividing the job. You may change so that it may be assigned to. For example, if the number of jobs that are not assigned to slaves in rule generation falls below a certain number determined by the analyst, the analyst will analyze the remaining jobs only once through one rule generation. Depending on the division method specified, the job can be subdivided into smaller jobs and assigned to slaves. As such a dividing method, for example, a method of dividing all jobs that have not been analyzed into two equal parts can be considered.
このような第1及び第2の変更例によれば、ルール生成の終盤に近づくにつれてジョブの規模が小さくなり、スレーブがそのジョブを処理するのに要する時間が短縮される。このため、各スレーブにおける処理終了時刻をより高い精度で揃えてルール生成を行うことができ、結果として、全体の処理速度を向上させることができる。 According to the first and second modified examples, the size of the job is reduced as the end of rule generation is approached, and the time required for the slave to process the job is shortened. For this reason, it is possible to perform rule generation with the processing end times in each slave being aligned with higher accuracy, and as a result, it is possible to improve the overall processing speed.
第3に、第1の実施形態の分析実行開始処理S0805における、探索木のジョブへの分割は、以下のような処理(1)〜(10)で実現されてもよい。
(1)分割パラメータa、最小ジョブサイズパラメータbの値を、あらかじめ決めておく。あるいは、分析者が、あらかじめ入出力装置0105より入力しておく。ここで、a、bは、1以上の整数とする。マスタ0101は、スレーブ管理テーブルに登録されているスレーブの数(Sとする)を読み取る。
(2)マスタ0101は、レイヤ番号Iの初期値を1とする。
(3)マスタ0101は、レイヤIに含まれるノードの数(Nとする)を数える。
(4)マスタ0101は、N/(a*S)を計算し、その小数点以下を切り捨てる。これをZとする。ここで、Zは、整数であり、1個のジョブに含まれるノードの数である。
(5)ここでZ<bであれば、マスタ0101はZにbを代入する。
(6)マスタ0101は、レイヤIの最初のノードをX_sとする。
(7)マスタ0101は、レイヤIにおいて、X_sから数えてZ番目のノードをX_eとする。ただし、Z番目まで数える前にレイヤIの最後のノードに達した場合には、マスタ0101は、レイヤIの最後のノードをX_eとする。
(8)マスタ0101は、X_sを開始ノード、X_eを終了ノードとしてジョブ管理テーブルにジョブを追加する。
(9)X_eがレイヤIの最後のノードであれば、マスタ0101は、(10)へ、そうでなければ、マスタ0101は、レイヤIにおいてX_eの次のノードをX_sとして、(7)へ戻る。
(10)Iが最大条件節数に等しければ、マスタ0101は、処理を終了させる。そうでなければ、マスタ0101は、Iに1を加算してから、(3)に戻る。
Third, the division of the search tree into jobs in the analysis execution start process S0805 of the first embodiment may be realized by the following processes (1) to (10).
(1) The values of the division parameter a and the minimum job size parameter b are determined in advance. Alternatively, an analyst inputs in advance from the input /
(2) The
(3) The
(4) The
(5) If Z <b, the
(6) The
(7) In layer I, the
(8) The
(9) If X_e is the last node of layer I,
(10) If I is equal to the maximum number of conditional clauses, the
このような第3の変更例によれば、各レイヤをより柔軟にジョブに分割することができるようになり、負荷を柔軟にスレーブに割り当てることができる。 According to the third modified example, each layer can be divided into jobs more flexibly, and the load can be flexibly allocated to the slaves.
本発明に係るデータ分析方法は、例えば、購買データの分析、DNAチップを用いた遺伝子発現解析等の、膨大な探索空間を探索する必要があるデータ分析に使用することができる。 The data analysis method according to the present invention can be used for data analysis that needs to search a huge search space such as analysis of purchase data and gene expression analysis using a DNA chip.
0102…処理装置、0103…メモリ、0104…プログラム、0105…入出力装置、0106…通信装置、0107…記憶装置、0110…通信路、0111…通信路 0102 ... Processing device, 0103 ... Memory, 0104 ... Program, 0105 ... Input / output device, 0106 ... Communication device, 0107 ... Storage device, 0110 ... Communication path, 0111 ... Communication path
Claims (11)
前記第1データ処理装置が、前記分析問題を、前記第2データ処理装置の数よりも多い複数の部分問題に分割し、前記複数の第2データ処理装置のそれぞれに当該部分問題を1ずつ割り当てる処理と、
前記複数の部分問題のすべてがいずれかの第2データ処理装置に割り当て済みとなるまで、前記第1データ処理装置が、前記複数の第2データ処理装置のいずれかの第2データ処理装置が、当該第2データ処理装置に割り当てられた部分問題の処理を終了させるごとに、前記複数の部分問題のうち、未割り当ての部分問題を当該第2データ処理装置に割り当てる処理と、
前記第1データ処理装置が、前記各第2データ処理装置から、当該第2データ処理装置に割り当てられた部分問題の処理結果を受け付ける処理と、
を有することを特徴とするデータ分析方法。 In a data analysis method for performing data analysis of an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
The first data processing device divides the analysis problem into a plurality of partial problems larger than the number of the second data processing devices, and assigns the partial problem one by one to each of the plurality of second data processing devices. Processing,
Until all of the plurality of partial problems have been assigned to any of the second data processing devices, the first data processing device is the second data processing device of any of the plurality of second data processing devices, A process of allocating an unassigned partial problem among the plurality of partial problems to the second data processing apparatus each time processing of the partial problem assigned to the second data processing apparatus is terminated;
A process in which the first data processing device receives a processing result of a partial problem assigned to the second data processing device from each of the second data processing devices;
A data analysis method characterized by comprising:
前記第1データ処理装置からの、前記分析問題の部分問題の割り当てが停止するまで、前記各第2データ処理装置が、前記第1データ処理装置から前記分析問題の部分問題が割り当てられるごとに、当該部分問題を処理して、当該処理の結果を保存する処理と、
前記分析問題の部分問題の割り当てが停止した第2データ処理装置が、前記保存している処理結果を前記第1データ処理装置へ送信する処理と、
を有することを特徴とするデータ分析方法。 In a data analysis method for performing data analysis of an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
Each time the second data processing device is assigned the partial problem of the analysis problem from the first data processing device until the assignment of the partial problem of the analysis problem from the first data processing device is stopped, Processing the subproblem and storing the result of the processing;
A process in which the second data processing apparatus in which assignment of the partial problem of the analysis problem is stopped transmits the stored processing result to the first data processing apparatus;
A data analysis method characterized by comprising:
前記各第2データ処理装置は、中断指示を受け付ける入力手段を有し、
当該データ分析方法は、
前記各第2データ処理装置は、前記入力手段が中断指示を受け付けるまで、前記第1データ処理装置から、前記分析問題の部分問題を割り当てられるごとに、当該部分問題を処理して、当該処理の結果を保存する処理と、
前記入力手段が中断指示を受け付けた第2データ処理装置が、前記保存している処理結果を前記第1データ処理装置へ送信する処理と、
を有することを特徴とするデータ分析方法。 In a data analysis method for analyzing an analysis problem using a first data processing device and a plurality of second data processing devices connected via a communication path,
Each of the second data processing devices has input means for receiving an interruption instruction,
The data analysis method is
Each of the second data processing devices processes the partial problem each time the partial problem of the analysis problem is assigned from the first data processing device until the input means receives an interruption instruction, and Processing to save the results;
A process in which the second data processing apparatus that has received the interruption instruction by the input means transmits the stored processing result to the first data processing apparatus;
A data analysis method characterized by comprising:
前記分析問題は、分析対象データからデータの特徴を記述した、IF〜THEN…形式の特徴ルールを求めるものであり、
当該データ分析方法は、
前記第1データ処理装置は、前記複数の第2データ処理装置から、それぞれ、当該第2データ処理装置に割り当てた部分問題の処理結果として複数個の特徴ルールおよび該特徴ルールの評価値を受け付け、当該受け取った全特徴ルールのなかから、前記評価値が上位の特徴ルールを選択し、当該選択した特徴ルールを前記分析問題の分析結果として出力する、
ことを特徴とするデータ分析方法。 A data analysis method according to any one of claims 1, 2 and 3,
The analysis problem is to obtain a feature rule of the form IF to THEN ... describing the characteristics of the data from the analysis target data,
The data analysis method is
The first data processing device receives a plurality of feature rules and evaluation values of the feature rules as processing results of partial problems assigned to the second data processing device, respectively, from the plurality of second data processing devices, From the received all feature rules, select a higher-order feature rule, and output the selected feature rule as an analysis result of the analysis problem.
A data analysis method characterized by that.
前記第1データ処理装置は、前記複数の部分問題の処理に必要な計算量が不均等になるように、前記分析問題を前記複数の部分問題に分割することを特徴とするデータ分析方法。 The data analysis method according to any one of claims 1, 2, 3, and 4,
The data analysis method, wherein the first data processing device divides the analysis problem into the plurality of partial problems so that a calculation amount necessary for processing the plurality of partial problems becomes uneven.
前記第1データ処理装置は、前記複数の部分問題を、処理に必要な計算量が大きい順に前記複数の第2データ処理装置に割り当てることを特徴とするデータ分析方法。 A data analysis method according to claim 5, comprising:
The first data processing device assigns the plurality of partial problems to the plurality of second data processing devices in descending order of calculation amount necessary for processing.
前記第2データ処理装置への、前記部分問題の割り当てを開始した後、前記第1データ処理装置が、未割り当ての1以上の部分問題を、当該未割り当ての部分問題よりも多い数または少ない数の部分問題に再分割する処理を含むことを特徴とするデータ分析方法。 A data analysis method according to claim 1, comprising:
After starting the assignment of the partial problem to the second data processing apparatus, the first data processing apparatus assigns one or more unassigned partial problems to a larger or smaller number than the unassigned partial problem. The data analysis method characterized by including the process of subdividing into the subproblems of.
前記第1データ処理装置は入出力装置を有し、
当該データ分析方法は、
前記入力手段が、前記複数の第2データ処理装置の数の推定最大値の入力を受け付ける処理と、
前記第1データ処理装置が、前記複数の部分問題の数をカウントし、当該数が、前記入力手段が受け付けた推定最大値よりも小さければ、当該複数の部分問題をさらに分割する分割処理と、
前記複数の部分問題の数が前記推定最大値よりも大きくなるまで、前記第1データ処理装置が前記分割処理を繰り返す処理と、
を有することを特徴とするデータ分析方法。 In the data analysis method of any one of Claims 1-7,
The first data processing device has an input / output device;
The data analysis method is
A process in which the input means receives an input of an estimated maximum value of the number of the plurality of second data processing devices;
The first data processing device counts the number of the plurality of subproblems, and if the number is smaller than the estimated maximum value accepted by the input means, a division process for further dividing the plurality of subproblems;
A process in which the first data processing device repeats the division process until the number of the plurality of partial problems becomes larger than the estimated maximum value;
A data analysis method characterized by comprising:
前記分析問題を、前記複数のデータ処理装置の数よりも多い複数の部分問題に分割し、前記複数のデータ処理装置のそれぞれに当該部分問題を1ずつ割り当てる制御手段と、
前記各データ処理装置から、当該データ処理装置に割り当てられた部分問題の処理結果を、前記通信路を介して受け付ける通信手段と、
を有し、
前記制御手段は、
前記複数の部分問題のすべてが割り当て済みとなるまで、前記複数のデータ処理装置のいずれかのデータ処理装置が、当該データ処理装置に割り当てられた部分問題の処理を終了させるごとに、前記複数の部分問題のうち、未割り当ての部分問題を当該データ処理装置に割り当て、当該データ処理装置に、当該割り当てた部分問題を送信すべく前記通信手段から出力させることを特徴とする情報処理装置。
In an information processing apparatus that is connected to a plurality of data processing devices via a communication path and causes the plurality of data processing devices to execute a partial problem of an analysis problem,
Control means for dividing the analysis problem into a plurality of partial problems larger than the number of the plurality of data processing devices, and assigning the partial problem to each of the plurality of data processing devices one by one;
A communication means for receiving the processing result of the partial problem assigned to the data processing device from each of the data processing devices via the communication path;
Have
The control means includes
Each time the data processing device of any of the plurality of data processing devices ends the processing of the partial problem assigned to the data processing device until all of the plurality of partial issues have been assigned, An information processing apparatus characterized in that, among the partial problems, an unassigned partial problem is assigned to the data processing apparatus, and the data processing apparatus outputs the assigned partial problem from the communication unit so as to be transmitted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004083298A JP2005275440A (en) | 2004-03-22 | 2004-03-22 | Data analyzing method and information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004083298A JP2005275440A (en) | 2004-03-22 | 2004-03-22 | Data analyzing method and information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005275440A true JP2005275440A (en) | 2005-10-06 |
Family
ID=35175100
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004083298A Pending JP2005275440A (en) | 2004-03-22 | 2004-03-22 | Data analyzing method and information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005275440A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008097111A (en) * | 2006-10-06 | 2008-04-24 | Nec Corp | Resource distribution method, program, and resource distribution device |
-
2004
- 2004-03-22 JP JP2004083298A patent/JP2005275440A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008097111A (en) * | 2006-10-06 | 2008-04-24 | Nec Corp | Resource distribution method, program, and resource distribution device |
JP4662068B2 (en) * | 2006-10-06 | 2011-03-30 | 日本電気株式会社 | Resource distribution method, program, and resource distribution apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107239335B (en) | Job scheduling system and method for distributed system | |
CN107679192B (en) | Multi-cluster cooperative data processing method, system, storage medium and equipment | |
US8412890B2 (en) | Scalable performance-based volume allocation in large storage controller collections | |
US10764370B2 (en) | Hybrid cloud migration delay risk prediction engine | |
US9639575B2 (en) | Method and system for processing data queries | |
US5884320A (en) | Method and system for performing proximity joins on high-dimensional data points in parallel | |
CN113015970B (en) | Method, system and medium for dividing knowledge graph | |
Yagoubi et al. | Massively distributed time series indexing and querying | |
US9639590B2 (en) | Database system and method for searching database | |
WO2012137347A1 (en) | Computer system and parallel distributed processing method | |
CN112835714A (en) | Container arrangement method, system and medium for CPU heterogeneous cluster in cloud edge environment | |
CN116303833B (en) | OLAP-based vectorized data hybrid storage method | |
US20200076681A1 (en) | Volume allocation management apparatus, volume allocation management method, and volume allocation management program | |
JP2004326480A (en) | Distributed parallel analysis method of mass data | |
JP2005275440A (en) | Data analyzing method and information processor | |
US20150347507A1 (en) | Hierarchical query plans in an elastic parallel database management system | |
JP5515117B2 (en) | Data processing device | |
US20220284023A1 (en) | Estimating computational cost for database queries | |
US20150019574A1 (en) | Object placement device and method, and computer program | |
JP4097274B2 (en) | Resource search method, cluster system, computer, and cluster | |
JP7112003B2 (en) | Search control program, search control method and search control device | |
JP6506773B2 (en) | INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM | |
Papanikolaou | Distributed algorithms for skyline computation using apache spark | |
US20230125509A1 (en) | Bayesian adaptable data gathering for edge node performance prediction | |
CN114153987A (en) | Distributed knowledge graph query method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060731 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080313 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080318 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080519 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20081021 |