JPH0495132A - Knowledge inference processing device - Google Patents

Knowledge inference processing device

Info

Publication number
JPH0495132A
JPH0495132A JP2208740A JP20874090A JPH0495132A JP H0495132 A JPH0495132 A JP H0495132A JP 2208740 A JP2208740 A JP 2208740A JP 20874090 A JP20874090 A JP 20874090A JP H0495132 A JPH0495132 A JP H0495132A
Authority
JP
Japan
Prior art keywords
rule
identifier
rules
selection
matrix
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
Application number
JP2208740A
Other languages
Japanese (ja)
Inventor
Toshiharu Tsuruma
鶴間 俊春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2208740A priority Critical patent/JPH0495132A/en
Publication of JPH0495132A publication Critical patent/JPH0495132A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To efficiently select a effective next rule in each network by setting selection indexes of rules as the next selection objects with respect to each rule. CONSTITUTION:Selection indexes of rules as next selection objects are stored in a storage means (rule network matrix memory) 2 with respect to each rule in a knowledge base, and the selection index of a rule selected out of selection indexes of rules as next selection objects is updated by an updating means based on information indicating whether the condition of the selected rule is satisfied or not. An inference processing part 5 reads out selection indexes of rules as next selection objects of one rule and selects the next rule based on these selection indexes. Thus, the effective next rule in each network is efficiently selected.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は複数のルールを有する知識ベースからのルール
の選択並びに接ルールの解釈を順次行うことにより一連
の推論を行う知識推論処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a knowledge inference processing device that performs a series of inferences by sequentially selecting rules from a knowledge base having a plurality of rules and interpreting tangent rules.

[従来の技術] この種の知識推論処理装置では、それぞれの条件を含む
複数のルールからなる知識ベースと、この知識ベースか
らルールを逐次取出す推論処理部とを備えており、推論
処理部は知識ベースから1つのルールを選択し、選択し
たルールの条件が洟だされるか否かを判断すると、引続
き知識ベースからルールを選択して該ルールの条件を判
断する。
[Prior Art] This type of knowledge inference processing device includes a knowledge base consisting of a plurality of rules including respective conditions, and an inference processing unit that sequentially extracts rules from this knowledge base. After selecting one rule from the base and determining whether the condition of the selected rule is met, a rule is subsequently selected from the knowledge base and the condition of the rule is determined.

このようなルールの選択並びに判断を順次行うことによ
り一連の推論がなされる。
A series of inferences is made by sequentially performing the selection and judgment of such rules.

ここで、推論処理の時間を短縮化するには、知識ベース
からのルールの選択効率を向上させることが非常に有効
である〇 このため、従来は知識ベース内の複数のルールをそれぞ
れ指示する各ポインタを格納したルールポインタテーブ
ルが提案されている。このポインタテーブルには各ルー
ルのポインタが所定の配列順序で格納されており、推論
処理に際しては各ルールのポインタをその配列順序に基
づいて選択し、選択されたポインタによって指示される
ルールを知識ベースから取出し、このルールの条件を判
断の対象とする。
Here, in order to shorten the inference processing time, it is very effective to improve the efficiency of selecting rules from the knowledge base.For this reason, conventionally, each A rule pointer table storing pointers has been proposed. This pointer table stores pointers for each rule in a predetermined arrangement order, and during inference processing, the pointers for each rule are selected based on the arrangement order, and the rule indicated by the selected pointer is added to the knowledge base. , and use the conditions of this rule as the subject of judgment.

ルールポインタテーブル内での各ポインタの配列順序は
推論が終了する毎に更新され、それまでに高い確率で条
件を満たしてきたルールを指示するポインタの配列順序
は上り、またそれまでに低い確率で条件を満たしてきた
ルールを指示するポインタの配列順序は下がる。
The arrangement order of each pointer in the rule pointer table is updated every time inference is completed, and the arrangement order of pointers pointing to rules that have met the condition with a high probability up to that point goes up, and the arrangement order of pointers that point to rules that have met the condition with a high probability up until then is The array order of pointers pointing to rules that have satisfied the conditions is lowered.

したがって、推論に際しては、それまでに高い確率で条
件を満たしてきたルールを優先的に選択することとなり
、もって知識ベースからのルールの選択効率を向上する
ことができた。
Therefore, during inference, rules that have satisfied the conditions with a high probability are selected preferentially, thereby improving the efficiency of selecting rules from the knowledge base.

[発明か解決しようとする課題] しかしながら、上記従来のルールポインタテーブルを用
いた方法では、このポインタテーブル内の各ポインタの
配列順序は知識ベース内の全てのルールの優先順位に対
応し、よって該各ルールの優先順位を一括して指示して
いるので、複数の専門分野別にそれぞれの推論を行う場
合は、その優先順位かそれぞれの専門分野毎に最も適切
であるとは限らなかった。例えば1つの専門分野で推論
するための一連の各ルールと、他の専門分野で推論する
ための一連の各ルールとが全く異なれば、ルールポイン
タテーブル内の各ポインタの配列順序は両者の専門分野
で共に十分に有効であるとは限らない。すなわち、専門
分野別にルール間の関係をそれぞれ考慮して、専門分野
別に一連の各ルールからなるネットワークをそれぞれ構
築する場合には、このルールポインタテーブルを用いて
もルールの選択効率を向上させることはできなかった。
[Problem to be solved by the invention] However, in the method using the conventional rule pointer table described above, the arrangement order of each pointer in this pointer table corresponds to the priority order of all rules in the knowledge base. Since the priority order of each rule is specified all at once, when inferences are made for each of multiple specialized fields, the priority order is not necessarily the most appropriate for each specialized field. For example, if a set of rules for reasoning in one specialized field is completely different from a set of rules for reasoning in another specialized field, the arrangement order of pointers in the rule pointer table will be different for both specialized fields. However, both methods may not be fully effective. In other words, when building a network consisting of a series of rules for each specialized field by considering the relationships between rules for each specialized field, it is not possible to improve the rule selection efficiency even by using this rule pointer table. could not.

また、ルールの条件が満たされた場合は、有効な次のル
ールを選択するために、ルールポインタテーブル内の各
ポインタをその配列順序に従って最初から検索しなくて
はならなかうたので、ルールの選択効率が極めて良好で
あるとは言えなかった。
Additionally, when a rule's conditions are met, each pointer in the rule pointer table must be searched from the beginning according to its arrangement order in order to select the next valid rule. It could not be said that the efficiency was extremely good.

そこで、本発明は専門分野別に一連の各ルールからなる
ネットワークをそれぞれ構築することができ、それぞれ
のネットワークにて有効な次のルールを良好な効率で選
択することが可能な知識推論処理装置を提供することを
目的とする。
Therefore, the present invention provides a knowledge inference processing device that can construct a network consisting of a series of rules for each specialized field and select the next rule that is effective in each network with good efficiency. The purpose is to

[課題を解決するための手段] 本発明では知識ベース内の各ルールの1つのルール毎に
、該1つのルールに引続いて選択の対象となる前記各ル
ールのそれぞれの選択指数を格納手段に格納しておき、
一連の推論が終了すると選択された条件を満たした一連
の各ルールのうち1つのルール毎に、該1つのルールに
引続(1て選択の対象となる前記各ルールの選択指数の
うちの選択されたルールの選択指数を該選択されたルー
ルの条件が満たされたか否かに基づいて更新手段にて更
新し、推論処理部は1つのルールに引続いて選択の対象
となる前記各ルールのそれぞれの選択指数を前記格納手
段から読出し、これらの選択指数に基づいて次のルール
を選択するようにしている。
[Means for Solving the Problems] In the present invention, for each rule in the knowledge base, the selection index of each of the rules to be selected subsequent to the one rule is stored in a storage means. Store it and
When a series of inferences is completed, for each rule out of a series of rules that satisfy the selected conditions, the selection index of the selection index of each rule to be selected is The updating means updates the selection index of the selected rule based on whether the condition of the selected rule is satisfied, and the inference processing unit updates each of the rules to be selected following one rule. The selection indices are read from the storage means, and the next rule is selected based on these selection indices.

[作用] 本発明ニよれば、1つのルールに引続いて選択ノ対象ト
なる各ルールのそれぞれの選択指数を設定しておき、推
論処理部はこれらの選択指数に基づいて次のルールを選
択するようにしている。このような各ルールのそれぞれ
の選択指数は該各ルールの1つ毎に対応してそれぞれ設
定されているので、各ルールのいずれのルールからでも
引続く次のルールを選択することができる。
[Operation] According to the second aspect of the present invention, selection indices are set for each rule to be selected following one rule, and the inference processing section selects the next rule based on these selection indices. I try to do that. Since the selection index of each rule is set corresponding to each rule, the next rule can be selected from any of the rules.

また、一連の推論を終了すると、この推論に際して用い
られた各ルールの1つ毎に、該1つのルールに引続いて
選択の対象となる各ルールの選択指数のうちから実際に
選択されたルールの選択指数を該選択されたルールの条
件が満たされたか否かに基づいて更新するようにしてい
るので、一連の推論の履歴を残すことかできる。
In addition, when a series of inferences is completed, for each rule used in this inference, the rule actually selected from the selection index of each rule that is the target of selection following that one rule. Since the selection index of is updated based on whether the conditions of the selected rule are satisfied, a history of a series of inferences can be kept.

[実施例] 以下、本発明の実施例を添付図面を参照して詳細に説明
する。
[Embodiments] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

第1図は本発明に係わる知識推論処理装置の一実施例を
示すブロック図である。同図において、ルールベースメ
モリ1はそれぞれの条件を含む複数のルール、および該
各ルールを指示するためのそれぞれのポインタを配列し
たポインタテーブルを格納し、またルールネットワーク
マトリックスメモリ2は該各ルール相互間の関連度を示
す多くの指数を格納し、さらにワーキングメモリ3は推
論処理に必要な種々のプログラム、データ等を格納する
。ルールベース制御部4はルールベースメモリ1内の各
ルールのうちから所定のルールを選択して取出し、この
ルールを推論処理部5に与えたり、これらのルールの内
容を書換えたり、ルールネットワークマトリックスメモ
リ2の内容を書換える。推論処理部5はルールベース制
御部4からルールを受取る度にルールを解釈し、推論を
実行する。外部インタフェース部6は当該知識推論処理
装置と外部間のインタフェースであり、ルールベースメ
モリ1の内容変更に係わるデータ、ルールネットワーク
マトリックスメモリ2の内容変更に係わるデータ、推論
処理部5への起動命令等を外部から入力したり、・ある
いは推論処理部5による推論処理の結果を外部に出力す
る。
FIG. 1 is a block diagram showing an embodiment of a knowledge inference processing device according to the present invention. In the figure, a rule base memory 1 stores a plurality of rules including respective conditions and a pointer table in which pointers for indicating each rule are arranged, and a rule network matrix memory 2 stores a plurality of rules including respective conditions, and a rule network matrix memory 2 stores a pointer table in which pointers for indicating each rule are arranged. In addition, the working memory 3 stores various programs, data, etc. necessary for inference processing. The rule base control unit 4 selects and takes out a predetermined rule from among the rules in the rule base memory 1, provides this rule to the inference processing unit 5, rewrites the contents of these rules, and stores the rule network matrix memory. Rewrite the contents of 2. Every time the inference processing unit 5 receives a rule from the rule base control unit 4, it interprets the rule and executes inference. The external interface unit 6 is an interface between the knowledge inference processing device and the outside, and includes data related to changing the contents of the rule base memory 1, data related to changing the contents of the rule network matrix memory 2, activation instructions to the inference processing unit 5, etc. is input from the outside, or the result of the inference processing by the inference processing unit 5 is output to the outside.

ルールベースメモリ1には第2図に示すようなポインタ
テーブル21か格納されており、このルーベースメモリ
1内にn個のルールか格納されているとするならば、ポ
インタテーブル21はn+1個のポインタを格納してい
る。
The rule base memory 1 stores a pointer table 21 as shown in FIG. 2. If n rules are stored in the rule base memory 1, the pointer table 21 stores n+1 rules. Stores a pointer.

ここで、ルールベースメモリ1内に最初に格納されたル
ールには識別子1が与えられ、2番目に格納されたルー
ルには識別子2が与えられ、n番目に格納されたルール
には識別子nか与えられる。
Here, the first rule stored in the rule base memory 1 is given an identifier 1, the second stored rule is given an identifier 2, and the nth rule is given an identifier n. Given.

そして、ポインタテーブル21には該各ルールを指示す
るそれぞれのポインタか該各識別子に対応して配列され
る。このため、例えばに番目に格納され識別子kを与え
られたルールを選択しようとする場合は、このポインタ
テーブル21内に識別子kに対応して格納されているポ
インタを読出し、このポインタによって指示されるルー
ルをアクセスすれば、識別子にのルールを得ることがで
きる。
In the pointer table 21, pointers indicating each rule are arranged corresponding to each identifier. For this reason, for example, if you want to select the rule stored in No. 1 and given the identifier k, the pointer stored in this pointer table 21 corresponding to the identifier k is read out, and the rule pointed to by this pointer is read out. By accessing the rules, you can get the rules for the identifier.

この識別子にのルールは第3図に示すような構成であっ
て、 rule id”に対応して識別子kが格納され
、“condition  に対応して該ルールの条件
が格納され、 cone l us ton  に対応
して該ルールの条件を満たしたときに実行される結論が
格納され、 rule pointer table”
に対応して該ルールの条件を満たしたときに次に選択の
対象となる各ルールの優先順位を示す行列つまり該優先
順位で配列された各ルールの識別子の行列が格納されて
いる。
The rules for this identifier have a configuration as shown in Figure 3, where an identifier k is stored in correspondence with "rule id", a condition of the rule is stored in correspondence with "condition", and cone lus ton is Correspondingly, the conclusion to be executed when the conditions of the rule are met is stored, and the "rule pointer table"
A matrix indicating the priority order of each rule to be selected next when the conditions of the rule are satisfied, that is, a matrix of identifiers of the rules arranged in the priority order is stored.

また、他の識別子のルールも第3図に示した構成と同様
であって、それぞれのルールの識別子、それぞれのルー
ルの条件、それぞれのルールの条件を満たしたときに実
行される結論、それぞれのルールの条件を満たしたとき
に次に選択の対象となる各ルールの識別子を優先順位で
配列した行列が格納されている。
In addition, the rules for other identifiers are also similar to the configuration shown in Figure 3, with the identifier for each rule, the conditions for each rule, the conclusion to be executed when the conditions for each rule are met, and the results for each rule. A matrix is stored in which the identifiers of the rules to be selected next when the rule conditions are met are arranged in priority order.

なお、識別子Oのルールへのポインタは推論処理の開始
時に最初に選択されるポインタである。
Note that the pointer to the rule with identifier O is the pointer that is first selected at the start of the inference process.

このポインタによって指示される識別子0のルールは推
論処理開始のための基本定義として予め設定されたもの
であり、推論起動時にのみ適用される。勿論、この識別
子Oのルールには次に選択の対象となる各ルールの識別
子を優先順位で配列した行列が“rule point
er table”に対応して設定される。
The rule with the identifier 0 indicated by this pointer is set in advance as a basic definition for starting the inference process, and is applied only when starting the inference process. Of course, for this rule with identifier O, there is a matrix in which the identifiers of the rules to be selected next are arranged in order of priority.
er table”.

ルールネットワークマトリックスメモリ2には第4図に
示すようなマトリックステーブル41が格納されており
、前記ポインタテーブル21には(n+1)のポインタ
が格納されていることから、このマトリックステーブル
41は(n+1)X(n+1)の行列となる。1行目は
識別子0のルールに対応し、この1行目のw (0,0
) 、 w (0,1) 。
The rule network matrix memory 2 stores a matrix table 41 as shown in FIG. 4, and since the pointer table 21 stores (n+1) pointers, this matrix table 41 has (n+1) It becomes a matrix of X(n+1). The first line corresponds to the rule with identifier 0, and w (0,0
), w (0,1).

−0−w(0,n)は識別子Oのルールの指数、識別子
1のルールの指数、・・・、識別子nのルールの指数で
ある。同様に、2〜(n+1)行目は各識別子1〜nの
ルールにそれぞれ対応し、これらの行には識別子0のル
ールの指数、識別子1のルールの指数、・・・、識別子
nのルールの指数がそれぞれ配列されている。
-0-w(0,n) is the index of the rule with identifier O, the index of the rule with identifier 1, . . . , the index of the rule with identifier n. Similarly, the 2nd to (n+1)th lines correspond to the rules with identifiers 1 to n, respectively, and these lines include the index of the rule with identifier 0, the index of the rule with identifier 1, ..., the rule with identifier n. The indices of are arranged respectively.

したがって、(k+1)行目は識別子にのルールに対応
し、この(k+1)行目のw(k、o) 、 w(k、
1) 、 −、w (k、n)は識別子0のルールの指
数。
Therefore, the (k+1)th line corresponds to the rule for the identifier, and the (k+1)th line w(k, o), w(k,
1) , −, w (k, n) are the exponents of the rule with identifier 0.

識別子1のルールの指数、・・・、識別子nのルールの
指数である。ここで、これらの指数w(k、o)。
The index of the rule with identifier 1, . . . is the index of the rule with identifier n. Here, these indices w(k, o).

w(k、1)、・・・、 w(k、n)を大きな値から
順次選択し、この選択順序でそれぞれの指数を示す各識
別子を配列すると、これらの識別子の配列順序は識別子
にのルールの条件を満たしたときに次に選択の対象とな
る各ルールの優先順位を示す。したがって、これらの識
別子の行列は第3図に示した識別子にのルールにおける
 rule pointer tableに対応する次
に選択の対象となる各ルールの優先順位を示す各ルール
の識別子の行列となる。
If w (k, 1), ..., w (k, n) are selected in order from the largest value, and each identifier indicating each index is arranged in this selection order, the order in which these identifiers are arranged will depend on the identifiers. Indicates the priority of each rule to be selected next when the rule conditions are met. Therefore, the matrix of these identifiers becomes a matrix of identifiers of each rule indicating the priority of each rule to be selected next, which corresponds to the rule pointer table in the rule for identifiers shown in FIG.

次に、このような構成においてなされる推論処理の動作
を第5図に示すフローチャートに従って述べる。
Next, the operation of inference processing performed in such a configuration will be described according to the flowchart shown in FIG.

ます、推論処理部5は外部から外部インタフェース部6
を介して起動命令を受けると、推論開始時のルールの読
出し命令をルールベース制御部4に出す(ステップ10
1)。これに応答して、ルールベース制御部4はルール
ベースメモリ1内の第2図に示したポインタテーブル2
1をアクセスして、推論開始時に選択すべき識別子0の
ルールへのポインタをポインタテーブル21から読出し
、このポインタによって指示される識別子0のルールを
アクセスする(ステップ102)。
First, the inference processing unit 5 is connected to the external interface unit 6 from the outside.
When the startup command is received via the inference controller, a command to read the rules at the time of starting the inference is issued to the rule base control unit 4 (step 10).
1). In response to this, the rule base control section 4 uses the pointer table 2 shown in FIG.
1, the pointer to the rule with identifier 0 to be selected at the start of inference is read from the pointer table 21, and the rule with identifier 0 pointed to by this pointer is accessed (step 102).

ルールベース制御部4は識別子0のルールをアクセスす
ると、コノルールの“rule pointer ta
ble“に対応する各ルールの優先順位を示す各ルール
の識別子の行列に読出すべき識別子が設定されているか
否かを判断しくステップ103)、設定されていれば各
ルールの識別子の行列から最初に配列されているルール
の識別子つまり最も高い優先順位であるルールの識別子
を読出す。例えば識別子nが最初に配列されているなら
ば、ルールベース制御部4は識別子nを読出して、さら
に識別子nによって示されるルールへのポインタをポイ
ンタテーブル21から読出し、このポインタによって指
示される識別子nのルールをアクセスする。
When the rule base control unit 4 accesses the rule with identifier 0, the “rule pointer ta” of the rule is
In step 103), it is determined whether an identifier to be read is set in the matrix of identifiers of each rule indicating the priority order of each rule corresponding to "ble". Reads out the identifiers of the rules arranged in , that is, the identifier of the rule with the highest priority.For example, if identifier n is arranged first, the rule base control unit 4 reads out identifier n, and then reads out the identifier of the rule with the highest priority. The pointer to the rule indicated by is read from the pointer table 21, and the rule with the identifier n indicated by this pointer is accessed.

そして、ルールベース制御部4は識別子nのルールを推
論処理部5へ引渡す(ステップ104)。
Then, the rule base control section 4 hands over the rule with the identifier n to the inference processing section 5 (step 104).

推論処理部5は識別子nのルールを受取ると、このルー
ルの condition  に対応する条件が成立す
るか否かを判断する(ステップ105)。ここで、この
条件が成立しなければ、推論処理部5は識別子nのルー
ルの条件が成立しなかったことをルールベース制御部4
に通知する。ルールベース制御部4は識別子0のルール
に引続く次のルールとして選択された識別子nのルール
の条件が成立しなかったことから、識別子0のルールに
対応する識別子nのルールの指数、つまりルールネット
ワークマトリックスメモリ2内の第4図に示したマトリ
ックステーブル41における第1行目の識別子nのルー
ルの指数w(0,n)を選択し、この指数w(0,n)
を次式(1)に基づいて更新する。
When the inference processing unit 5 receives the rule with the identifier n, it determines whether the condition corresponding to condition of this rule is satisfied (step 105). Here, if this condition is not satisfied, the inference processing unit 5 informs the rule base control unit 4 that the condition of the rule with the identifier n is not satisfied.
to notify. Since the conditions of the rule with the identifier n selected as the next rule following the rule with the identifier 0 are not satisfied, the rule base control unit 4 sets the index of the rule with the identifier n corresponding to the rule with the identifier 0, that is, the rule Select the index w(0,n) of the rule of the identifier n in the first row in the matrix table 41 shown in FIG. 4 in the network matrix memory 2, and select this index w(0,n).
is updated based on the following equation (1).

w    (j、j)=w    (+、j)  −Δ
w−(1)new           old ただし、上記式(1)においてw   (j、j>はo
ld 更新される以前の指数w (0,n)を表し、w   
(1ev 、j)は更新された後の指数w(0,n)を表し、ΔW
は予め定められた値を表す。
w (j, j)=w (+, j) −Δ
w-(1) new old However, in the above formula (1), w (j, j> is o
ld represents the index w (0, n) before being updated, w
(1ev, j) represents the updated index w(0, n), ΔW
represents a predetermined value.

したがって、識別子0のルールに引続く次のルールとし
て選択された識別子nのルールの条件が成立しなかった
場合は、識別子0のルールに対応する識別子nのルール
の指数w(0,n)が小さくされる。
Therefore, if the condition of the rule with identifier n selected as the next rule after the rule with identifier 0 is not satisfied, the index w(0, n) of the rule with identifier n corresponding to the rule with identifier 0 is be made smaller.

この後、前記ステップ103からの処理に戻り、ルール
ベース制御部4はルールベースメモリ1内の識別子0の
ルールの“rule pointer table  
に対応する各ルールの識別子の行列に読出すべき識別子
が設定されていることを確認しくステップ103)、こ
の行列から既に読出した最初に配列されていた識別子n
を除く最も高い優先順位のルルの識別子、つまり該行列
において2番目に配列されている識別子を読出す。例え
ば読出された識別子が識別子1であるならば、ルールベ
ース制御部4は識別子1によって示されるルールへのポ
インタをポインタテーブル21から読出して、このポイ
ンタによって指示される識別子nのルールをアクセスし
、識別子1のルールを推論処理部5へ引渡す(ステップ
104)。
Thereafter, the process returns to step 103, and the rule base control unit 4 stores the "rule pointer table" of the rule with identifier 0 in the rule base memory 1.
Check that the identifier to be read is set in the matrix of identifiers of each rule corresponding to step 103).
The identifier of Lulu with the highest priority other than , that is, the identifier arranged second in the matrix is read out. For example, if the read identifier is identifier 1, the rule base control unit 4 reads a pointer to the rule indicated by identifier 1 from the pointer table 21, accesses the rule with identifier n indicated by this pointer, The rule with identifier 1 is handed over to the inference processing unit 5 (step 104).

推論処理部5は識別子1のルールを受取ると、このルー
ルの condition  に対応する条件が成立す
るか否かを判断する(ステップ105)。ここで、この
条件が成立したならば、推論処理部5は該ルールの“c
onclusion  に対応する結論を実行するとと
もに(ステップ107)、識別子1のルールの条件が成
立したことをルールベース制御部4に通知する。ルール
ベース制御部4は識別子0のルールに引続く次のルール
として選択された識別子1のルールの条件か成立したこ
とから、識別子0のルールに対応する識別子1のルール
の指数、つまりルールネットワークマトリックスメモリ
2内の第4図に示したマトリックステーブル41におけ
る第1行目の識別子1のルールの指数W(0,1)を選
択し、この指数w(0,1)を次式(2)に基づいて更
新する。
When the inference processing unit 5 receives the rule with the identifier 1, it determines whether the condition corresponding to condition of this rule is satisfied (step 105). Here, if this condition is satisfied, the inference processing unit 5
The conclusion corresponding to onclusion is executed (step 107), and the rule base control unit 4 is notified that the condition of the rule with identifier 1 is satisfied. Since the condition of the rule with identifier 1 selected as the next rule following the rule with identifier 0 is satisfied, the rule base control unit 4 calculates the index of the rule with identifier 1 corresponding to the rule with identifier 0, that is, the rule network matrix. Select the exponent W (0, 1) of the rule of the identifier 1 in the first row in the matrix table 41 shown in FIG. Update based on.

w     (j、j)  −w    (i、j) 
 +ΔW  ・・・ (2)new         
   oldただし、上記式(2)においてw   (
i 、 j )はold 更新される以前の指数w (0,1)を表し、w   
(400w 、j)は更新された後の指数w(0,1)を表し、ΔW
は予め定められた値を表す。
w (j, j) −w (i, j)
+ΔW... (2) new
However, in the above formula (2), w (
i, j) represents the index w (0, 1) before the old update, w
(400w, j) represents the updated index w(0,1), ΔW
represents a predetermined value.

したがって、識別子0のルールに引続く次のルールとし
て選択された識別子1のルールの条件が成立した場合は
、識別子Oのルールに対応する識別子1のルールの指数
w(0,1)が大きくされる。
Therefore, if the conditions of the rule with identifier 1 selected as the next rule after the rule with identifier 0 are satisfied, the exponent w(0,1) of the rule with identifier 1 corresponding to the rule with identifier O is increased. Ru.

この後、前記ステップ103からの処理に戻り、ルール
ベース制御部4は識別子1のルールの条件か成立したこ
とから、このルールの”rule pointer t
able  に対応する各ルールの識別子の行列に読出
すべき識別子が設定されているか否かを判断しくステッ
プ103)、設定されていれば各ルールの識別子の行列
から最初に配列されているルールの識別子を読出す。例
えば識別子kが最初に配列されていれば、ルールベース
制御部4は識別子kによって示されるルールへのポイン
タをポインタテーブル21から読出し、このポインタに
よって指示される識別子にのルールを推論処理部5へ引
渡す(ステップ104)。
Thereafter, the process returns to step 103, and since the condition of the rule with identifier 1 is satisfied, the rule base control unit 4 sets the "rule pointer t" of this rule.
It is determined whether or not the identifier to be read is set in the matrix of identifiers of each rule corresponding to "able" (step 103), and if it is set, the identifier of the rule arranged first in the matrix of identifiers of each rule is read. Read out. For example, if the identifier k is arranged first, the rule base control unit 4 reads the pointer to the rule indicated by the identifier k from the pointer table 21, and sends the rule to the identifier indicated by this pointer to the inference processing unit 5. Delivery (step 104).

推論処理部5は識別子にのルールを受取ると、このルー
ルの condition  に対応する条件が成立す
るか否かを判断する(ステップ105)。
When the inference processing unit 5 receives the rule for the identifier, it determines whether the condition corresponding to the condition of this rule is satisfied (step 105).

ここで、この条件が成立しなかった場合は、推論処理5
からルールベース制御部4へと該条件が成立しなかった
ことを通知する。ルールベース制御部4は識別子1のル
ールに引続く次のルールとして選択された識別子にのル
ールの条件が成立しなかったことから、識別子1のルー
ルに対応する識別子にのルールの指数、つまりマトリッ
クステブル41における第2行目の識別子にのルールの
指数W (1,k)を選択し、この指数w(1,k)を
上記式(1)に基づいて更新し、これにより指数W(1
,k)を小さくする。
Here, if this condition does not hold, inference processing 5
The rule base control unit 4 is notified that the condition is not satisfied. Since the rule condition for the identifier selected as the next rule following the rule for identifier 1 is not satisfied, the rule base control unit 4 sets the rule index, that is, the matrix, for the identifier corresponding to the rule for identifier 1. The index W (1, k) of the rule is selected as the identifier in the second row of the table 41, and this index w (1, k) is updated based on the above formula (1).
, k).

さらに、前記ステップ103からの処理に戻り、識別子
1のルールの rule pointer table
  に対応する各ルールの識別子の行列に読出すべき識
別子か設定されていることを確認しくステップ103)
、この行列から2番目に配列されている識別子を読出し
て、この識別子によって示されるルールへのポインタを
ポインタテーブル21から読出し、このポインタによっ
て指示されるルールを推論処理部5へ引渡しくステップ
104)、このルールの条件か成立するか否かを判断す
る(ステップ105)。
Furthermore, returning to the process from step 103, the rule pointer table of the rule with identifier 1 is
Make sure that the identifier to be read is set in the identifier matrix of each rule corresponding to step 103).
, reads the second identifier arranged from this matrix, reads the pointer to the rule indicated by this identifier from the pointer table 21, and delivers the rule indicated by this pointer to the inference processing unit 5 (Step 104) , it is determined whether the conditions of this rule are satisfied (step 105).

このようにルールの条件が成立しなければ、前記ステッ
プ103からの処理を繰返し、識別子1のルールの r
ule pointer table”に対応する各ル
ールの識別子の行列から2番目、3番目、・・・の識別
子を順次読出し、これらの識別子によって示されるそれ
ぞれのルールの条件が成立するか否かを順次判断するこ
ととなる。そして、条件の不成立の度に、マトリックス
テーブル41における第2行目の選択された各識別子の
指数を上記式(1)に基づいて小さくなるように更新す
ることとなる。
If the rule conditions are not met in this way, the process from step 103 is repeated, and r of the rule with identifier 1 is
The second, third, etc. identifiers are sequentially read out from the matrix of identifiers of each rule corresponding to "ule pointer table", and it is sequentially determined whether the conditions of each rule indicated by these identifiers are satisfied. Then, each time the condition is not satisfied, the index of each selected identifier in the second row of the matrix table 41 is updated to become smaller based on the above formula (1).

また、前記ステップ105で先に述べた識別子にのルー
ルの条件が成立した場合は、推論処理部5は該ルールの
’ eone l us ton  に対応する結論を
実行するとともに(ステップ107)、識別子にのルー
ルの条件が成立したことをルールベース制御部4に通知
する。ルールベース制御部4は識別子1のルールに引続
く次のルールとして選択された識別子にのルールの条件
が成立したことから、識別子1のルールに対応する識別
子にのルールの指数、つまりマトリックステーブル′4
1における第2行目の識別子にのルールの指数w(1,
k)を選択し、この指数w(1,k)を上記式(2)に
基づいて更新し、これにより指数W(1,k)を大きく
する。
Further, if the condition of the rule for the identifier described earlier is satisfied in step 105, the inference processing unit 5 executes the conclusion corresponding to 'eone lus ton' of the rule (step 107), and also applies the rule to the identifier. The rule base control unit 4 is notified that the rule conditions have been met. Since the rule condition for the identifier selected as the next rule following the rule for identifier 1 is satisfied, the rule base control unit 4 sets the index of the rule for the identifier corresponding to the rule for identifier 1, that is, the matrix table' 4
The index of the rule w(1,
k) and updates this index w(1,k) based on the above equation (2), thereby increasing the index W(1,k).

さらに、前記ステップ103からの処理に戻り、識別子
にのルールの条件が成立したことがら、このルールの 
rule pointer table”に対応する各
ルールの識別子の行列に読出すべき識別子が設定されて
いるか否かを判断しくステップ103)、設定されてい
れば該行列から最初に配列されているルールの識別子を
読出して、この識別子によって示されるルールへのポイ
ンタをポインタテーブル21から読出し、このポインタ
によって指示されるルールを推論処理部5へ引渡しくス
テップ104)、このルールの条件が成立するか否かを
判断する(ステップ105)。
Furthermore, returning to the process from step 103, since the condition of the rule for the identifier is satisfied, this rule is
It is determined whether the identifier to be read is set in the matrix of identifiers of each rule corresponding to the "rule pointer table" (step 103), and if it is set, the identifier of the rule arranged first is read from the matrix. A pointer to the rule indicated by this identifier is read from the pointer table 21, and the rule indicated by this pointer is delivered to the inference processing unit 5 (Step 104), and it is determined whether the conditions of this rule are satisfied or not. (Step 105).

したがって、所定のルールの条件が成立すれば、前記ス
テップ103からの処理に戻り、該所定のルールの r
ule pointer table’に対応する各ル
ールの識別子の行列から次のルールの識別子を読出し、
次のルールの条件が成立するか否かを判断することとな
る。そして、条件が成立すると、マトリックステーブル
41における前記所定のルールに対応する行に配列され
ている前記法のルールの識別子の指数を上記式(2)に
基づいて大きくなるように更新することとなる。
Therefore, if the conditions of the predetermined rule are satisfied, the process returns to step 103 and the r of the predetermined rule is satisfied.
Read the identifier of the next rule from the matrix of identifiers of each rule corresponding to ule pointer table',
It is then determined whether the conditions of the next rule are satisfied. Then, when the condition is satisfied, the index of the identifier of the law rule arranged in the row corresponding to the predetermined rule in the matrix table 41 is updated to become larger based on the above formula (2). .

このように前記各ステップ103〜108を繰返すこと
により、ルールベースメモリ1内の各ルールのうちから
ルールを順次選択し、これらのルールを順次解釈するこ
とにより、一連の推論がなされる。゛そして、選択され
たルールの条件が成立するか否かに応じてマトリックス
テーブル41における指数が更新される。
By repeating each of the steps 103 to 108 in this manner, a series of inferences is made by sequentially selecting rules from among the rules in the rule base memory 1 and sequentially interpreting these rules. ``Then, the index in the matrix table 41 is updated depending on whether the condition of the selected rule is satisfied or not.

この推論に際し、1つのルールの −ule poin
ter table  に対応する各ルールの識別子の
行列から全ての識別子を順次読出し、これらの識別子に
よって示されるそれぞれのルールの条件が成立しないと
順次判断され、よって該行列から読出すべき識別子が無
くなった場合は、ルールベース制御部4は該行列に読出
すべき識別子が設定されていないと判断しくステップ1
03)、この旨を推論処理部5に通知する。推論処理部
5は該旨の通知を受けると、推論の終了と判断し、この
推論の結果を外部インタフェーズ部6を介して外部に通
知する。
In this inference, one rule -ule point
When all identifiers are sequentially read from the matrix of identifiers of each rule corresponding to ter table, and it is sequentially determined that the conditions of each rule indicated by these identifiers do not hold, and therefore there are no more identifiers to be read from the matrix. In step 1, the rule base control unit 4 determines that the identifier to be read is not set in the matrix.
03), notifies the inference processing unit 5 of this fact. When the inference processing unit 5 receives this notification, it determines that the inference has ended, and notifies the result of this inference to the outside via the external interface unit 6.

このとき、ルールベース制御部4は一連の推論を終了し
たことから、ルールベースメモリ1内の全てのルール毎
1:  rule pointer table  と
してそれぞれ設定されている識別子の各行列をマトリッ
クステーブル41内の各行の指数に基づいて更新する(
ステップ109)。すなわち、マトリックステーブル4
1内の第1行目の各指数を大きな値から順次選択し、こ
の選択順序でそれぞれの指数を示す各識別子を配列し、
これにより各識別子の行列を形成する。こ9行列は第1
行目つまり識別子0によって示されるルールに対応して
いるので、このルールの rule pointer 
table  に対応する各ルールの識別子の行列とし
て格納され、もって該行列が更新される。また、マトリ
ックステーブル41内の第2行目の各指数を大きな値か
ら順次選択し、この選択順序でそれぞれの指数を示す各
識別子を配列し、これにより形成された各識別子の行列
を識別子1によって示されるルールのrule poi
nter table’に対応する各ルールの識別子の
行列として格納し、もって該行列を更新する。以降同様
に、マトリックステーブル41内の第3行目から第n行
目と、各識別子3〜nによって示されるそれぞれのルー
ルに含まれる各識別子行列とを対応させ、もって該各行
列をそれぞれ更新する。
At this time, since the series of inferences has been completed, the rule base control unit 4 stores each matrix of identifiers set as 1: rule pointer table for each rule in the rule base memory 1 in each row in the matrix table 41. Update based on the exponent of (
Step 109). That is, matrix table 4
Select each index in the first row of 1 in order from the largest value, arrange each identifier indicating each index in this selection order,
This forms a matrix of each identifier. This nine matrix is the first
This corresponds to the rule indicated by the line 0, that is, the identifier 0, so the rule pointer of this rule
It is stored as a matrix of identifiers of each rule corresponding to table, and the matrix is updated accordingly. Also, each index in the second row in the matrix table 41 is selected in order from the largest value, each identifier indicating each index is arranged in this selection order, and the matrix of each identifier thus formed is created by identifier 1. rule poi of the indicated rule
The identifier of each rule corresponding to the rule table is stored as a matrix, and the matrix is updated accordingly. Thereafter, similarly, the third to nth rows in the matrix table 41 are associated with each identifier matrix included in each rule indicated by each identifier 3 to n, and each matrix is updated accordingly. .

このように推論に際しては、マトリックステブル41内
の指数をルールの条件が成立すれば大きくなるように、
また条件が成立しなければ小さくなるように更新し、一
連の推論処理の終了後には、マトリックステーブル41
内の指数の大きさに基づいて各ルールに含まれる各識別
子行列を更新しているので、次回の推論処理においては
1つのルールに引続いて選択の対象となる各ルールのう
ちから過去に選択確率の高かったルールか優先的に選択
されることとなる。また、1つのルール毎に、次に選択
の対象となる各ルールの指数を設定しているため、ルー
ルのネットワークをどのように構築しても、1つのルー
ルから次のルールへと推論を良好な効率で進めることが
できる。
In this way, when making inferences, the index in the matrix table 41 is set so that it increases if the rule conditions are met.
Also, if the condition does not hold, the matrix table 41 is updated so that it becomes smaller.
Since each identifier matrix included in each rule is updated based on the size of the exponent in The rule with the highest probability will be selected preferentially. In addition, because the index of each rule to be selected next is set for each rule, no matter how you construct the network of rules, you can easily infer from one rule to the next. This can be done with great efficiency.

[発明の効果] 以上説明したように本発明に係わる知識推論処理装置に
よれば、各ルールの1つのルール毎に、該1つのルール
に引続いて選択の対象となる各ルールのそれぞれの選択
指数を設定しておき、1つのルールに引続いて選択の対
象となる各ルールのそれぞれの選択指数に基づいて次の
ルールを選択するようにし、また一連の推論を終了する
とそれらの指数を更新して、推論の履歴を残すようにし
ている。このため、ルールのネットワークを様々な態様
で同等困難なく構築することができ、それぞれのネット
ワークにて有効な次のルールを良好な効率で選択するこ
とが可能となる。
[Effects of the Invention] As explained above, according to the knowledge inference processing device according to the present invention, for each rule, each selection of each rule to be selected subsequent to the one rule is determined. Set indices so that the next rule is selected based on the selection index of each rule that is selected following one rule, and those indices are updated when a series of inferences is completed. I am trying to keep a history of my inferences. Therefore, a network of rules can be constructed in various ways without any difficulty, and the next rule that is effective in each network can be selected with good efficiency.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明に係わる知識推論処理装置の一実施例を
示すブロック図、第2図は第1図に示した実施例におけ
るルールベースメモリ内のポインタテーブルの構成を示
す図、第3図は第1図に示した実施例におけるルールベ
ースメモリ内のルルの構成を示す図、第4図は第1図に
示した実施例におけるルールネットワークマトリックス
メモリ内のマトリックステーブルを示す図、第5図は第
1図に示した実施例における動作を説明するために用い
られたフローチャートである。 1・・・ルールベースメモリ、2・・・ルールネットワ
ークマトリックスメモリ、3・・・ワーキングメモリ、
4・ルールベース制御部、5・推論処理部、6・・外部
インタフェース部、21・・・ポインタテーブル、41
・・マトリックステーブル。 第1図 (2題 第2図 第3図 連用1r柩のルールの 識別子
FIG. 1 is a block diagram showing an embodiment of the knowledge inference processing device according to the present invention, FIG. 2 is a diagram showing the configuration of a pointer table in the rule base memory in the embodiment shown in FIG. 1, and FIG. 1 is a diagram showing the configuration of Lulu in the rule base memory in the embodiment shown in FIG. 1, FIG. 4 is a diagram showing a matrix table in the rule network matrix memory in the embodiment shown in FIG. 1, and FIG. 1 is a flowchart used to explain the operation in the embodiment shown in FIG. 1... Rule base memory, 2... Rule network matrix memory, 3... Working memory,
4. Rule base control unit, 5. Inference processing unit, 6. External interface unit, 21. Pointer table, 41
...Matrix table. Figure 1 (2 problems, Figure 3, continuous use, 1r coffin rule identifier)

Claims (1)

【特許請求の範囲】 それぞれの条件を含む複数のルールを有する知識ベース
と、この知識ベースからルールを選択して、このルール
の条件が満たされるか否かを判断するという処理を順次
行うことにより一連の推論をなす推論処理部とを備える
知識推論処理装置において、 前記知識ベース内の各ルールの1つのルール毎に、該1
つのルールに引続いて選択の対象となる前記各ルールの
それぞれの選択指数を格納する格納手段と、 前記一連の推論が終了すると選択された条件を満たした
一連の各ルールのうち1つのルール毎に、該1つのルー
ルに引続いて選択の対象となる前記各ルールの選択指数
のうちの選択されたルールの選択指数を該選択されたル
ールの条件が満たされたか否かに基づいて更新する更新
手段と を備え、前記推論処理部は1つのルールに引続いて選択
の対象となる前記各ルールのそれぞれの選択指数を前記
格納手段から読出し、これらの選択指数に基づいて次の
ルールを選択することを特徴とする知識推論処理装置。
[Scope of Claims] A knowledge base having a plurality of rules including respective conditions, and a process of selecting a rule from this knowledge base and determining whether or not the conditions of this rule are satisfied are sequentially performed. In a knowledge inference processing device comprising an inference processing unit that makes a series of inferences, for each rule in the knowledge base, the one
a storage means for storing a selection index of each of said rules that are to be selected successively after said one rule; Then, the selection index of the selected rule among the selection indices of the rules to be selected subsequent to the one rule is updated based on whether or not the conditions of the selected rule are satisfied. updating means, the inference processing section reads out selection indices of each of the rules to be selected subsequent to one rule from the storage means, and selects the next rule based on these selection indices. A knowledge inference processing device characterized by:
JP2208740A 1990-08-07 1990-08-07 Knowledge inference processing device Pending JPH0495132A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2208740A JPH0495132A (en) 1990-08-07 1990-08-07 Knowledge inference processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2208740A JPH0495132A (en) 1990-08-07 1990-08-07 Knowledge inference processing device

Publications (1)

Publication Number Publication Date
JPH0495132A true JPH0495132A (en) 1992-03-27

Family

ID=16561299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2208740A Pending JPH0495132A (en) 1990-08-07 1990-08-07 Knowledge inference processing device

Country Status (1)

Country Link
JP (1) JPH0495132A (en)

Similar Documents

Publication Publication Date Title
JP2589777B2 (en) Knowledge system
JPH0675265B2 (en) Information retrieval method and system
CN109308191A (en) Branch prediction method and device
CN109033278A (en) Data processing method, device, electronic equipment and computer storage medium
JPH0495132A (en) Knowledge inference processing device
CN106250327B (en) One kind hot spot recognition methods and device in key-value storage
US20050055331A1 (en) Computer implemented method for retrieving data from a data storage system and according computer program product and data storage system
JPH0782486B2 (en) Non-linear optimization processing method and non-linear optimization processing device
JPS59194232A (en) Screen processing system of display device
JPH1153199A (en) Method and device for controlling hashing
JPH04318635A (en) Data controller
JPS63305460A (en) Document data processing system
US20110208782A1 (en) Method and computer program product for creating ordered data structure
JPH0588652A (en) Plant operation monitor and display device
JPH073664B2 (en) Cell data calculation method
JPH0358275A (en) Method for determining set of retrieved results
JPS61100853A (en) Data processing system
JPH0196728A (en) Alteration of data base table
JPS62165239A (en) Information retrieving method
JP2000090082A (en) Data processor
JPH04313160A (en) Key word control system
JPH01209526A (en) Record access system
JPH06266622A (en) Cache controller
JPH01237729A (en) Inference processor
JPH02126370A (en) Design procedure supporting device