JPH0650467B2 - Inference processor - Google Patents

Inference processor

Info

Publication number
JPH0650467B2
JPH0650467B2 JP64000385A JP38589A JPH0650467B2 JP H0650467 B2 JPH0650467 B2 JP H0650467B2 JP 64000385 A JP64000385 A JP 64000385A JP 38589 A JP38589 A JP 38589A JP H0650467 B2 JPH0650467 B2 JP H0650467B2
Authority
JP
Japan
Prior art keywords
rule
strongly connected
production
storage unit
unit
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.)
Expired - Lifetime
Application number
JP64000385A
Other languages
Japanese (ja)
Other versions
JPH02181228A (en
Inventor
顕司 小野
Original Assignee
工業技術院長
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 工業技術院長 filed Critical 工業技術院長
Priority to JP64000385A priority Critical patent/JPH0650467B2/en
Publication of JPH02181228A publication Critical patent/JPH02181228A/en
Publication of JPH0650467B2 publication Critical patent/JPH0650467B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、プロダクションルールの実行により推論処理
を進めていく推論処理方式に係わり、特に推論処理の過
程で適用可能なルールを予め明らかにしておくことによ
り推論処理の高速化を図る推論処理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION Object of the Invention (Industrial field of application) The present invention relates to an inference processing method for advancing inference processing by executing production rules, and in particular, rules applicable in the process of inference processing. The present invention relates to an inference processing method that speeds up inference processing by clarifying in advance.

(従来の技術) プロダクションルールを用いて推論処理を実行するシス
テムでは、推論処理に際して与えられる現在の状態に関
する情報及び推論途中で導かれる結論にマッチングする
条件を持つプロダクションルールを、多数のプロダクシ
ョンルールから順次抽出し、これらルールを適用しなが
ら最終的な結論を導く処理が行われる。このような処理
では、推論の過程において、次に適用可能なルールを高
速に抽出できることが、推論処理の高速化を図るうえで
有効である。
(Prior Art) In a system that executes inference processing by using production rules, a production rule having a condition that matches information about the current state given during the inference processing and a conclusion drawn during the inference process is generated from a large number of production rules. A process of deriving a final conclusion is performed while sequentially extracting and applying these rules. In such processing, it is effective to speed up the inference processing so that the next applicable rule can be extracted at high speed in the inference process.

従来、プロダクションルールを速やかに抽出できる方式
として、プロダクションルールの各条件部と実行部とを
調べ、どの実行部の実行によって得られる結論が次のど
の条件を成立させるか、つまりどのルールの適用が次に
どのルールの適用を可能にするかという関係をテーブル
若しくはネットワークのかたちで予め準備しておき、推
論時には、これらの関係を参照して次に適用可能なルー
ルを順次選択していくことにより、推論処理の高速化を
図るようにした方式が提案されている(特開昭60-7203
号及び特開昭62-19940号)。
Conventionally, as a method for quickly extracting a production rule, each condition part and execution part of the production rule are examined, and which of the following conditions is satisfied by the conclusion obtained by the execution of which execution part, that is, which rule is applied? Next, prepare in advance the relationship as to which rule can be applied in the form of a table or network, and at the time of inference, refer to these relationships and select the next applicable rule sequentially. , A method for speeding up inference processing has been proposed (Japanese Patent Laid-Open No. 60-7203).
And JP-A-62-19940).

しかしながら、これらの方式では、単にルール間の適用
可能関係のみを記述したものであるため、次に適用可能
なルールを選択する処理しか高速化することはできな
い。従って、例えばある状態から他の状態へ導くことが
可能であるか、或はある結論を導くまでにはどのルール
を適用したら良いかといった、大局的な推論の方向付け
を示唆することができず、無駄なルールを実行すること
によって推論処理の高速化を図ることが困難であった。
However, in these methods, since only the applicable relationships between rules are described, only the process of selecting the next applicable rule can be speeded up. Therefore, it is not possible to suggest the direction of global reasoning, for example, whether it is possible to lead from one state to another state, or which rule should be applied before reaching a certain conclusion. It was difficult to speed up inference processing by executing useless rules.

また、従来の方式ではルール記憶部に登録されたルール
間に冗長性があってもそれを判断する手段がなかったた
め、不必要に多くのルールを用いて推論を行なうことに
よって推論処理に要する時間が長くなってしまうという
問題もあった。
In addition, in the conventional method, even if there is redundancy between the rules registered in the rule storage unit, there is no means for judging it, so the time required for the inference process is increased by performing inference using unnecessarily many rules. There was also a problem that it would be long.

(発明が解決しようとする課題) このように、従来の推論処理方式では、推論の大局的な
方向付けがなされなかったり、無駄なプロダクションル
ールを実行することにより、推論処理の高速化を図るこ
とができないという問題があった。
(Problems to be Solved by the Invention) As described above, in the conventional inference processing method, it is possible to speed up the inference processing by not giving a global orientation of the inference or executing useless production rules. There was a problem that I could not do it.

本発明は、かかる問題点に鑑みなされたもので、推論処
理の大局的な方向付けを与えて効率良くプロダクション
ルールを実行することができるとともに、ルールの冗長
性を排除して推論の無駄を省き、これにより推論処理の
高速化を図ることができる推論処理方式を提供すること
を目的とする。
The present invention has been made in view of the above problems, and it is possible to efficiently execute a production rule by giving a global direction of inference processing, and eliminate the waste of inference by eliminating rule redundancy. , It is an object of the present invention to provide an inference processing method capable of speeding up inference processing.

[発明の構成] (課題を解決するための手段) 本発明に係る推論処理方式は、条件部と実行部の対から
なる複数のプロダクションルールを記憶するルール記憶
部と、このルール記憶部に格納されたプロダクションル
ールに基づいて以下に述べるメタ知識を求める強連結成
分分解部と、この強連結成分分解部で求められた前記メ
タ知識を記憶するメタ知識記憶部と、このメタ知識記憶
部に記憶されたメタ知識に基づいてプロダクションルー
ルを抽出し、推論処理を実行する推論部と、ルール記憶
部へのルールの登録に際し、そのルールを追加するかど
うかを決定するルール登録判定部を具備している。
[Structure of the Invention] (Means for Solving the Problem) An inference processing method according to the present invention stores a rule storage unit for storing a plurality of production rules including a pair of a condition unit and an execution unit, and a rule storage unit. A strongly connected component decomposition unit that obtains meta-knowledge described below based on the produced production rule, a meta-knowledge storage unit that stores the meta-knowledge obtained by the strongly connected component decomposition unit, and a memory stored in this meta-knowledge storage unit. It is equipped with an inference unit that extracts production rules based on the acquired meta-knowledge and executes inference processing, and a rule registration determination unit that determines whether to add the rules when registering the rules in the rule storage unit. There is.

ここで強連結成分分解部は、ルール記憶部に格納された
プロダクションルール中で扱われている各変数のとり得
る全ての状態間の遷移条件を満たすプロダクションルー
ルを有向グラフ行列として求め、更に上記有向グラフ行
列を強連結成分分解して各強連結成分の変数条件及び各
強連結成分間の遷移条件を満たすプロダクションルール
を、どのプロダクションルールの次にどのプロダクショ
ンルールが適用できるかを示すメタ知識として求める。
Here, the strongly connected component decomposition unit obtains, as a directed graph matrix, a production rule that satisfies the transition condition between all possible states of each variable handled in the production rule stored in the rule storage unit, and further, the directed graph matrix described above. Is decomposed into a strongly connected component and a production rule satisfying the variable condition of each strongly connected component and the transition condition between the strongly connected components is obtained as meta-knowledge indicating which production rule can be applied next to which production rule.

また、推論実行部は、メタ知識記憶部に記憶されたメタ
知識の次に適用可能なプロダクションルールを示す情報
に基づいて推論の大局的な方向付け、すなわち現在の状
態と目的とする状態との隔りを認識して、さらにこの目
的とす状態に接近するためのプロダクションルールの適
用を計り、これに基づいて前記ルール記憶部に記憶され
た次に適用可能なプロダクションルールを抽出し、推論
処理を実行する。
Further, the inference execution unit, based on the information indicating the production rule applicable next to the meta-knowledge stored in the meta-knowledge storage unit, sets the global direction of inference, that is, the current state and the target state. Recognizing the gap, further applying the production rule for approaching the target state, based on this, extracting the next applicable production rule stored in the rule storage unit, inference processing To execute.

更にルール登録判定部は、ルール記憶部へのルールの登
録に際し、そのルールの追加によって強連結成分が変化
するかどうかを判定し、もし変化しない場合にはそルー
ルの登録を中止するものである。
Further, the rule registration determination unit determines whether or not the strongly connected component changes due to the addition of the rule when registering the rule in the rule storage unit, and if it does not change, it cancels the registration of the rule. .

また、このルール登録判定部に代えて、ルール記憶部に
登録されたルールの中で、そのルールを削除した場合の
強連結成分が変化するかどうかを判定し、もし変化しな
い場合にはそのルールを削除するルール削除判定部を備
えるようにしても良い。
Also, instead of this rule registration determination unit, it is determined whether the strongly connected component changes when the rule is deleted among the rules registered in the rule storage unit, and if it does not change, the rule is not changed. It is also possible to provide a rule deletion determination unit that deletes.

(作用) 本発明によれば、どのプロダクションルールの次にどの
プロダクションルールが適用できるかを示すメタ知識に
よって現在の状態と目的とする状態との隔りを認識し
て、さらにこの目的とする状態に接近するためのプロダ
クションルールの適用を計る推論の大局的な方向付けを
行なうことができる。そして、このメタ知識に基づいて
最終結論を導くまでのプロダクションルールの適用順序
を決定し、該順序に基づいて前記ルール記憶部に記憶さ
れたプロダクションルールを1つ抽出し、推論処理を実
行することが可能であるため、無駄なプロダクションル
ールの実行を防止して推論処理の高速化を図ることがで
きる。
(Operation) According to the present invention, the difference between the current state and the target state is recognized by the meta-knowledge indicating which production rule is applicable next to which production rule, and the target state is further recognized. A global orientation of reasoning that measures the application of production rules to approach Then, based on this meta-knowledge, the application order of the production rules until the final conclusion is derived, one production rule stored in the rule storage unit is extracted based on the order, and the inference processing is executed. Therefore, it is possible to prevent unnecessary execution of production rules and speed up inference processing.

また、本発明ではルールの登録に際してルール登録判定
部がそのルールの追加前後の強連結成分の変化の有無を
調べる。そして、強連結成分に変化がなかった場合、そ
のルールが冗長ルールであると判定しそのルールの追加
を行なわない。このため、冗長なルール登録されること
がなく、結局、無駄なルールの適用が事前に防止される
ので、推論処理の高速化を図ることができる。
In addition, in the present invention, when registering a rule, the rule registration determination unit checks whether or not the strongly connected component has changed before and after the addition of the rule. Then, when there is no change in the strongly connected component, it is determined that the rule is a redundant rule, and the rule is not added. For this reason, redundant rules are not registered, and in the end, useless rules are prevented from being applied in advance, so that inference processing can be speeded up.

また、ルール登録判定部に代えてルール削除判定部が備
えられた場合においてはルール削除判定部が既に登録さ
れているルールのうち、そのルールを削除した場合でも
強連結成分が変化しないルールを削除するので、上記と
同様に無駄なルールの適用が事前に防止され、推論処理
の高速化を図ることができる。
In addition, when a rule deletion determination unit is provided instead of the rule registration determination unit, among rules that have already been registered by the rule deletion determination unit, a rule whose strongly connected component does not change even if the rule is deleted is deleted. Therefore, similarly to the above, useless application of rules can be prevented in advance, and inference processing can be speeded up.

(実施例) 以下、図面を参照しながら本発明の一実施例について説
明する。
Embodiment An embodiment of the present invention will be described below with reference to the drawings.

第1図は本実施例に係る推論処理装置の構成を示すブロ
ック図である。即ち、この推論処理装置は、ルール入力
部11、ルール登録判定部12、ルール記憶部13、強
連結成分分解部14、メタ知識記憶部15、推論部16
及び状態記憶部17にて構成されている。
FIG. 1 is a block diagram showing the arrangement of an inference processing apparatus according to this embodiment. That is, this inference processing apparatus includes a rule input unit 11, a rule registration determination unit 12, a rule storage unit 13, a strongly connected component decomposition unit 14, a meta-knowledge storage unit 15, and an inference unit 16.
And the state storage unit 17.

ルール入力部11は、ルール記憶部13にプロダクショ
ンルールを登録するためのものである。
The rule input unit 11 is for registering a production rule in the rule storage unit 13.

ルール登録判定部12は、ルール入力部11によるルー
ル記憶部13へのルール登録に際して、そのルールの追
加によって後述する強連結成分が変化するかどうかを判
定し、もし変化しない場合にはそのルールの登録は行な
わず、変化する場合にはそのルールをルール記憶部13
に格納する。
When registering the rule in the rule storage unit 13 by the rule input unit 11, the rule registration determination unit 12 determines whether or not a strongly connected component, which will be described later, changes due to the addition of the rule. If the rule is changed without registration, the rule is stored in the rule storage unit 13.
To store.

ルール記憶部13は、上記ルール登録判定部12で登録
の必要ありと判定されたプロダクションルールを複数記
憶する。なお、これらのプロダクションルールは、条件
部と実行部の対からなる。
The rule storage unit 13 stores a plurality of production rules determined by the rule registration determination unit 12 to be registered. Note that these production rules consist of a pair of a condition part and an execution part.

強連結成分分解部14は、ルール記憶部13に記憶され
たプロダクションルールを、推論部16での推論処理に
先立って抽出してメタ知識を生成する。ここでは、ルー
ル記憶部13に格納されたプロダクションルール中で扱
われている各変数のとり得る全ての状態間の遷移条件を
満たすプロダクションルールを、有向グラフ行列として
求め、更に上記有向グラフ行列を強連結成分分解して各
強連結成分の変数条件及び各強連結成分間の遷移条件を
満たすプロダクションルールをメタ知識として得るよう
にしている。このメタ知識の算出アルゴリズムについて
は後で簡単に述べる。
The strongly connected component decomposition unit 14 extracts the production rule stored in the rule storage unit 13 prior to the inference processing by the inference unit 16 to generate meta-knowledge. Here, a production rule satisfying transition conditions between all possible states of each variable handled in the production rule stored in the rule storage unit 13 is obtained as a directed graph matrix, and the directed graph matrix is further connected to the strongly connected component. The production rules that are decomposed and satisfy the variable condition of each strongly connected component and the transition condition between each strongly connected component are obtained as meta-knowledge. This meta-knowledge calculation algorithm will be briefly described later.

メタ知識記憶部15は、強連結成分分解部14で求めら
れた上記メタ知識を格納する。
The meta-knowledge storage unit 15 stores the meta-knowledge obtained by the strongly connected component decomposition unit 14.

推論部16は、ルール記憶部13に記憶されたプロダク
ションルールを順次読み出して推論処理を実行していく
もので、与えられたある状態から目標とする他の状態に
至る推論過程を、メタ知識記憶部13に格納されたメタ
知識に基づいて大局的に判断し、効率良くプロダクショ
ンルールを実行していく。
The inference unit 16 sequentially reads out the production rules stored in the rule storage unit 13 and executes the inference process. The inference unit 16 stores the inference process from a given state to another target state as a meta-knowledge memory. A global decision is made based on the meta-knowledge stored in the section 13, and the production rules are executed efficiently.

状態記憶部17は、初期状態や推論部16における推論
処理の途中状態を格納する。
The state storage unit 17 stores the initial state and the intermediate state of the inference processing in the inference unit 16.

次に以上のように構成された推論処理装置の動作につい
て説明する。
Next, the operation of the inference processing device configured as described above will be described.

いま、ルール記憶部13には、第2図の有向グラフで示
されるプロダクションルールが格納されているとする。
ここでノードa,b,c,…,iはそれぞれ状態を示
し、各状態間を結ぶ矢印はそれが適用されることによっ
てそのような状態遷移が起こるプロダクションルールを
示し、矢印近傍の番号はルール番号を示している。
Now, it is assumed that the rule storage unit 13 stores the production rules shown by the directed graph in FIG.
Here, nodes a, b, c, ..., I respectively indicate states, arrows connecting the respective states indicate a production rule in which such state transition occurs when the state is applied, and numbers near the arrows indicate rules. Shows the number.

まず推論処理に先立ち、強連結成分分解部14は第3図
S1及びS2に示す処理に従ってプロダクションルール
からメタ知識を生成する。
First, prior to the inference process, the strongly connected component decomposition unit 14 generates meta-knowledge from the production rule according to the processes shown in S1 and S2 in FIG.

即ち、まずルール記憶部13に格納された全てのプロダ
クションルールに基づく各ノード間の遷移条件から第4
図に示す有向グラフ行列を生成する(ステップS1)。
この有効グラフは、9つのノードa〜i間を、これらノ
ード間の遷移条件を満たすルールによって結合すること
によって得られる。この行列は、ノード番号jからノー
ド番号kへと遷移可能なルール番号を記述している。
That is, first, from the transition condition between the nodes based on all the production rules stored in the rule storage unit 13,
The directed graph matrix shown in the figure is generated (step S1).
This effective graph is obtained by connecting the nine nodes a to i with a rule that satisfies the transition condition between these nodes. This matrix describes rule numbers that can transit from node number j to node number k.

この行列を求めるため、ステップS1では、サイズが9
×9の行列(テーブル)Mを用意し、ノード番号jの状
態が第x番目のルールの条件部を満たし、そのルールの
実行結果としてノード番号kの状態が得られるとき、行
列Mの(jk)成分にルール番号xを登録し、それ以外
の部分には0を登録するという処理を全てのプロダクシ
ョンルールについて行なう。
In order to obtain this matrix, in step S1, the size is 9
When a matrix (table) M of × 9 is prepared and the state of the node number j satisfies the condition part of the x-th rule and the state of the node number k is obtained as the execution result of the rule, (jk of the matrix M). ) The process of registering the rule number x in the component and registering 0 in the other parts is performed for all the production rules.

次に有向グラフ行列を強連結成分へ分解する(ステップ
S2)。ここで強連結成分とは、それを構成するノード
間が双方向に遷移可能な成分であり、第2図の例では、
ノード(c,d)、ノード(g,h,i)がそれぞれ強
連結成分となる。有向グラフ行列に対する強連結成分分
解の手法としては行と列の同時入替え法が知られてい
る。この手法は、行列の例えば左下の部分が全て0にな
るように、行の入替えと列の入替えとを同時に行ない、
行列の対角上に集まった要素を強連結成分とするもので
ある。第4図の例では、対角左下の成分を0にした状態
が得られており、対角線上に集まった各ルールの集合を
強連結成分とすることができる。これにより第5図中心
線で込まれた6つの強連結成分が求められる。抽出され
た強連結成分にはIからVIまで順番に番号が付与され、
メタ知識記憶部15に格納される。この強連結成分の間
の半順序関係を列挙すると第6図のようになる。
Next, the directed graph matrix is decomposed into strongly connected components (step S2). Here, the strongly connected component is a component capable of bidirectionally transitioning between the constituent nodes, and in the example of FIG.
The node (c, d) and the node (g, h, i) are strongly connected components. As a method of strongly connected component decomposition for a directed graph matrix, a simultaneous row and column permutation method is known. In this method, row replacement and column replacement are performed at the same time so that, for example, the lower left part of the matrix becomes 0,
The elements connected on the diagonal of the matrix are strongly connected components. In the example of FIG. 4, a state in which the component on the lower left corner of the diagonal is set to 0 is obtained, and the set of rules gathered on the diagonal line can be a strongly connected component. As a result, six strongly connected components included in the center line of FIG. 5 are obtained. The extracted strongly connected components are sequentially numbered from I to VI,
It is stored in the meta-knowledge storage unit 15. The partial ordering relationships among the strongly connected components are listed in FIG.

続いてルール登録判定部12は、強連結成分分解部14
で求められた強連結成分の有向グラフ行列Aを求める
(ステップS3)。この行列Aは、第7図に示すよう
に、強連結成分の数をnとするとn×nの行列で、強連
結成分lの状態から所定のルールの適用によって強連結
成分mの状態へ遷移可能である場合、行列Aの(lm)
成分に1を登録し、それ以外の部分には0を登録すると
いう処理を全てのプロダクションルールについて行なう
ことにより求められる。
Then, the rule registration determination unit 12 determines the strongly connected component decomposition unit 14
The directed graph matrix A of the strongly connected components obtained in step S3 is obtained (step S3). As shown in FIG. 7, the matrix A is an n × n matrix where the number of strongly connected components is n, and the state of the strongly connected component l transits to the state of the strongly connected component m by applying a predetermined rule. (Lm) of matrix A, if possible
It is obtained by performing the process of registering 1 in the component and 0 in the other parts for all production rules.

次にルール登録判定部12は、求められた行列Aから、 A′=A+A+A+…+A…(1) で求められる行列A′を求める。但し、ここでAは、
n回のルールの適用で到達可能な関係にある強連結成分
を表示している。従って、例えばAは2回のルールの
適用によって到達可能な部分を示している。従って前記
(1)式を適用することによってルールを複数回適用して
到達可能な全ての関係が求められる。但し、この例では
強連結成分の数n=6であるから、 A′=A+A+A+…+A…(2) まで計算すればよい。それ以上行なっても新たに到達可
能な関係は見付からないからである。このようにして求
められた行列A′を第8図に示す。
Next, the rule registration determination unit 12 obtains the matrix A ′ obtained from the obtained matrix A by A ′ = A + A 1 + A 2 + ... + A n (1). However, here A n is
The strongly connected components that are in a relation that can be reached by applying the rule n times are displayed. Therefore, for example, A 2 indicates a portion that can be reached by applying the rule twice. Therefore the above
By applying the formula (1), all the reachable relations are obtained by applying the rule multiple times. However, in this example, since the number of strongly connected components is n = 6, it is sufficient to calculate up to A ′ = A + A 1 + A 2 + ... + A 6 (2). This is because no new achievable relationship can be found even if it is performed further. The matrix A'obtained in this way is shown in FIG.

ここで、ルール入力部11によって新たに登録すべきル
ールが入力されたことを考える(ステップS5)。い
ま、この新規登録しようとするルールが第9図に示され
たルール5であるとする。ルール登録判定部12は、そ
の新たなルール5によって生じる状態間の遷移可能性を
示す第10図のような行列Bを作成する。この行列Bも
行列A,A′と同様n×nのサイズで、その新規登録ル
ールによって強連結成分lから強連結成分mへの状態遷
移が可能になる部分に1、その他の部分に0を登録した
ものである。第9図に示したルール5の場合、第10図
に示すようにII→VI、VI→VIの部分に1、その他の部分
に0が登録された行列Bが得られる。
Here, consider that a rule to be newly registered is input by the rule input unit 11 (step S5). Now, it is assumed that the rule to be newly registered is the rule 5 shown in FIG. The rule registration determination unit 12 creates a matrix B as shown in FIG. 10 showing the possibility of transition between states caused by the new rule 5. This matrix B has a size of n × n similarly to the matrices A and A ′, and 1 is assigned to the portion where the state transition from the strongly connected component 1 to the strongly connected component m is possible by the new registration rule, and 0 to the other portions. It has been registered. In the case of rule 5 shown in FIG. 9, as shown in FIG. 10, a matrix B in which 1 is registered in the portions II → VI and VI → VI and 0 is registered in the other portions is obtained.

次にルール登録判定部12は、求められた行列Bと行列
A′とを比較し、行列Bの非零成分に対応する行列A′
の成分が零かどうかをチェックする(ステップS7)。
この結果、対応する行列A′の成分が非零であったなら
ばそのルールの登録は中止し(ステップS8)、また零
であったならばそのルールをルール記憶部13に登録す
る(ステップS9)。
Next, the rule registration determination unit 12 compares the obtained matrix B with the matrix A ′, and the matrix A ′ corresponding to the non-zero element of the matrix B.
It is checked whether the component of is zero (step S7).
As a result, if the corresponding matrix A ′ element is non-zero, the registration of the rule is stopped (step S8), and if it is zero, the rule is registered in the rule storage unit 13 (step S9). ).

第10図の例では、行列Bの非零成分に対応する行列
A′(第8図)の成分がいずれも非零であるから、ルー
ル5の登録を行なわない。これは、ルール5を登録して
も新たに遷移可能な強連結成分の組合わせが得られない
からであり、換言すればルール5は既に登録されている
ルール1〜4に対して冗長なルールだからである。従っ
て、この場合、ルール記憶部13の中身は何等変化せ
ず、強連結成分間の半順序関係は第11図に示すよう
に、ルール5の入力前と何等変わらない。
In the example of FIG. 10, since all the elements of the matrix A ′ (FIG. 8) corresponding to the non-zero elements of the matrix B are non-zero, rule 5 is not registered. This is because even if rule 5 is registered, it is not possible to obtain a combination of strongly connected components that can be newly transitioned. In other words, rule 5 is a redundant rule with respect to already registered rules 1 to 4. That's why. Therefore, in this case, the content of the rule storage unit 13 does not change at all, and the semi-order relation between the strongly connected components is the same as that before the rule 5 is input, as shown in FIG.

これに対し、第12図に示すようなルール6を新規登録
する場合について考えると、行列Bの非零成分に対応す
る行列A′(第8図)の成分がいずれも零であるから、
ルール6の登録を行なう。これは、ルール6を登録する
ことによって、 III<I IV<V なる2つの半順序関係が新たに得られ、更に第12図に
示すように、強連結成分IとIIIとを統合した新たな強
連結成分I′が得られるからであり、換言すればルール
6は既に登録されているルール1〜4に対して冗長では
ないからである。従って、この場合、ルール登録部13
にはルール6が登録され、強連結成分間の半順序関係も
第14図に示すように変更される。
On the other hand, considering the case of newly registering the rule 6 as shown in FIG. 12, since all the elements of the matrix A ′ (FIG. 8) corresponding to the non-zero elements of the matrix B are zero,
Rule 6 is registered. This is because by registering rule 6, two partial order relations III <I IV <V are newly obtained, and as shown in FIG. 12, a new strongly connected component I and III are integrated. This is because the strongly connected component I ′ is obtained, in other words, the rule 6 is not redundant with respect to the already registered rules 1 to 4. Therefore, in this case, the rule registration unit 13
Rule 6 is registered in, and the partial order relation between the strongly connected components is also changed as shown in FIG.

以上のように強連結成分が変更されたら、これはメタ知
識記憶部15に格納される。
When the strongly connected component is changed as described above, this is stored in the meta-knowledge storage unit 15.

推論の過程では、推論部16は、メタ知識によって推論
の大局的な方向付けを行ない、これに基づき、推論の途
中結果を状態記憶部17に格納しながらルール記憶部1
3のプロダクションルールを順次実行していく。例え
ば、いま推論の初期状態がeであるとし、この状態から
状態iが推論結果として導き得るかどうかを知りたいと
すると、初期状態は強連結成分IVに含まれ、推論の結論
は強連結成分VIに含まれる。従って、推論部16は強連
結成分IVから強連結成分VIに達するパスがあるかどうか
を探索する。その結果、IV→V→VIのパスと、IV→VIの
パスとが探索されるので、初期状態から最終目標である
状態に達することが可能で、その場合、ルール6よりも
ルール4を適用することが望ましいことが分る。
In the process of inference, the inference unit 16 determines the global direction of inference based on meta-knowledge, and based on this, the rule storage unit 1 stores the intermediate result of inference in the state storage unit 17.
3 production rules are executed sequentially. For example, suppose that the initial state of inference is e and want to know whether state i can be derived as an inference result from this state, the initial state is included in strongly connected component IV, and the conclusion of inference is the strongly connected component. Included in VI. Therefore, the inference unit 16 searches for a path from the strongly connected component IV to the strongly connected component VI. As a result, the path of IV → V → VI and the path of IV → VI are searched, so it is possible to reach the final goal from the initial state. In that case, rule 4 is applied rather than rule 6. It turns out that it is desirable to do.

以上のように、本発明によれば、推論の進め方に対する
大局的な方向付けを行なうことができるとともに、新た
にルールを登録する際にそのルールの冗長性を判定して
登録の可否を決定しているので、無駄なルールが登録さ
れることがなく、この結果、推論処理の高速化を図るこ
とができる。
As described above, according to the present invention, it is possible to give an overall direction to the inference process, and at the time of newly registering a rule, the redundancy of the rule is judged to determine whether or not the rule can be registered. Therefore, unnecessary rules are not registered, and as a result, inference processing can be speeded up.

なお、上記実施例ではルール登録判定部12でルールを
新たに登録する際の登録可否を判定したが、このルール
登録判定部に代えてルール削除判定部を設け、既に登録
されているルールのうち冗長なルールを削除するように
しても良い。この場合には、ルール記憶部13に登録さ
れたルールの中で、そのルールを削除した場合の強連結
成分が変化するかどうかを判定し、もし変化しない場合
にはそのルールを削除するようにすれば良い。
In the above embodiment, the rule registration determination unit 12 determines whether registration is possible when newly registering a rule. However, in place of this rule registration determination unit, a rule deletion determination unit is provided, and among rules already registered, Redundant rules may be deleted. In this case, of the rules registered in the rule storage unit 13, it is determined whether or not the strongly connected component changes when the rule is deleted, and if it does not change, the rule is deleted. Just do it.

[発明の効果] 以上のように、本発明によればメタ知識を利用して大局
的な推論の方向を決定することができるとともに、無駄
なルールの登録が防止できるので、無駄なルールが実行
されることがなく、推論処理の高速化を図ることができ
る。
[Effects of the Invention] As described above, according to the present invention, it is possible to determine the direction of global inference using meta-knowledge, and it is possible to prevent the registration of useless rules. Therefore, the inference processing can be speeded up.

【図面の簡単な説明】[Brief description of drawings]

第1図〜第14図は本発明の一実施例に係る推論処理装
置を説明するための図で、第1図は同装置のブロック
図、第2図はルール記憶部に記憶されたルールと各状態
間の関係をグラフで示す図、第3図は強連結成分分解部
及びルール登録判定部の処理手順を示す流れ図、第4図
は強連結成分を求める様子を示す図、第5図は得られた
強連結成分とその半順序関係とをグラフで示した図、第
6図は得られた強連結成分の半順序関係を示す図、第7
図はルール登録判定部で求められる行列Aを示す図、第
8図はルール登録判定部で求められる行列A′を示す
図、第9図〜第11図は冗長なルールを追加した場合の
ルール登録判定部の処理を説明するための図、第12図
〜第14図は冗長でないルールを追加した場合のルール
登録判定部の処理を説明するための図である。 11…ルール入力部、12…ルール登録判定部、13…
ルール記憶部、14…強連結成分分解部、15…メタ知
識記憶部、16…推論部、17…状態記憶部。
1 to 14 are diagrams for explaining an inference processing apparatus according to an embodiment of the present invention. FIG. 1 is a block diagram of the apparatus, and FIG. 2 shows rules stored in a rule storage unit. FIG. 3 is a diagram showing the relationship between states, FIG. 3 is a flow chart showing the processing procedure of the strongly connected component decomposition unit and the rule registration determination unit, FIG. 4 is a diagram showing how strongly connected components are obtained, and FIG. FIG. 7 is a graph showing the obtained strongly connected components and their partial order relations; FIG. 6 is a graph showing the obtained partially connected relations of the strongly connected components;
FIG. 8 is a diagram showing a matrix A obtained by the rule registration determination unit, FIG. 8 is a diagram showing a matrix A ′ obtained by the rule registration determination unit, and FIGS. 9 to 11 are rules when redundant rules are added. FIGS. 12 to 14 are diagrams for explaining the process of the registration determination unit, and FIGS. 12 to 14 are diagrams for explaining the process of the rule registration determination unit when a non-redundant rule is added. 11 ... Rule input section, 12 ... Rule registration determination section, 13 ...
Rule storage unit, 14 ... Strongly connected component decomposition unit, 15 ... Meta-knowledge storage unit, 16 ... Inference unit, 17 ... State storage unit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】条件部と実行部の対からなる複数のプロダ
クションルールを記憶するルール記憶部と、 このルール記憶部に格納されたプロダクションルール中
で扱われている各変数のとり得る全ての状態間の遷移条
件を満たすプロダクションルールを有向グラフ行列とし
て求め、更に上記有向グラフ行列を強連結成分分解して
各強連結成分の変数条件及び各強連結成分間の遷移条件
を満たすプロダクションルールを、どのプロダクション
ルールの次にどのプロダクションルールが適用できるか
を示すメタ知識として求める強連結成分分解部と、 この強連結成分分解部で求められた前記メタ知識を記憶
するメタ知識記憶部と、 このメタ知識記憶部に記憶されたメタ知識の次に適用可
能なプロダクションルールを示す情報に基づいて、現在
の状態と目的とする状態との隔りを認識して、さらにこ
の目的とする状態に接近するためのプロダクションルー
ルの適用を計る大局的な推論の方向付けを行ない、これ
に基づいて前記ルール記憶部に記憶された次に適用可能
なプロダクションルールを抽出し、推論処理を実行する
推論部と、 前記ルール記憶部へのルールの登録に際し、そのルール
の追加によって強連結成分が変化するかどうかを判定
し、もし変化しない場合にはそのルールの登録を中止す
るルール登録判定部とを具備したことを特徴とする推論
処理装置。
1. A rule storage unit configured to store a plurality of production rules each including a pair of a condition unit and an execution unit, and all possible states of each variable handled in the production rule stored in the rule storage unit. The production rule that obtains a production rule that satisfies the transition condition as a directed graph matrix, further decomposes the directed graph matrix into strongly connected components, and determines which production rule satisfies the variable condition of each strongly connected component and the transition condition between each strongly connected component. Next, a strongly connected component decomposition unit that is obtained as meta knowledge indicating which production rule can be applied, a meta knowledge storage unit that stores the meta knowledge obtained by this strongly connected component decomposition unit, and this meta knowledge storage unit The current state based on the information that indicates the next applicable production rule of the meta knowledge stored in Recognize the gap between the target state and further determine the application of production rules to approach the target state, and conduct a global inference direction, and store it in the rule storage unit based on this. The next applicable production rule is extracted, an inference unit that executes inference processing, and at the time of registering the rule in the rule storage unit, it is determined whether or not the strongly connected component changes due to the addition of the rule, An inference processing device comprising: a rule registration determination unit that cancels registration of the rule if it does not change.
【請求項2】前記ルール登録判定部に代えて、前記ルー
ル記憶部に登録されたルールの中で、そのルールを削除
した場合の強連結成分が変化するかどうかを判定し、も
し変化しない場合にはそのルールを削除するルール削除
判定部を備えたことを特徴とする請求項1記載の推論処
理装置。
2. In place of the rule registration determination unit, it is determined whether a strongly connected component of the rules registered in the rule storage unit is deleted when the rule is deleted, and if it is not changed. The inference processing apparatus according to claim 1, further comprising a rule deletion determination unit that deletes the rule.
JP64000385A 1989-01-06 1989-01-06 Inference processor Expired - Lifetime JPH0650467B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP64000385A JPH0650467B2 (en) 1989-01-06 1989-01-06 Inference processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP64000385A JPH0650467B2 (en) 1989-01-06 1989-01-06 Inference processor

Publications (2)

Publication Number Publication Date
JPH02181228A JPH02181228A (en) 1990-07-16
JPH0650467B2 true JPH0650467B2 (en) 1994-06-29

Family

ID=11472333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP64000385A Expired - Lifetime JPH0650467B2 (en) 1989-01-06 1989-01-06 Inference processor

Country Status (1)

Country Link
JP (1) JPH0650467B2 (en)

Also Published As

Publication number Publication date
JPH02181228A (en) 1990-07-16

Similar Documents

Publication Publication Date Title
EP0318985B1 (en) Interrogating device and method
JPS6231430A (en) Inductive reasoning device
US5047951A (en) Inference processor using meta knowledge
US5265193A (en) Efficiently organizing objects in a rete pattern matching network
JPH076034A (en) Production-rule filtration mechanism and inference engine for expert system including said mechanism
JPH0650467B2 (en) Inference processor
CN107579844A (en) It is a kind of that failure method for digging is dynamically associated based on service path and frequency matrix
JP7330055B2 (en) Network processing device and method for processing network communication frames
US5587918A (en) Circuit pattern comparison apparatus
JP2001283184A (en) Clustering device
JPH0328929A (en) Method and device for inference and method and device for demonstrating theorem
JPH0377167A (en) Hypothesis selecting device
Lê et al. Considering dependent components in the terminal pair reliability problem
JP2828973B2 (en) Power system accident judgment device
JPS62256128A (en) Inference system
JPH01224842A (en) Inferential control system for knowledge-based system
JP2767625B2 (en) Fuzzy inference apparatus and operation method thereof
JPH0652503B2 (en) Inference processor
JP2002185510A (en) Datagram transfer system
JPH063420A (en) Test pattern generation method for combinational logic circuit
JPH04113464A (en) Information node evaluating method for information retrieving system
CN104252346B (en) A kind of method and device concurrently analyzed
JPH0736697A (en) Constraint sufficiency device
JPH0553815A (en) Supporting system in inference device
JP3006311B2 (en) Method and apparatus for changing network configuration

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term