JPH02108127A - Inference control method for expert system - Google Patents

Inference control method for expert system

Info

Publication number
JPH02108127A
JPH02108127A JP63260766A JP26076688A JPH02108127A JP H02108127 A JPH02108127 A JP H02108127A JP 63260766 A JP63260766 A JP 63260766A JP 26076688 A JP26076688 A JP 26076688A JP H02108127 A JPH02108127 A JP H02108127A
Authority
JP
Japan
Prior art keywords
inference
base
rule
knowledge
execution
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
JP63260766A
Other languages
Japanese (ja)
Inventor
Satoru Fujita
悟 藤田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63260766A priority Critical patent/JPH02108127A/en
Publication of JPH02108127A publication Critical patent/JPH02108127A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To define and input a multiple knowledge base and to perform inference control at low cost by providing an execution table of simple structure which represents multiple knowledge and providing a processing part which interprets and executes the execution table. CONSTITUTION:The rule base 3-1, fact base 3-2, and function of the multiple knowledge base are divided and registered in the execution table 4, the registered function is executed, and inference processing is performed based upon the production rule of the multiple knowledge base corresponding to the rule base 3-1 and fact base 3-2. Namely, the execution table 4 is referred to by a multiple knowledge inference execution control part 5 and the multiple knowledge base corresponding to a subordinate problem is referred to the execution table 4, inputted, and executed by a production system 1. Consequently, the definition, input, and inference control and processing of the multiple knowledge base are performed efficiently at a high speed.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、計算機によるエキスパートシステムの推論
制御方法に係り、特に工程設計のような複雑な問題のた
めの多重知識ベースや大量のデータベースを取り扱う必
要のあるエキスパートシステムの推論制御方法に関する
[Detailed Description of the Invention] (Industrial Application Field) This invention relates to an inference control method for an expert system using a computer, and in particular deals with multiple knowledge bases and large amounts of databases for complex problems such as process design. Concerning necessary inference control methods for expert systems.

〔従来の技術〕[Conventional technology]

エキスパートシステムの知識表現とその推論方法に関し
ては大須賀節雄著「知識情報処理」(オーム社)、P2
3〜39に詳しく紹介されている。
Regarding the knowledge representation of expert systems and their inference methods, see Setsuo Osuka, "Knowledge Information Processing" (Ohmsha), p.2.
3 to 39 are introduced in detail.

一般にエキスパートシステムの開発ツールはプロダクシ
ョンシステムやフレームシステムなどを基本に構築され
ているものが多い。
In general, many expert system development tools are built based on production systems, frame systems, etc.

第5図はプロダクションシステムを用いた従来の推論f
制御方法を説明する図である。図中(!) はプロダク
ション記憶部(1o)、及び作業記憶部(11)とから
なる知識ベースであり、プロダクション記憶部(10)
は「もしく条件部)ならば(行動部/結論部)」のプロ
ダクションルール形式で表現した知識を格納する。
Figure 5 shows the conventional inference f using a production system.
It is a figure explaining a control method. In the figure (!) is a knowledge base consisting of a production storage unit (1o) and a working storage unit (11), and a production storage unit (10).
stores knowledge expressed in the production rule format of "if condition part) then (action part/conclusion part)".

“01”〜“C5“は条件節であり、“&”は条件部の
AND結合を示している。また“A1”〜“A5″は行
動節である。
"01" to "C5" are conditional clauses, and "&" indicates an AND combination of the conditional parts. Moreover, "A1" to "A5" are action nodes.

さらに(11)は問題の既知の事実である事実ベースを
格納する作業記憶部を示す。本例の場合には“C1”0
3″、”C5″が事実になっている。(12)はパター
ン照合部で、複数の条件節から構成される条件部が作業
記憶部(11)内の事実により成立するか否かを調べる
。(13)は競合ルールセットで、パターン照合の結果
、求められた複数のプロダクションルールから構成され
ている。
Further, (11) indicates a working memory section that stores a fact base, which is the known facts of the problem. In this example, “C1”0
3'' and "C5" are facts. (12) is a pattern matching unit that checks whether the conditional part consisting of multiple conditional clauses is satisfied by the facts in the working memory unit (11). (13) is a competitive rule set, which is composed of a plurality of production rules obtained as a result of pattern matching.

(14)は競合解消アルゴリズムにより競合ルールセッ
ト(13)の中からただ1つのルールを選択するための
競合ルール解消部である。さらに(15)は競合ルール
解消部(14)により決定されたプロダクションルール
の(行動部/結論部)を実行する実行部である。
(14) is a conflict rule resolution unit for selecting only one rule from the conflict rule set (13) using a conflict resolution algorithm. Furthermore, (15) is an execution unit that executes (action part/conclusion part) of the production rule determined by the conflict rule resolution part (14).

一般にプロダクションシステムによる推論制御方法は、
プロダクション記憶部(10)にあるルールに対して、
先頭から順番に以下に示す認知−行動サイクルを繰り返
すことにより知識の処理を行う。
In general, the inference control method using a production system is
For the rules in the production storage (10),
Knowledge is processed by repeating the cognitive-behavior cycle shown below in order from the beginning.

まず、ステップ1においては、プロダクション記憶部(
lO)内のルールベースにおけるルールの条件部を作業
記憶部(11)内の事実ベースとパターン照合部(12
)により照合処理する[■■]。そして上記プロダクシ
ョン記憶部(10)内の条件部が成立するプロダクショ
ンルールを取り出す[■]。パターン照合部(12)の
照合処理では、複数のプロダクションルールが成立する
場合が考えられ、これらプロダクションルールの集合を
、コンフリクトセット(競合ルールセット)と呼ぶ。
First, in step 1, the production storage (
The condition part of the rule in the rule base in the working memory unit (11) and the pattern matching unit (12
) to perform verification processing [■■]. Then, a production rule that satisfies the condition part in the production storage section (10) is retrieved [■]. In the matching process of the pattern matching unit (12), a plurality of production rules may be established, and a set of these production rules is called a conflict set.

次にステップ2において上記ステップ1で求めた競合ル
ールセットの中から、例えば最初にパターン照合に成功
したルール等のアルゴリズムを用いて1つのルールを競
合ルール解消部(14)にて選択する。この処理を競合
解消(ConflictResolution)と呼ぶ
[■■]。この結果、上記従来方法の場合C3−>A 
2のルールが選ばれる。
Next, in step 2, a conflict rule resolution unit (14) selects one rule from among the conflict rule sets obtained in step 1 using an algorithm such as the rule that first succeeded in pattern matching. This process is called conflict resolution [■■]. As a result, in the case of the above conventional method, C3->A
Rule 2 is selected.

ここまでの処理は、認知サイクルと呼ばれる。The processing up to this point is called the cognitive cycle.

さらに、ステップ3において、上記ステップ2の認知サ
イクルによって選択されたルールの行動部、つまりA2
が実行される[■]。これが行動サイクルであり、この
実行後は再びステップ1へ戻る。
Furthermore, in step 3, the action part of the rule selected by the cognitive cycle of step 2, that is, A2
is executed [■]. This is an action cycle, and after this execution returns to step 1 again.

この結果、事実ベースが更新されるため、次の認知サイ
クルでは別のルールが選択されることになる。その後照
合出来るルールがなくなるまで、即ち新たな事実が導出
できなくなるまで認知−行動サイクルを繰り返す。
This updates the fact base so that a different rule is chosen for the next cognitive cycle. Thereafter, the cognition-behavior cycle is repeated until there are no more rules to match, that is, until no new facts can be derived.

(発明が解決しようとする課題) 従来のプロダクションシステムによる推論制御方法は以
上のように構成されていたので、問題解決のための知識
がプロダクションルール形式のルールベースと既知の事
実である事実ベースとで表現され、これらのルールベー
スと事実ベースとは各々1つづつのプロダクション記憶
部と作業記憶部に格納されて処理されるためにルールや
事実の数が多くなり、パターン照合の処理時間が条件部
の条件筒数と条件節中の変数及び作業記憶部中の事実の
数に依存し、組み合わせ的に増大するという課題があっ
た。
(Problem to be solved by the invention) Since the conventional inference control method using a production system is configured as described above, the knowledge for problem solving is divided into a rule base in the form of production rules and a fact base in the form of known facts. Since these rule bases and fact bases are stored and processed in one production memory and one working memory, the number of rules and facts becomes large, and the processing time for pattern matching becomes longer than the condition part. The problem was that the number of conditionals increases in combination, depending on the number of conditionals, the variables in the conditional clause, and the number of facts in the working memory.

また工程設計の場合には、工作機械と加工プロセスの選
定、取り付は基準の決定、作業順序の決定等複数の異な
る性質の知識からなる副問題から知識ベースが構成され
ており、このような複雑な問題に対しては性質の異なる
多重知識ベースを処理することが要求され、従来のプロ
ダクションシステムを用いた推論方法では、1つの知識
ベースですべての副問題の知識を混在させて表現してい
たため、知識の管理が困難で副問題ごとの推論制御が出
来ないという課題もあった。
In addition, in the case of process design, the knowledge base is composed of sub-problems consisting of knowledge of multiple different characteristics, such as selection of machine tools and machining processes, determination of standards for installation, and determination of work order. Complex problems require processing of multiple knowledge bases with different properties, and conventional inference methods using production systems express the knowledge of all sub-problems in a single knowledge base. Therefore, it was difficult to manage knowledge and it was not possible to control reasoning for each subproblem.

副問題ごとの多重知識を表現し、処理できる方法として
、音声理解問題を解決するためにアメリカのカーネギメ
ロン大学で開発されたHEAR5AY−11システムに
おける“黒板モデル”がある(前述の文献、P30〜3
3)。
As a method that can express and process multiple knowledge for each sub-problem, there is a "blackboard model" in the HEAR5AY-11 system developed at Carnegie Mellon University in the United States to solve speech understanding problems (see the above-mentioned document, p. 30~). 3
3).

HEAIISAY−IIシステムは、音声による発話理
解システムであり、センサによる検出、音素の切りだし
、語の理解、語の認識及び文の理解などから構成される
副問題に知識を切り分け、知識情報処理を行う。
The HEAIISAY-II system is an audio-based speech understanding system that separates knowledge into sub-problems consisting of sensor detection, phoneme segmentation, word understanding, word recognition, sentence understanding, etc., and performs knowledge information processing. conduct.

問題ごとの知識は、知識源で定義され、黒板と呼ばれる
共通の作業領域を介して協調的に働くように制御される
6個々の知識源は、プロダクションシステムとして構成
されている。
Knowledge for each problem is defined in knowledge sources, and the six individual knowledge sources are configured as a production system, which is controlled to work cooperatively through a common work area called the blackboard.

このシステムでは、前向き推論も、他の知識源により生
成された仮設に基づく後向き推論も可能である。黒板の
状況を監視しながらどのレベルの処理を最も優先すべき
かを判断して、知識源の起動計画を行なう、  HEA
R5AY−Ifでは、この部分は人の認知能力や思考方
法を参考にしているといわれているが、このような方式
のシステムでは制御内容とは別に、制御機構の実現方式
に関する問題がある。すなわち方式そのものがまだ確立
されているわけではなく、またその利用を考えると、音
声理解に依存しているため他の問題への応用が困難であ
るという課題を有している。
The system allows forward reasoning as well as backward reasoning based on hypotheses generated by other knowledge sources. HEA monitors the status of the blackboard, determines which level of processing should be prioritized, and plans the activation of knowledge sources.
In R5AY-If, this part is said to be based on human cognitive abilities and thinking methods, but in systems of this type, apart from the control content, there are problems related to the implementation method of the control mechanism. In other words, the method itself has not yet been established, and considering its use, it relies on speech understanding, making it difficult to apply to other problems.

さらにプロダクションシステムを基本としているため、
副問題単位でルールベースや事実ベースの数が増えると
、推論時間が増大するという前述した課題は解消されて
いない。
Furthermore, since it is based on a production system,
The problem mentioned above that inference time increases as the number of rule bases and fact bases increases for each subproblem remains unresolved.

さらに )IEAR5AY−IIから派生したエキバー
トシステム構築ツールとして、 ARTやESHELL
などのシステムがある。しかしいずれのシステムもHE
AR5AY −IIシステムをベースにしているため、
同様の欠点を持ち、しかも応用上高価であることと、制
御機構を問題向きに修正出来ない等の課題があった。
Furthermore, ART and ESHELL are used as executable system construction tools derived from IEAR5AY-II.
There are systems such as However, both systems are HE
Because it is based on the AR5AY-II system,
It has the same drawbacks, and in addition, it is expensive in terms of application, and the control mechanism cannot be modified to suit the problem.

この発明は上記課題を解決するためになされたもので、
多重知識ベースの定義、入力、推論制御・処理を効率よ
く高速に行なうことができるエキスパートシステムの推
論制御方法を得ることを目的とする。
This invention was made to solve the above problems,
The purpose of this study is to obtain an expert system inference control method that can efficiently and quickly define, input, and inference control/process multiple knowledge bases.

〔課題を解決するための手段〕[Means to solve the problem]

この発明に係るエキスパートシステムの推論制御方法は
、多重知識ベースのルールベース、事実ベース及び関数
を分割して実行テーブルに登録し、この登録された関数
を実行すると共に、ルールベース・事実ベースに対応す
る多重知識ベースのプロダクションルールに基づき推論
処理するものである。
The inference control method for an expert system according to the present invention divides the rule base, fact base, and function of multiple knowledge bases and registers them in an execution table, executes the registered functions, and supports the rule base and fact base. Inference processing is performed based on production rules based on multiple knowledge bases.

〔作用〕[Effect]

この発明における実行テーブルは、多重知識推論実行制
御部により参照され、副問題に対応した多重知識ベース
が、この実行テーブルを参照して入力され、プロダクシ
ョンシステムにより実行される。
The execution table in this invention is referred to by the multiple knowledge inference execution control unit, and the multiple knowledge base corresponding to the sub-problem is input with reference to this execution table and executed by the production system.

〔実施例〕〔Example〕

以下、この発明の一実施例を第1図ないし第3図に基づ
いて説明する。この第1図は本実施例推論制御方法の動
作フローチャート、第2図は本実施例推論制御方法を実
行するシステム構成図、第3図は実行テーブルの格納態
様図を示す。上記各図において本実施例に係るエキスパ
ートシステムの推論制御方法は、知識ベース(3)に格
納された複数の副問題についての方式データ、上記複数
の副問題に関する知識ベース及び該知識ベースの推論処
理前後で実行される推論前後の関数を実行テーブル(4
) に登録する第1の過程(ステップ1)と、この第1
の過程(ステップ1)で実行テーブル(4)に登録され
た推論前の関数(Init−func) (以下、初期
化関数)を実行制御部(5)にて実行し、上記登録され
た知識ベースのルールベース及び事実ベースを用いてプ
ロダクションシステム(1)で推論処理し、該推論処理
後に上記登録された推論後の関数(End−func)
 (以下、終了関数)を上記実行制御部(5)にて実行
する第2の過程(ステップ2)とを備えるものである。
An embodiment of the present invention will be described below with reference to FIGS. 1 to 3. FIG. 1 shows an operation flowchart of the inference control method of this embodiment, FIG. 2 shows a system configuration diagram for executing the inference control method of this embodiment, and FIG. 3 shows a storage state of an execution table. In each of the above figures, the inference control method of the expert system according to the present embodiment includes method data for a plurality of sub-problems stored in a knowledge base (3), a knowledge base for the plurality of sub-problems, and an inference process for the knowledge base. The functions before and after the inference that are executed before and after the execution table (4
) The first process (step 1) of registering in
The pre-inference function (Init-func) (hereinafter referred to as initialization function) registered in the execution table (4) in the process (step 1) is executed by the execution control unit (5), and the registered knowledge base is The production system (1) performs inference processing using the rule base and fact base, and after the inference processing, the above registered post-inference function (End-func)
(hereinafter referred to as a termination function) by the execution control unit (5).

上記プロダクションシステム(1)は、実行テーブル(
4)に登録された知識ベースのルールベース(プロダク
ションルールの集合)を格納するプロダクション記憶部
(1=1)と、上記登録された知識ベースの事実ベース
を格納する作業記憶部(1−2)と、上記各記憶部(1
−1)、(1−2)のプロダクションルール及び事実ベ
ースに基づき推論処理する推論機構 (1−3)とを備
える構成である。
The above production system (1) has an execution table (
4) A production storage unit (1=1) that stores the rule base (set of production rules) of the knowledge base registered in 4), and a working storage unit (1-2) that stores the fact base of the registered knowledge base. and each of the above storage units (1
-1), (1-2) and an inference mechanism (1-3) that performs inference processing based on the fact base.

上記知識ベース部(3)は、推論対象である問題を構成
する副問題毎に対応して用意されるルールベースを格納
するルールベース記憶部(3−1)と、上記副問題毎に
対応して用意される事実ベースを格納する事実ベース部
 (3−2)とを備える構成である。
The knowledge base unit (3) includes a rule base storage unit (3-1) that stores a rule base prepared corresponding to each sub-problem constituting the problem to be inferred, and a rule base storage unit (3-1) that stores a rule base prepared corresponding to each sub-problem constituting the problem to be inferred. This configuration includes a fact base unit (3-2) that stores a fact base prepared by the user.

上記実行テーブル(4)は、上記知識ベース(3)に格
納された知識ベースのうち推論処理の対象となるルール
ベースの名称及び事実ベースの名称を登録し、上記推論
処理の開始前に表示すべき情報があれば、そのメツセー
ジ塩及び推論機構の前向き又は後向きの推論機構タイプ
を登録し、上記推論処理の前後に実行すべき初期化関数
、終了関数を登録する。また上記実行テーブル(4) 
は、テーブルの最終位置に2つの要素(ENJPROC
ESSマーカ及び最後に実行すべきLISP関数名)を
最終エントリとして登録する。
The execution table (4) registers the name of the rule base and the name of the fact base that are the targets of inference processing among the knowledge bases stored in the knowledge base (3), and is displayed before the start of the inference processing. If there is any information, the message salt and the forward or backward inference mechanism type of the inference mechanism are registered, and the initialization functions and termination functions to be executed before and after the above inference processing are registered. Also, the above execution table (4)
puts two elements (ENJPROC) in the final position of the table
ESS marker and the name of the LISP function to be executed last) are registered as the final entry.

上記実行制御部(5)は、実行テーブル(4)への各種
登録を制御し、該実行テーブル(4)に登録された推論
前後の関数を処理し、上記プロダクションシステム(1
)に対するロード・ストア、起動を指令制御する。
The execution control unit (5) controls various registrations in the execution table (4), processes functions before and after inference registered in the execution table (4), and processes functions before and after inference registered in the execution table (4).
) commands and controls loading, storing, and starting.

次に、上記構成に基づく本実施例に係るエキスパートシ
ステムの推論制御方法の動作を説明する。
Next, the operation of the inference control method for an expert system according to this embodiment based on the above configuration will be explained.

まず、ステップ1において実行制御部(5)が実行テー
ブル(4)に各種事項を登録する。
First, in step 1, the execution control unit (5) registers various items in the execution table (4).

この実行テーブル(4)は、第3図に示すような構造を
持っている。すなわち、実行テーブル(4)には知識ベ
ース部(3)に格納された複数の副問題に対応する複数
の登録が含まれている。なお、第3図に示した例では実
行テーブル(4)への登録順序が推論実行の順序に対応
しているものとしている。この登録は、以下の3つの要
素と最終エントリとから構成される。この3つの要素は
、第1にメツセージと推論タイプ、第2に知識ベース、
第3に推論前後の関数である。
This execution table (4) has a structure as shown in FIG. That is, the execution table (4) includes a plurality of registrations corresponding to the plurality of sub-problems stored in the knowledge base section (3). In the example shown in FIG. 3, it is assumed that the order of registration in the execution table (4) corresponds to the order of inference execution. This registration consists of the following three elements and a final entry. These three elements are: first, the message and inference type; second, the knowledge base;
Thirdly, there are functions before and after inference.

まず、第1の要素のメツセージと推論タイプの登録に関
しては、推論開始前に表示すべき情報があればそのメツ
セージ塩を登録し、またこの登録に対応して定義した知
識ベースの推論機構のタイプを登録する。
First, regarding the registration of the first element, the message and inference type, if there is information that should be displayed before inference starts, the message salt is registered, and the type of knowledge-based inference mechanism defined corresponding to this registration. Register.

なお上記推論機構のタイプには、前向き推論、後向き推
論および推論処理なしがある。
Note that the types of the above inference mechanism include forward inference, backward inference, and no inference processing.

上記第2の要素の知識ベースの登録に関しては、推論処
理の対象となるルールベース名称と事実ベース名称とを
登録する。
Regarding the registration of the knowledge base of the second element, the rule base name and fact base name to be subjected to inference processing are registered.

上記第3の要素の推論前後での処理の登録に関しては、
推論処理の前後で実行すべきLISP関数があれば、そ
の関数名を登録する。
Regarding the registration of processing before and after inference of the third element above,
If there is a LISP function to be executed before or after inference processing, register the function name.

なお最終エントリは、テーブルの最終位置におかれ2つ
の要素からなっている。1つは、(END−PROCE
SS)というマーカであり、もう1つは、最後に実行す
べきLISP関数名である。
Note that the final entry is placed at the final position of the table and consists of two elements. One is (END-PROCE
SS), and the other is the name of the LISP function to be executed last.

次にステップ2において多重知識ベースへの推論制御動
作が以下の通り実行される。基本的には、多重知識間の
推論実行制御は、第2図に示す実行制御部(5)が実行
テーブル(4)の登録を先頭から順番に解釈して実行す
ることにより実現される。個々の知識ベースの推論処理
は、プロダクションシステム(1)に起動をかけること
により処理される。
Next, in step 2, inference control operations for multiple knowledge bases are performed as follows. Basically, inference execution control between multiple knowledge is realized by the execution control unit (5) shown in FIG. 2 interpreting and executing the entries in the execution table (4) in order from the beginning. Inference processing for each knowledge base is performed by activating the production system (1).

まず、実行制御部(5)が実行テーブル(4)の登録事
項を読出す(ステップ2−1) 、この読出した登録事
項が最終エントリか否を実行制御部(5ン で判断しく
ステップ2−2)、最終エントリと判断した場合には実
行制御部(5)が終了関数を実行して多重知識ベースの
推論処理を終了する(ステップ2−8)。
First, the execution control unit (5) reads the registered items from the execution table (4) (step 2-1).The execution control unit (5) determines whether the read registered item is the final entry or not. 2) If it is determined that the entry is the final entry, the execution control unit (5) executes the termination function to terminate the multiple knowledge base inference process (step 2-8).

他方、ステップ2−2において最終エントリでないと判
断された場合には、最新エントリから前記3つの要素(
メツセージと推論タイプ、知識ベース、関数)を実行制
御部(5)が実行テーブル(4)から取出す(ステップ
2−3)。この取出した要素中にメツセージ(第3図中
のメツセージ1.2・・・を参照)が含まれていれば、
メツセージ出力を実行して表示する。また、推論前に実
行すべき初期化関数(第3図中のIn1t−func 
1.2・・・を参照)があれば実行制御部(5)が実行
する(ステップ2−4)。
On the other hand, if it is determined in step 2-2 that it is not the final entry, the three elements (
The execution control unit (5) takes out the message, inference type, knowledge base, function) from the execution table (4) (step 2-3). If this extracted element contains a message (see message 1.2... in Figure 3),
Execute and display message output. In addition, the initialization function (In1t-func in Figure 3) that should be executed before inference is
1.2...), the execution control unit (5) executes it (step 2-4).

さらに、ステップ2−5において実行制御部(5)が実
行テーブル(4) を参照し、この実行テーブル(5)
に登録された最新エントリで指定される知識ベースの事
実ベース(第3図中のWM−name 1.2・・・を
参照)とルールベース(第3図中のPトname 1.
2・・・を参照)を知識ベース部(3)から読出してプ
ロダクションシステム(1)のプロダクション記憶部(
1−1)にロード・ストアする。この事実ベースのロー
ド・ストアは作業記憶部(1−2)中に中間状態として
格納され、また後述する推論機構(1−3)の推論結果
を中間結果として格納する。このステップ2−5の処理
は既にプロダクション記憶部(1−1)にプロダクショ
ンルールが格納され、このプロダクションルールを使用
して推論を行なう場合には実行されず、次のステップ2
−6が直接実行される。
Furthermore, in step 2-5, the execution control unit (5) refers to the execution table (4), and this execution table (5)
The fact base (see WM-name 1.2... in Figure 3) and the rule base (P name 1. in Figure 3) of the knowledge base specified by the latest entry registered in .
2...) from the knowledge base section (3) and stores it in the production storage section (1) of the production system (1).
1-1). This fact-based load store is stored as an intermediate state in the working memory (1-2), and also stores the inference result of the inference mechanism (1-3), which will be described later, as an intermediate result. The process of step 2-5 is not executed when the production rule is already stored in the production storage unit (1-1) and inference is performed using this production rule, and the process of step 2-5 is not executed.
-6 is executed directly.

上記プロダクション記憶部(1−1)にプロダクション
ルールを格納した後、実行制御部(5)からプロダクシ
ョンシステム(1)に対して推論実行の起動がかけられ
る(ステップ2−6)。上記実行制御部(5)は、上記
実行テーブル(4)に登録された推論タイプ(第3図中
のRタイプ1.2・・・を参照)に基づき前向き推論又
は後向き推論が判断され、いずれかの起動をかけること
になる。なお、上記推論タイプにおいて推論指定がない
場合には推論処理を行うことなく次のステップへ進む。
After storing the production rule in the production storage section (1-1), the execution control section (5) activates the production system (1) for inference execution (step 2-6). The execution control unit (5) determines forward inference or backward inference based on the inference type registered in the execution table (4) (see R type 1.2... in Fig. 3), and determines whether the inference is forward or backward inference. You will have to start something like that. Note that if there is no inference designation in the above inference type, the process proceeds to the next step without performing inference processing.

上記起動指令を受けたプロダクションシステム(1)は
、推論機構(1−3)の前向き又は後向きの推論機構(
1−31)、(1−32)のいずれかが推論動作を実行
する(ステップ2−7)。
The production system (1) that has received the activation command starts the forward or backward reasoning mechanism (1-3) of the reasoning mechanism (1-3).
1-31) or (1-32) executes the inference operation (step 2-7).

さらに、上記プロダクションシステム(1)の推論実行
後は、ステップ2−2に戻り、ステップ2−2の判断後
に実行制御部(5)が終了関数を実行し終了する(ステ
ップ2−8)。
Further, after the production system (1) executes the inference, the process returns to step 2-2, and after the determination in step 2-2, the execution control unit (5) executes the termination function and ends (step 2-8).

さらに、推論処理方式を工程設計に適用した場合につい
て詳述する。この工程設計では、加工プロセスや加工機
械の選択、加工基準面の決定、取付は計画の決定、そし
て加工手順の決定等、異なる知識から成る副問題の処理
が必要である。
Furthermore, a case in which the inference processing method is applied to process design will be described in detail. In this process design, it is necessary to handle sub-problems consisting of different knowledge, such as selection of machining processes and machining machines, determination of machining reference planes, determination of mounting plans, and determination of machining procedures.

これらの副問題は、前述した実行テーブル(4)に登録
することにより知識処理することが出来るが、副問題の
処理が失敗した場合、副問題間にまたがるグローバルな
バックトラック処理が必要となる。例えば、工作機i4
Aが1つの候補として求まり、後の加工手順の決定問題
では、工作機械Aでは矛盾が生じることが判明した場合
を想定する。
These sub-problems can be knowledge-processed by registering them in the above-described execution table (4), but if the processing of the sub-problems fails, global backtrack processing across the sub-problems is required. For example, machine tool i4
Assume that A is determined as one candidate, and it is found that there will be a contradiction in machine tool A in the subsequent machining procedure determination problem.

この場合この発明による方法では、実行テーブル(4)
に登録した推論実行後に起動される関数により、加工機
械の選択問題へ戻り推論を再開することが出来る。
In this case, in the method according to the invention, the execution table (4)
By using the function that is activated after the inference is registered in , it is possible to return to the processing machine selection problem and restart the inference.

このように、この発明で設けられる実行テーブル(4)
 は、副問題の多重知識を制御するメタ知識テアリ、こ
れにより副問題間にまたがるグローバル・バックトラッ
クが可能となる。
In this way, the execution table (4) provided in this invention
is a meta-knowledge archive that controls multiple knowledge of sub-problems, which enables global backtracking across sub-problems.

次に第4図に示すプロダクションルール例を用いて、第
2図に示すフレームシステム(2)を動作させる場合に
ついて説明する。
Next, a case will be described in which the frame system (2) shown in FIG. 2 is operated using the production rule example shown in FIG. 4.

前述したように、プロダクションシステム(1)では知
識ベースのルールベースや事実ベースの数が増大すると
推論時間が組み合わせ的に増大する。そこでこの推論時
間の短縮をはかるために、フレームアクセス関数機構部
(2−2)が設けられている。
As described above, in the production system (1), as the number of rule bases and fact bases in the knowledge base increases, the inference time increases combinatorially. Therefore, in order to reduce this inference time, a frame access function mechanism section (2-2) is provided.

このフレームシステム(2)においては、連想リスト形
式で処理対象のアトムやリストを記憶している。このた
めある変数をプロダクションシステム(1)により作業
記憶部(1−2)の事実ベースから、パターン照合によ
り求めるよりは、フレームシステム(2)により求める
ほうが高速に処理できる。
In this frame system (2), atoms and lists to be processed are stored in an associative list format. For this reason, it is possible to process a certain variable faster by using the frame system (2) than by using the production system (1) to obtain a variable from the fact base in the working memory (1-2) by pattern matching.

上記プロダクション記憶部(1−1)に格納されるプロ
ダクションルールの条件部は、複数の条件節から成る。
The condition part of the production rule stored in the production storage unit (1-1) consists of a plurality of conditional clauses.

認知サイクルのパターン照合処理では、最初の条件節で
変数の値を束縛し、次の条件節でその変数の属性値を求
めることが多い。その変数の属性値がデータベースに存
在していれば、直tlフレームシステム(2)へ条件部
からアクセスするほうがパターン照合の回数を減少させ
ることが出来、またパターン照合の対象となる作業記憶
部(1−2)内の事実の数をも減少させることが出来る
In the pattern matching process of the cognitive cycle, the value of a variable is often bound in the first conditional clause, and the attribute value of that variable is often determined in the next conditional clause. If the attribute value of the variable exists in the database, accessing the direct tl frame system (2) from the condition section can reduce the number of pattern matching operations, and the working memory section ( The number of facts in 1-2) can also be reduced.

その結果、プロダクションシステム(1)だけで構成さ
れたシステムに比べ、飛躍的に推論処理時間を短縮する
ことが可能となる。
As a result, it becomes possible to dramatically shorten the inference processing time compared to a system configured only with the production system (1).

次に第4図に示す工作機械の選択の知識を示すルールを
用いて具体例を説明する。
Next, a specific example will be explained using the rules showing knowledge of machine tool selection shown in FIG.

第1条件節では、事実ベースから加工対象ワーク名をパ
ターン照合により引き出している。
In the first conditional clause, the name of the workpiece to be processed is extracted from the fact base by pattern matching.

第2条件節では、第2図のフレームアクセス関数機構部
(2−2)を用い、生産用データベースから工作機械集
合のデータを取り出している。
In the second conditional clause, the frame access function unit (2-2) shown in FIG. 2 is used to extract data on the machine tool set from the production database.

第3と第4の条件節で工作機械集合から1つづつ工作機
械を取り出し、その後の条件節で工作機械の選択処理身
性う。
The third and fourth conditional clauses extract one machine tool from the machine tool set, and the subsequent conditional clauses carry out the process of selecting the machine tools.

第5条件節では、パターン照合されたワーク名からフレ
ームアクセス関数機構部(2−2)を用いワーク機構に
必要な概略パワー ワークのX、Y、Z軸方向の寸法を
取り出している。
In the fifth conditional clause, the frame access function mechanism unit (2-2) is used to extract the approximate power work dimensions in the X, Y, and Z axis directions required for the work mechanism from the pattern-matched work name.

また工作機械に関しては、機械名からフレームアクセス
関数機構部(2−2)を用い、最大出力パワーX%Y、
Z軸方向のストロークを取り出している。
Regarding machine tools, use the frame access function mechanism section (2-2) from the machine name, and use the maximum output power X%Y,
The stroke in the Z-axis direction is extracted.

これらのデータを各々比較することにより、ワーク加工
に必要なパワーと大ぎさを満足する1つの工作機械を決
定している。
By comparing these data, a machine tool that satisfies the power and size necessary for machining the workpiece is determined.

もしこのようなフレームアクセス関数機構部(2−2)
がなければ、第5条件節のfget関数部分のワークや
工作機械の属性値を求めるためにパターン照合を使わな
ければならなくなる。
If such a frame access function mechanism part (2-2)
Without it, pattern matching would have to be used to find the attribute values of the workpiece or machine tool in the fget function part of the fifth conditional clause.

この条件節だけでも、11回のパターン照合が必要にな
るし、作業記憶部(1−2)内の事実も11個ふえるこ
とになる。
This conditional clause alone requires pattern matching 11 times, and the number of facts in the working memory (1-2) increases by 11.

このようにフレームアクセス関数機構部(2−2)が推
論時間の短縮に有効に機能していることが理解できる。
It can thus be seen that the frame access function mechanism section (2-2) functions effectively in shortening the inference time.

なお、fget関数の第1引数はフレーム名を、第2引
数はスロット名を、第3引数はファシット名を示す。
Note that the first argument of the fget function indicates the frame name, the second argument indicates the slot name, and the third argument indicates the facit name.

このようにルールベースの処理をプロダクションシステ
ムにおいて行ない、データベースの処理をフレームシス
テムにおいて行なうようにプロダクションルールの実行
部と行動部とから直接データベースへアクセラ可能とな
るよう構成しているため、知識ベースの数が多い場合で
もプロダクションシステムの欠点である推論時間を短縮
することが出来、高速な推論処理が実現できる。
In this way, rule-based processing is performed in the production system, and database processing is performed in the frame system, so that the database can be directly accessed from the production rule execution part and action part, so the knowledge base Even when the number of systems is large, the inference time, which is a drawback of production systems, can be shortened and high-speed inference processing can be achieved.

なお、上記実施例では実行テーブル(4)のエントリを
先頭から順番に処理する方法を示したが、1つの副問題
の推論結果をもとに多重知識の制御変更するようにする
ことも出来る。
Although the above embodiment shows a method of processing the entries in the execution table (4) in order from the beginning, it is also possible to change the control of multiple knowledge based on the inference result of one sub-problem.

また、上記実施例においてはプロダクションシステムと
フレームシステムとを起動させる場合について示したが
、いずれかのみを単独で起動させて推論する方法とする
こともできる。
Further, in the above embodiment, the case where the production system and the frame system are activated is shown, but it is also possible to use a method of inferring by starting only one of them alone.

さらにまたこの発明は、工程設計に限定されるものでは
なく、多重知識ベースから成る問題であれば、他の分野
にも適用することが出来る。
Furthermore, the present invention is not limited to process design, but can be applied to other fields as long as the problem consists of multiple knowledge bases.

〔発明の効果〕〔Effect of the invention〕

以上説明したようにこの発明によれば、多重知識を表現
する簡単な構造の実行テーブルを設け、この実行テーブ
ルを解釈し実行する処理部を設けているため、多重知識
ベースの定義や入力および推論制御が安価に効率よく実
現出来る効果を奏する。
As explained above, according to the present invention, an execution table with a simple structure that expresses multiple knowledge is provided, and a processing unit that interprets and executes this execution table is provided. This has the effect that control can be realized efficiently and at low cost.

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

第1図はこの発明に一実施例に係るエキスパートシステ
ムの推論制御方法の動作フローチャート、第2図はこの
発明の一実施例推論制御方法の構成図、第3図はこの発
明で設けられる実行テーブルの登録態様図、第4図は工
作機械の選択に関するルールの一例を示すプログラムチ
ャート図、第5図は従来のプロダクションシステムの構
成図である。 (1)はプロダクションシステム、 (1−1)はプロダクション記憶部、 (1−2)は作業記憶部、(1−3)は推論機構、(1
−31)は前向き推論機構、 (1−32)は後向き推論機構、 (2)はフレームシステム、(2−1)はデータベース
、(2−2)はフレームアクセス関数機構部、(3)は
知識ベース部、 (3−1)は多重のルールベース部、 (3−2)は多重の事実ベース部、 (4)は実行テーブル、(5)は実行制御部。 なお、図中、同一符号は同一または相当部分を示す。
FIG. 1 is an operation flowchart of an inference control method for an expert system according to an embodiment of the present invention, FIG. 2 is a block diagram of an inference control method of an embodiment of the present invention, and FIG. 3 is an execution table provided in the present invention. FIG. 4 is a program chart showing an example of rules regarding machine tool selection, and FIG. 5 is a configuration diagram of a conventional production system. (1) is the production system, (1-1) is the production storage unit, (1-2) is the working memory unit, (1-3) is the inference mechanism, (1
-31) is a forward reasoning mechanism, (1-32) is a backward reasoning mechanism, (2) is a frame system, (2-1) is a database, (2-2) is a frame access function mechanism, (3) is knowledge Base part, (3-1) is a multiple rule base part, (3-2) is a multiple fact base part, (4) is an execution table, and (5) is an execution control part. In addition, in the figures, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] 推論対象である問題を構成する副問題毎に、事実ベース
とルールベースとからなる複数の知識ベース及び推論前
後で実行される推論前後の関数を実行テーブルに登録す
る第1の過程と、この第1の過程で実行テーブルに登録
された推論前の関数を実行し、上記登録された知識ベー
スの事実ベースとルールベースとを用いてプロダクショ
ンシステムで推論処理し、上記登録された推論後の関数
を実行し、上記実行・処理を副問題毎に順次行なう第2
の過程とを備えることを特徴とするエキスパートシステ
ムの推論制御方法。
A first process of registering a plurality of knowledge bases consisting of fact bases and rule bases and functions before and after inference, which are executed before and after inference, in an execution table for each sub-problem that constitutes the problem to be inferred; The pre-inference function registered in the execution table in step 1 is executed, the production system performs inference processing using the fact base and rule base of the registered knowledge base, and the registered function after inference is executed. The second step, in which the above execution/processing is performed sequentially for each subproblem.
An inference control method for an expert system, comprising the steps of:
JP63260766A 1988-10-17 1988-10-17 Inference control method for expert system Pending JPH02108127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63260766A JPH02108127A (en) 1988-10-17 1988-10-17 Inference control method for expert system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63260766A JPH02108127A (en) 1988-10-17 1988-10-17 Inference control method for expert system

Publications (1)

Publication Number Publication Date
JPH02108127A true JPH02108127A (en) 1990-04-20

Family

ID=17352432

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63260766A Pending JPH02108127A (en) 1988-10-17 1988-10-17 Inference control method for expert system

Country Status (1)

Country Link
JP (1) JPH02108127A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0432929A (en) * 1990-05-22 1992-02-04 Mitsubishi Electric Corp Inference system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0432929A (en) * 1990-05-22 1992-02-04 Mitsubishi Electric Corp Inference system
JP2613307B2 (en) * 1990-05-22 1997-05-28 三菱電機株式会社 Inference system

Similar Documents

Publication Publication Date Title
Forgy Rete: A fast algorithm for the many pattern/many object pattern match problem
US4712189A (en) Table driven translator
EP0365309B1 (en) A data unification system and method
JP2003528390A (en) Method of executing a computer program by an interpreter, computer system and computer program product
JPH02108127A (en) Inference control method for expert system
JPH11213004A (en) Data processor, its method and storage medium storing data processing program
Goel et al. Computer-aided processing of design specifications
CN114610297A (en) Automatic programming method for multi-language program codes
JPH04504627A (en) Signal processing device and method
US4885712A (en) Method and apparatus for partial test-cause generation
Murray et al. A framework for selecting between knowledge-based and traditional systems design
Burge A reprogramming machine
Yau et al. A framework for software development for distributed parallel computing systems
Puppe et al. Characterization and history of expert systems
JPH06222913A (en) Program analyzer
Logcher et al. Languages for user-defined member design processes
JP2633918B2 (en) Method search method and method search procedure generation method
JPH0460721A (en) Language processing system directed to object
JPS6347839A (en) Inference control system
JPH04340626A (en) Processing method for succession hierarchical logic type language
JPH03177928A (en) Rule interpretation processing system
JPH02190904A (en) Method for controlling inference
JPH0667887A (en) Information processor
JPH02236635A (en) Inference object world switching system
Jocković et al. A contribution to the organization of an expert system for process control of FMC