JPS63229528A - Knowledge base processor - Google Patents

Knowledge base processor

Info

Publication number
JPS63229528A
JPS63229528A JP62062483A JP6248387A JPS63229528A JP S63229528 A JPS63229528 A JP S63229528A JP 62062483 A JP62062483 A JP 62062483A JP 6248387 A JP6248387 A JP 6248387A JP S63229528 A JPS63229528 A JP S63229528A
Authority
JP
Japan
Prior art keywords
knowledge
knowledge base
buffer
stored
horn
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.)
Granted
Application number
JP62062483A
Other languages
Japanese (ja)
Other versions
JPH0564808B2 (en
Inventor
Chiaki Sakama
坂間 千秋
Shigeki Shibayama
柴山 茂樹
Hiroshi Sakai
浩 酒井
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP62062483A priority Critical patent/JPS63229528A/en
Publication of JPS63229528A publication Critical patent/JPS63229528A/en
Publication of JPH0564808B2 publication Critical patent/JPH0564808B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To narrow a searching space and to increase the processing speed with a knowledge base processor by using a knowledge filter and a memory means and obtaining an answer out of a knowledge base via an arithmetic processing part and the knowledge filter with use of the horn nodes stored in the memory means. CONSTITUTION:A search tree of a knowledge base 4 is decided when a certain inquiry is received. Thus it is possible to previously choose such nodes that are possibly used in an inference process before execution of the deductive inference out of the base 4 when said inquiry is received. When the inquiry is received, a knowledge filter 1 extracts all horn nodes with which the higher and lower rank relations can be unified out of the base 4 based on the search tree of the base 4. These extracted nodes are stored in a primary memory part 5. An arithmetic processing part 6 chooses the desired nodes out of a small search space narrowed previously at the part 5 and carries on the arithmetic processing.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、PROLOGにおけるホーン節形式で表現さ
れた知識を処理する知識ベース処理装置に係わり、特に
演繹処理の高速化を図れるようにした知識ベース処理装
置に関する。
[Detailed Description of the Invention] [Objective of the Invention] (Industrial Field of Application) The present invention relates to a knowledge base processing device that processes knowledge expressed in the Horn clause format in PROLOG, and particularly to a knowledge base processing device that processes knowledge expressed in a horn clause format in PROLOG. The present invention relates to a knowledge base processing device that is capable of processing data.

(従来の技術) この種の知識ベース処理装置にあっては、知識はホーン
節(以下、単に「節」と呼ぶ)形式のルール、ファクト
で与えられ、これが知識ベースに格納される。そして、
ある問合わせが与えられたとき、PROLOGの持っ演
繹機構によって推論が杆われ、問合わせに対する解が得
られる。
(Prior Art) In this type of knowledge base processing device, knowledge is given in the form of rules and facts in the form of Horn clauses (hereinafter simply referred to as "clauses"), and these are stored in the knowledge base. and,
When a certain query is given, PROLOG's deductive mechanism makes inferences and obtains the solution to the query.

即ち、システムに入力される問合わせは、PROLOG
のゴール節で、 ?一連語名A(引数al、引数a2.・・・)、述語名
B(引数bl、引数b2.・・・)、・・・(1);−
述語名A(引数a1.引数a2.・・・)公° 、述語
名B(引数bt、引数b2.・・・)、・・・(2)く
ファクト〉 述語名C(引数cl、引数c2.・・・)、  ・・・
(3)の形式で与えられる。ここで、“述語名X(・・
・)”(X−A、B、C,・・・)を項と呼び、その中
でも特に、上記(2)、 (3)における“述語名C(
・・・)°の如く式の前に付加されるものを、その節の
ヘッド部、上記(1)、 (2)における“述語名A(
・・・)”、“述語名B(・・・)”の如く式の後ろに
付加されるものを、その節のボディ部と呼ぶ。
That is, the query entered into the system is PROLOG
At the goal section, ? Series word name A (argument al, argument a2...), predicate name B (argument bl, argument b2...), ... (1);-
Predicate name A (argument a1. argument a2...), predicate name B (argument bt, argument b2...), ... (2) fact> predicate name C (argument cl, argument c2) .・・・), ・・・
It is given in the form (3). Here, “predicate name
・)"(X-A, B, C,...) are called terms, and especially the "predicate name C(
...)°, which is added before the expression, is the head of the clause, and is the predicate name A( in (1) and (2) above.
What is added after the expression, such as "Predicate name B(...)", is called the body part of the clause.

従来は、ある問合わせが与えられたとき、システム内の
PROLOG処理系は、その問合わせを解くのに必要な
節を知識ベースから探索し、論理式の成立する経路を辿
って、最終的に問合わせに対する解を求めていた。
Conventionally, when a certain query is given, the PROLOG processing system in the system searches the knowledge base for the clauses necessary to solve the query, follows the path that makes the logical formula hold, and finally solves the query. I was looking for an answer to an inquiry.

しかし、一般に知識ベースの知識の量は大量である場合
が多く、知識の探索空間が非常に広いため、解を求める
までの時間がかかるという問題があった。このような問
題は、今後、更に知識ベースの知識量が増大すると、益
々顕著な問題となることは明らかである。
However, in general, the amount of knowledge in the knowledge base is often large, and the knowledge search space is very wide, so there is a problem that it takes time to find a solution. It is clear that such problems will become even more prominent in the future as the amount of knowledge in the knowledge base increases.

いという問題があった。There was a problem.

本発明は、このような事情を考慮してなされたもので、
その目的とするところは、知識ベースの知識量が大量で
あっても、高速に処理することが可能な知識ベース処理
装置を提供することにある。
The present invention was made in consideration of such circumstances, and
The purpose is to provide a knowledge base processing device that can process a large amount of knowledge in a knowledge base at high speed.

[発明の構成] (問題点を解決するための手段) 本発明は、ルール又はファクトをホーン節形式で表現し
た知識を格納した知識ベースと、問合わせに対し上記知
識ベースの知識を用いて演繹処理を行って前記問合わせ
に対する解を求める演繹処理部とを具備した知識ベース
処理装置において、前記問合わせの内容によって決定さ
れる前記知識ベースにおける探索木に基づいて、上位・
下位の関係が単一化可能なホーン節を前記知識ベースか
ら抽出する知識フィルタと、この知識フィルタで抽出さ
れたホーン節を記憶する記憶手段とを具備し、前記演繹
処理部は、前記知識フィルタを介して前記知識ベースか
ら前記記憶装置に格納されたホーン節を用いて演繹処理
を行うことを特徴としれた段階で決定されている。従っ
て、問合わせが与えられた段階で、演繹推論を行う前に
推論の過程で使う可能性のある節を知識ベースから予め
選択しておくことが可能とな・る。
[Structure of the Invention] (Means for Solving the Problems) The present invention includes a knowledge base that stores knowledge expressing rules or facts in a Horn clause format, and a method for deducing queries using the knowledge of the knowledge base. A knowledge base processing device comprising a deductive processing unit that performs processing to obtain a solution to the query, based on a search tree in the knowledge base determined by the content of the query,
A knowledge filter for extracting Horn clauses whose lower-order relationships can be unified from the knowledge base, and a storage means for storing the Horn clauses extracted by the knowledge filter, and the deduction processing unit The decision is made at a stage characterized in that a deductive process is performed from the knowledge base using the Horn clause stored in the storage device via the knowledge base. Therefore, at the stage when a query is given, it is possible to select in advance clauses that may be used in the inference process from the knowledge base before performing deductive inference.

・ 本発明では、問合わせが与えられると、知識フィル
タは、知識ベースにおける探索木に基づいて、上位・下
位の関係が単一化可能な全てのホーン節を知識ベースか
ら抽出する。抽出された節は記憶手段に格納される。演
繹処理部は、記憶手段において予め絞り込まれた狭い探
−索空間から必要な節を選択して処理を進めて行く。
- In the present invention, when a query is given, the knowledge filter extracts from the knowledge base all Horn clauses whose upper/lower relationships can be unified based on the search tree in the knowledge base. The extracted clauses are stored in the storage means. The deduction processing section selects a necessary node from a narrow search space narrowed down in advance in the storage means and proceeds with the process.

(実施例) 以下、図面に基づいて本発明の一実施例について説明す
る。
(Example) Hereinafter, an example of the present invention will be described based on the drawings.

第1図は一実施例に係る知識ベース処理装置の構成を示
すブロック図である。
FIG. 1 is a block diagram showing the configuration of a knowledge base processing device according to an embodiment.

知識フィルタ1は、入力された問合わせに対して、知識
ベースインデックス2に基づき、ディスク制御装置3を
介して二次記憶部である知識ベース4から必要な知識を
抽出し、これを−次記憶部5に出力する。演繹処理部6
は上記−次記憶部5即ち、問合わせは、セレクタ11の
一方の入力に与えられている。このセレクタ11の出力
は第1のバッファであるバッファ12に与えられ、セレ
クタ11の他方の入力には第2のバッファであるバッフ
ァ13の出力が導入されている。バッファ12の出力は
、重複検査部14に入力されており、ここで、レジスタ
15に登録された抽出済みの項と重複しないかどうかを
検査されたうえで、バッファ16に格納される。バッフ
ァ16の出力は、単一化検査部17に人力されている。
The knowledge filter 1 extracts necessary knowledge from the knowledge base 4, which is a secondary storage unit, via the disk control device 3 based on the knowledge base index 2 in response to the input inquiry, and stores it in the secondary storage. output to section 5. Deduction processing unit 6
is the above-mentioned -next storage section 5, that is, the inquiry is given to one input of the selector 11. The output of this selector 11 is given to a buffer 12 that is a first buffer, and the output of a buffer 13 that is a second buffer is introduced to the other input of the selector 11. The output of the buffer 12 is input to the duplication checking unit 14, where it is checked to see if it overlaps with the extracted terms registered in the register 15, and then stored in the buffer 16. The output of the buffer 16 is manually input to the unification inspection section 17.

この単一化検査部17には、知識ベース4からディスク
制御装置3を介してバッファ18に格納された節が与え
られており、ここで単一化(unil’1cation
 )検査が行われ、単一化可能なものが重複検査部19
に与えられている。この重複検査部19には、−次記憶
部5に格納されている節が与えられ、ここで−次記憶部
5に格納された節を再度−次記憶部5に格納しないよう
に検査がなされる。重複検査部19での検査をバスした
節は、−次記憶部5とバッファ13とに格納される。ま
た、この重複は、2つの重複検査部14.19及び単一
化検査部17から、その検査結果を入力し、この検査結
果に応じて次段へのデータの送出を制御するものpムっ
ている。
This unification checking unit 17 is provided with nodes stored in a buffer 18 from the knowledge base 4 via the disk control device 3, and here unification (unil'1cation) is provided.
) is inspected, and those that can be unified are sent to the duplicate inspection section 19.
is given to. This duplication checking unit 19 is given the clauses stored in the -next storage unit 5, and is checked to prevent the clauses stored in the -next storage unit 5 from being stored in the -next storage unit 5 again. Ru. The nodes that have been checked by the duplication checking section 19 are stored in the -order storage section 5 and the buffer 13. In addition, this duplication is checked by a p module that inputs the inspection results from the two duplication inspection sections 14 and 19 and the unification inspection section 17, and controls the sending of data to the next stage according to the inspection results. ing.

以上のように構成されたシステムの動作を第2図〜第4
図のフローチャートに基づき説明する。
The operation of the system configured as described above is shown in Figures 2 to 4.
This will be explained based on the flowchart shown in the figure.

先ず、(1)の形式の問合わせが入力されると(31)
、セレクタ11はこの問合わせを選択するとともに、そ
のボディ部の項を抽出して、バッファ12に書込む(3
2)。ここで、バッファ12の構造は、待ち行列(F 
I F O;  f’1rst 1nrlrst ou
t )になっている。
First, when an inquiry in the format (1) is input, (31)
, the selector 11 selects this query, extracts the term of its body part, and writes it to the buffer 12 (3
2). Here, the structure of the buffer 12 is a queue (F
I F O; f'1rst 1nrlrst ou
t).

次に重複検査部14においては、バッファ12から読み
出された項がレジスタ15における項と重複しないかど
うかが検査される(33)。即ち、レジスタ15には、
項はコード形式でハツシュテーブルに格納されていおり
、バッファ12から読み出された項がレジスタ15にお
ける項と重複しないかどうかは、このハツシュテーブル
を参照することによって確められる。
Next, the duplication checking unit 14 checks whether the term read from the buffer 12 overlaps with the term in the register 15 (33). That is, in register 15,
The terms are stored in a hash table in code form, and whether or not the term read from the buffer 12 overlaps with the term in the register 15 is checked by referring to this hash table.

バッファ12から読み出された項がレジスタ15におけ
る項と重複しないときには、重複検査部14は制御部2
1に対して1ビツトの信号°1゜を送り、重複するとき
には、“0”を送る。制御書込み命令を送らない(34
)。ここでバッファ16の構造はバッファ12と同様待
ち行列(F I FO)になっている。
When the term read from the buffer 12 does not overlap with the term in the register 15, the duplication check unit 14 controls the control unit 2.
A 1-bit signal °1° is sent for each 1, and when there is a duplicate, a 0 is sent. Do not send control write commands (34
). Here, the structure of the buffer 16 is a queue (F I FO) like the buffer 12.

なお初期状態においては、レジスタ15には何も格納さ
れていないので、重複は検出されず、信号は“1″であ
る。
Note that in the initial state, nothing is stored in the register 15, so no duplication is detected and the signal is "1".

バッファ12から読み出された最初の項に対して重複検
査が終わると、重複検査部14は、バッファ12から次
の項を呼出して再び重複検査を行う。この処理は、バッ
ファ12が空になるまで繰返される(36)。
When the duplication check is completed for the first term read from the buffer 12, the duplication check unit 14 calls the next term from the buffer 12 and performs the duplication check again. This process is repeated until the buffer 12 is empty (36).

次に制御部21においては、バッファ16に書込まれた
項と一致する述語名のヘッド部を持つ節を知識ベースイ
ンデックス2を使って知識ベース4から検索しく41)
、バッファ18へ書込む(42)。知識ベースインデッ
クス2には、述語名のコード及びその述語名をヘッド部
に持つ知識ベース4内の節のアドレスがハツシュテーブ
ルの形式で格納されており、知識ベース4内では同じ述
語名をヘッド部に持つ節はクラス化されて格納に蓄えら
れた項と単一化可能であるどうかを検査しく43)、単
一化可能であるときには、制御部21に対して1ビツト
の信号“11を送り、単一化可能でない時には“0”を
送る。制御部21は、信号が“1”の時には、単一化検
査部17に対して界、専検査部19への節の送出し命令
“5end“を送り(44,45) 、信号が“Omの
時には、節jlill”f””ン の送出し命令を送らない(44)。
Next, the control unit 21 uses the knowledge base index 2 to search the knowledge base 4 for a clause whose head part has a predicate name that matches the term written in the buffer 16 (41).
, and write to the buffer 18 (42). Knowledge base index 2 stores the code of a predicate name and the address of a node in knowledge base 4 that has that predicate name in its head in the form of a hash table. It is checked whether the clauses in the section can be unified with the terms classified and stored in the storage 43), and if they can be unified, a 1-bit signal "11" is sent to the control section 21. When the signal is “1”, the control unit 21 instructs the unification check unit 17 to send a field, and sends a clause to the special check unit 19 “. 5end" is sent (44, 45), and when the signal is "Om", the sending command of the clause "f"" is not sent (44).

バッファ18から読み出された最初の節に対して、単一
化検査が終わると、単一化検査部17はバッファ18か
ら次の節を呼出°して再び単一化検査を行う。この処理
は、バッファ18が空になるまで繰返される(46)。
When the unification check is completed for the first node read from the buffer 18, the unification check section 17 calls the next node from the buffer 18 and performs the unification check again. This process is repeated until buffer 18 is empty (46).

次に重1M検査部1つにおいては、単一化検査部17か
ら送出されて来た節が一次記憶部5における節と重複し
ないかどうかが検査される(51)。
Next, the one multiple 1M checking unit checks whether the node sent from the unification checking unit 17 overlaps with the node in the primary storage unit 5 (51).

即ち、−次記憶部5においては、節はコード形式でハツ
シュテーブルに格納されており、単一化検査部17から
送出されて来た節が一次記憶部5に重複検査部19は制
御部21に対して1ビツトの信号“1”を送り、重複す
るときは、“0“を送る。制御部21は信号が“1”の
ときには、重複−検査部19に対してバッファ13及び
−次記憶部5への節の書込み命令“Write”を送り
(52゜53)、信号が“0”の時には書込み命令は送
らない(52)。ここで、バッファ13の構造も待ち行
列(FIFO)になっている。
That is, in the -order storage section 5, the clauses are stored in a hash table in code format, and the clauses sent from the unification check section 17 are stored in the primary storage section 5, and the duplication check section 19 stores them in the control section. A 1-bit signal "1" is sent to the 21, and if there is a duplicate signal, a "0" is sent. When the signal is "1", the control section 21 sends a write command "Write" to the duplication checking section 19 to write a clause to the buffer 13 and the next storage section 5 (52°53), and the signal becomes "0". At this time, no write command is sent (52). Here, the structure of the buffer 13 is also a queue (FIFO).

なお、初期状態においては、−次記憶部5には何も記憶
されていないので、重複は検出されず、信号は“1”で
ある。
Note that in the initial state, nothing is stored in the -order storage unit 5, so no duplication is detected and the signal is "1".

単一化検査部17から送り出された最初の節に対して重
複検査が終わると、重複検査部19は単一化検査部17
から次の節を読み出して再び重複検査を行う。この処理
は単一化検査部17から節が送られて来なくなるまで繰
返される(54)。
When the duplication check is completed for the first clause sent out from the unification check unit 17, the duplication check unit 19 performs the unification check unit 17.
Read the next section from and perform the duplicate check again. This process is repeated until no clauses are sent from the unification checker 17 (54).

バッファ13に書込まれた節は、そのボディ部の項が読
み出され、セレクタ11を通してバッファ12に書込ま
れる。ここで、セレクタ11は問合わせまたはバッファ
13からの書込みを選択すて、知識ベース4から知識が
読み出されて一次記憶部5に書込まれたとき、その前の
サイクルにおける一次記憶部5から同等変化がない(新
たな書込みが行われなかった)とき、このサイクルは停
止し、知識ベース4からの知識の選択は終了する。
The body section of the clause written in the buffer 13 is read out and written into the buffer 12 through the selector 11. Here, the selector 11 selects inquiry or writing from the buffer 13, and when the knowledge is read from the knowledge base 4 and written to the primary storage section 5, When there are no equivalent changes (no new writes have been made), the cycle stops and the selection of knowledge from the knowledge base 4 ends.

従って、1サイクル毎に一次記憶部5の状態を検査する
必要がある。
Therefore, it is necessary to check the state of the primary storage section 5 every cycle.

L F P (1east Nxed point )
検査部2゛0は、この−次記憶部5の状態を検査する。
LFP (1east Nxed point)
The inspection section 2'0 inspects the state of this secondary storage section 5.

ここでは、1サイクルの終了後、−次記憶部5に対して
新たな書込みが行われたかどうかが検査され、書込みが
行われていれば“0°、そうでなければ1“、の信号を
重複検査部19に対して送り、次のサイクルを行うかど
うかを指示する。“1”の時には、知識ベース4から一
次記憶部5への選択が終了した旨を出力する(55)。
Here, after the end of one cycle, it is checked whether new writing has been performed on the -next storage unit 5, and if writing has been performed, a signal of "0°, otherwise 1" is output. The data is sent to the duplication checking section 19 to instruct whether or not to perform the next cycle. When it is "1", it outputs that the selection from the knowledge base 4 to the primary storage unit 5 has been completed (55).

一方“0”のときには、バッファ13内の節を読出しく
56) 、セレクタ11を介してバッファ12に書込み
、以後、同様な操作を繰返す。
On the other hand, when it is "0", the node in the buffer 13 is read out (56) and written into the buffer 12 via the selector 11, and the same operation is repeated thereafter.

ξi以上の動作をより具体的な例をもって説明すれ」f
1以下のようになる。即ち、例えば、知識べ一−、′ j’:t、i(、4及び知識ベースインデックス2が第
5図の状態であるとき、問合わせ、 ? −ancestor (taro、 A) 、 m
ale (A) 。
Please explain the operation above ξi with a more concrete example."f
It will be less than 1. That is, for example, when knowledge base index 2 is in the state shown in FIG. 5, query ?-ancestor (taro, A), m
ale (A).

、が与んられたときの具体的な動作が第6図〜第8図に
示されている。
, are shown in FIGS. 6 to 8.

第6図は最初の1サイクルを示している。FIG. 6 shows the first cycle.

先ず問合わせ“? −ancestor (taro、
 A) 。
First of all, please inquire “? -ancestor (taro,
A).

male (A) 、 ”から項″ancestor 
(taro、 A) −ANI” 、”fflale(
A)−MA”がバッファ12に書込まれ、重複検査部1
4でレジスタ15における項との重複が検査される。初
期状態においては、レジスタ15には、項は格納されて
いないので、検査の結果、レジスタ15.バッファ16
に項“ancestor (taro、 A )”、“
male(A)”が書込まれる。次に制御部21を通じ
て項“ancestor (Laro、  A) ” 
、  male(A)” と同じ述語名”ancest
or” 、  ”male’のヘッドを持つ節が知識ベ
ースインデックスを参照して知識ベースから検索され、
その結果、バッファ18に節■■■■■が書込まれる。
male (A), ``ancestor''
(taro, A) -ANI”, “fflale(
A)-MA” is written to the buffer 12, and the duplication check unit 1
4, the overlap with the term in register 15 is checked. In the initial state, no term is stored in register 15, so as a result of the check, register 15. Buffer 16
The term “ancestor (taro, A)”, “
"male (A)" is written. Next, the term "ancestor (Laro, A)" is written through the control unit 21.
, male(A)” and the same predicate name “ancest”
or”, the clause with the head “male” is searched from the knowledge base by referring to the knowledge base index,
As a result, the node ■■■■■ is written into the buffer 18.

このうち、項“ancestor(taro、 A) 
” 、  ”male(A) ”と単一化可能なヘッド
部を持つ節■■■■が単一化検査部17によって抽出さ
れ、重複検査部1つに送られる。初期状態においては、
−次記憶部5には節は格納されていないので、検査の結
果、−次記憶部5、バッファ13に節■■■■が書込ま
れる。このサイタルでは、−次記憶部5に対する節の書
込みが行われたので、LFP検査部20は次のサイクル
を行うように指示する。
Among these, the term “ancestor(taro, A)
, "male(A)" and a node with a head part that can be unified is extracted by the unification checker 17 and sent to one duplication checker.In the initial state,
Since no clause is stored in the -next storage unit 5, the clause ■■■■ is written in the -next storage unit 5 and buffer 13 as a result of the inspection. In this recital, since the clause has been written to the -next storage section 5, the LFP inspection section 20 instructs to perform the next cycle.

第7図は2回目の1サイクルを示している。FIG. 7 shows the second cycle.

先ず初期状態において、バッファ13には節■■■■が
格納されており、そのうち項“parent(X、Y)
−PAL’ 、”parent(X、Z)−PA2” 
−”ancestor(Z、Y)−AN2’がバッファ
12に書込まれる。重複検査部14で“parent 
(X、 Y)”が重複検査され、レジスター5に書込ま
れた後、”parent (X、  Z) ”が重複検
査されるが、“parent(X、Z)“は“pare
nt(X、 Y)”と重複するため、重複検査部14に
おいて除去される。最終的にはレジスター5、バッファ
16には、項”parent (X、 Y)”“anc
estor (Z 、 Y ) ’が書込まれる。次に
制御部21を通じて項“parent (X、  Y)
“。
First, in the initial state, the buffer 13 stores nodes ■■■■, among which the term “parent(X, Y)
-PAL', "parent(X,Z)-PA2"
-”ancestor (Z, Y)-AN2′ is written into the buffer 12. The duplication checking unit 14 writes “parent
(X, Y)” is checked for duplicates and written to register 5, “parent (X, Z)” is checked for duplicates, but “parent (X, Z)” is
nt(X, Y)", so it is removed in the duplication checking unit 14.Finally, the register 5 and buffer 16 contain the terms "parent (X, Y)" and "anc
estor (Z, Y)' is written. Next, the term “parent (X, Y)
“.

ancestor (Z 、  Y ) ’ と同じ述
語名“parent” 。
The predicate name "parent" is the same as ancestor (Z, Y)'.

“ancestor”のヘッド部を持つ節が、知識ベー
スインデックス2を参照して知識ベース4から検索され
、その結果、バッファ18に節■■■■■■:が書込ま
れる。ここでは、これらの節のヘッド部i1全て、項“
parent (X、 Y)”又は“ancestor
”pZ、Y)“と単一化可能なので、それらの節は全て
重複検査部14に送られる。ここで−次記憶部5には前
サイクルにおいて選択された節■■■■が格納されてい
るので、重複検査部19によって■■が除去され、■■
■■が一次記憶及びバッファ13に書込まれる。このサ
イクルにおいても一次記憶部5に対する節の書込みが行
われたので、LFP検査部20は次のサイクルを行うよ
うに指示する。
A clause having the head part of "ancestor" is retrieved from the knowledge base 4 with reference to the knowledge base index 2, and as a result, the clause ■■■■■■: is written in the buffer 18. Here, all head parts i1 of these clauses, the term “
parent (X, Y)” or “ancestor”
Since they can be unified as "pZ, Y)", all of those clauses are sent to the duplication checker 14. Here, since the -next storage unit 5 stores the clause ■■■■ selected in the previous cycle, the duplication check unit 19 removes ■■ and
■■ is written to the temporary storage and buffer 13. Since the clause has been written to the primary storage unit 5 in this cycle as well, the LFP inspection unit 20 instructs the next cycle to be performed.

第8図は3回目の1サイクルを示している。FIG. 8 shows the third cycle.

先ず、初期状態において、バッファ13には、節■■■
■が格納されており、そのうち項”father (X
、 Y) −F A”がバッファ12に書込まれる。重
複検査部14でfather (X、 Y) ’が検査
され、レジスタ15、バッファ16に項“f’atbe
r (X 、 Y )“が書込まれる。次に制御部21
を通して、項“f”ather(X、 Y)”と同じ述
語名” f’ather”のヘッド部を持つ節を知識ベ
ースインデックス2で参照するが、そのような節は知識
ベース4内に無いため、バッファ18に対する書込みは
行われない。従って、単一化検査部14、’L F P
検査部20は、このサイクルにおいて一次記憶部5に対
する書込みが行われなかったことを検出し、サイクルの
終了を指示する。
First, in the initial state, the buffer 13 contains nodes ■■■
■ is stored, among which the term “father (X
, Y) -F A" is written into the buffer 12. The duplication check unit 14 checks father (X, Y)', and the term "f'atbe
r (X, Y)" is written. Next, the control unit 21
, a clause with the same predicate name "f'ather" as the term "f'ather (X, Y)" is referenced in knowledge base index 2, but such a clause does not exist in knowledge base 4. , no writing is performed to the buffer 18. Therefore, the unification checker 14, 'L F P
The inspection unit 20 detects that writing to the primary storage unit 5 has not been performed in this cycle, and instructs the end of the cycle.

このような手順によって、問合わせ、 ? −ancestor (taro、 A) 、 l
1ale (A) 。
Inquiry, by such steps? -ancestor (taro, A), l
1ale (A).

に対し、二次記憶部である知識ベース4から節■■■■
■■■■が選択され、−次記憶部5に格納されプロセス
が終了する。
In contrast, the section from knowledge base 4 which is the secondary storage part■■■■
■■■■ is selected and stored in the -next storage unit 5, and the process ends.

以上のシステムにおいては、知識フィルタ1を他のプロ
セッサとは独立したプロセッサで制御することができる
ので、他のプロセッサとの並列化が可能である。
In the above system, since the knowledge filter 1 can be controlled by a processor independent of other processors, parallelization with other processors is possible.

また、上記実施例からも明らかなように、それぞれの構
成要素の間での相互依存性が少ないため、パイプライン
処理が可能となり、処理の高速化を実現できる。
Furthermore, as is clear from the above embodiments, since there is little interdependence between the respective constituent elements, pipeline processing is possible and speeding up of processing can be realized.

なお、知識ベースをルールとファクトとに分割して管理
しておけば、知識の選択における処理効率の向上化も図
れ、さらに処理の高速化を図ることができる。
Note that if the knowledge base is divided into rules and facts and managed, processing efficiency in knowledge selection can be improved, and processing speed can be further increased.

また、問合わせにおける項の数が多いときには、知識フ
ィルタを複数個用意しておくことによって知識の選択を
並列に行うことも考えられる。
Furthermore, when the number of terms in a query is large, it may be possible to select knowledge in parallel by preparing a plurality of knowledge filters.

1・ 要するに、本発明はその要旨を逸脱しない範囲で
種々変形して実施することができる。
1. In short, the present invention can be implemented with various modifications without departing from the gist thereof.

[発明の効果] 以上説明したように、本発明は、ある問合わせに対して
、以後の推論に使う可能性のある知識を知識ベースから
選択して記憶手段に転送する知識フィルタを用いている
ので、問合わせに対する推論を、知識ベースから選択さ
れた記憶手段内の知識を用いて行うことが可能となり、
従来の知識ベースから直接知識を抽出して推論処理を行
う方式に比べて知識の探索空間を絞り込むことができ、
その結果、問合わせに対する処理の高速化が図れる。
[Effects of the Invention] As explained above, the present invention uses a knowledge filter that selects knowledge that may be used for subsequent inference in response to a certain query from the knowledge base and transfers it to the storage means. Therefore, it is possible to make inferences regarding the query using the knowledge in the storage means selected from the knowledge base,
Compared to conventional methods that extract knowledge directly from a knowledge base and perform inference processing, it is possible to narrow down the knowledge search space.
As a result, it is possible to speed up the processing of inquiries.

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

第1図は本発明の一実施例に係る知識ベース処理装置の
構成を示すブロック図、第2図〜第4図は同装置の動作
を説明するための流れ図、第5図は同装置における知識
ベースインデックス及び知識ベースの具体的内容を示す
図、第6図〜第8図は同装置の動作を説明するためのタ
イミング図である。 )1・・・知識フィルタ、2・・・知識ベースインデッ
クI、“ 出願人 工業技術院長 飯塚 幸三 第2図 第3図 第4図 に 颯 会 よ
FIG. 1 is a block diagram showing the configuration of a knowledge base processing device according to an embodiment of the present invention, FIGS. 2 to 4 are flowcharts for explaining the operation of the device, and FIG. Figures showing specific contents of the base index and knowledge base, and Figures 6 to 8 are timing charts for explaining the operation of the device. ) 1...Knowledge filter, 2...Knowledge base index I, "Applicant Kozo Iizuka, Director General of the Agency of Industrial Science and Technology"

Claims (3)

【特許請求の範囲】[Claims] (1)ルール又はファクトをホーン節形式で表現した知
識を格納した知識ベースと、問合わせに対し上記知識ベ
ースの知識を用いて演繹処理を行って前記問合わせに対
する解を求める演繹処理部とを具備した知識ベース処理
装置において、 前記問合わせの内容によって決定される前記知識ベース
における探索木に基づいて、上位・下位の関係が単一化
可能なホーン節を前記知識ベースから抽出する知識フィ
ルタと、この知識フィルタで抽出されたホーン節を記憶
する記憶手段とを具備し、前記演繹処理部は、前記知識
フィルタを介して前記知識ベースから前記記憶装置に格
納されたホーン節を用いて演繹処理を行うことを特徴と
する知識ベース処理装置。
(1) A knowledge base that stores knowledge expressing rules or facts in a Horn clause format, and a deductive processing unit that performs deductive processing on an inquiry using the knowledge of the knowledge base to find a solution to the inquiry. The knowledge base processing device includes a knowledge filter that extracts Horn clauses whose upper and lower relationships can be unified from the knowledge base based on a search tree in the knowledge base determined by the content of the inquiry. , a storage means for storing the Horn clause extracted by the knowledge filter, and the deduction processing unit performs a deduction process using the Horn clause stored in the storage device from the knowledge base via the knowledge filter. A knowledge base processing device characterized by performing the following.
(2)前記知識フィルタは、前記知識ベースから同一の
ホーン節が抽出されるのを防止する重複検査部を備えた
ことを特徴とする特許請求の範囲第1項記載の知識ベー
ス処理装置。
(2) The knowledge base processing device according to claim 1, wherein the knowledge filter includes a duplication check unit that prevents the same horn clause from being extracted from the knowledge base.
(3)前記ホーン節は1又は複数の項から構成され、そ
の先頭の項をヘッド部、それに続く後半の項をボディ部
としたとき、前記知識フィルタは、前記問合わせ又は前
記知識ベースから抽出されたホーン節のボディ部の項を
格納する第1のバッファと、この第1のバッファに格納
された項と同一の述語名をヘッド部に持つとともに、上
記項と単一化可能なホーン節を前記知識ベースから抽出
する抽出手段と、この抽出手段で抽出されたホーン節の
ボディ部を格納し、これを第1のバッファに出力する第
2のバッファと、前記記憶手段に新たなホーン節が格納
されなくなった時点で選択終了信号を出力するLFP検
査部とを具備したものであることを特徴とする特許請求
の範囲第1項又は第2項記載の知識ベース処理装置。
(3) When the horn clause is composed of one or more terms, and the first term is the head part and the second half term is the body part, the knowledge filter extracts from the query or the knowledge base. A first buffer that stores terms in the body part of the horn clause that has been stored, and a horn clause that has the same predicate name as the term stored in this first buffer in the head part and can be unified with the above term. a second buffer for storing the body part of the horn clause extracted by the extracting means and outputting it to the first buffer; 3. The knowledge base processing device according to claim 1, further comprising: an LFP inspection unit that outputs a selection end signal when the selection end signal is no longer stored.
JP62062483A 1987-03-19 1987-03-19 Knowledge base processor Granted JPS63229528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62062483A JPS63229528A (en) 1987-03-19 1987-03-19 Knowledge base processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62062483A JPS63229528A (en) 1987-03-19 1987-03-19 Knowledge base processor

Publications (2)

Publication Number Publication Date
JPS63229528A true JPS63229528A (en) 1988-09-26
JPH0564808B2 JPH0564808B2 (en) 1993-09-16

Family

ID=13201471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62062483A Granted JPS63229528A (en) 1987-03-19 1987-03-19 Knowledge base processor

Country Status (1)

Country Link
JP (1) JPS63229528A (en)

Also Published As

Publication number Publication date
JPH0564808B2 (en) 1993-09-16

Similar Documents

Publication Publication Date Title
US4514826A (en) Relational algebra engine
WO2003017136A1 (en) Using associative memory to perform database operations
CN104484478B (en) A kind of association cluster data method for reducing body weight and system
WO2024078122A1 (en) Database table scanning method and apparatus, and device
US20230222126A1 (en) Inline data reduction
JPS63229528A (en) Knowledge base processor
US7162505B2 (en) Classification of data for insertion into a database
TW202336577A (en) Processing systems
JPS62165239A (en) Information retrieving method
JPH02116936A (en) Reorganizing system
JPH04160435A (en) Information storing method
JPH04137035A (en) Software design structure storage device
JPH03248237A (en) Data base management system constructing system
JPH01248233A (en) Data base retrieving device
JPH02151971A (en) Method for searching node of tree structure data
JPS63273937A (en) Name retrieval processing system using plural hash tables
JPH0773189A (en) Composite retrieving device
Su Cdllular § Logic'Devic Corj, ceptsaijdApplication
JPH04148373A (en) Data retrieving system
Novikov File mapping Rule-based DBMS and Natural Language Processing
Brooks The Rationale of a Standard Interchange Format
JPH01286041A (en) Knowledge base multiple control system
JPH033249B2 (en)
JPS61165146A (en) Dynamic changing and processing system of data item in record type data
JPH0296274A (en) Information retrieving device of multiplex index structure

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term