JPH0656579B2 - Rule block control system - Google Patents

Rule block control system

Info

Publication number
JPH0656579B2
JPH0656579B2 JP62078926A JP7892687A JPH0656579B2 JP H0656579 B2 JPH0656579 B2 JP H0656579B2 JP 62078926 A JP62078926 A JP 62078926A JP 7892687 A JP7892687 A JP 7892687A JP H0656579 B2 JPH0656579 B2 JP H0656579B2
Authority
JP
Japan
Prior art keywords
rule
block
rule block
conflict resolution
inference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP62078926A
Other languages
Japanese (ja)
Other versions
JPS63245528A (en
Inventor
知博 宮平
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62078926A priority Critical patent/JPH0656579B2/en
Publication of JPS63245528A publication Critical patent/JPS63245528A/en
Publication of JPH0656579B2 publication Critical patent/JPH0656579B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は知識情報処理システムに関し、特にルール型知
識を扱うシステムにおけるルールブロックの制御方式に
関する。
Description: TECHNICAL FIELD The present invention relates to a knowledge information processing system, and more particularly to a rule block control method in a system that handles rule-based knowledge.

〔従来の技術〕[Conventional technology]

従来、各々が少なくとも一つのルールを含むルールブロ
ックを知識ベースに複数個格納し、このルール型知識ベ
ースに格納されたルールブロックを使用して問題解決の
為の推論を実行するプロダクション・システム等の知識
情報処理システムにおいては、第3図に示すように、ル
ール型知識ベース31の各ルールブロック33,34にそのル
ールブロック自体のルール競合解消戦略(ルール適用方
式)35,36の指定を固定的に持たせ、ルール推論実行手
段32はその各々に内在するルール競合解消戦略の指定に
従って各々のルールブロックを使用した推論を実行して
いた。なお、ルールの競合解消戦略には、ルールに優先
順位をつける方式,最初に条件部がマッチしたルールを
実行する方式,条件部の複雑さを考慮する方式など各種
の方式が存在する。
Conventionally, a production system that stores a plurality of rule blocks each containing at least one rule in a knowledge base, and executes inference for problem solving using the rule blocks stored in the rule-based knowledge base. In the knowledge information processing system, as shown in FIG. 3, the rule conflict resolution strategies (rule application method) 35, 36 of the rule block itself are fixedly assigned to each rule block 33, 34 of the rule type knowledge base 31. The rule inference executing means 32 executes the inference using each rule block according to the designation of the rule conflict resolution strategy inherent in each rule inference execution means 32. There are various types of rule conflict resolution strategies, such as a method of prioritizing rules, a method of executing a rule whose condition part matches first, and a method of considering the complexity of the condition part.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

ところで、実際のシステムにおいては、同一の複数のル
ールを、異なるルール競合解消戦略を使用してルール推
論に使用することがある。然るに、上述した従来のルー
ルブロック制御方式では、起動要求されたルールブロッ
クのルール競合解消戦略の指定はそのルールブロックに
固定されているため、一つのルールブロックを用いた推
論はそのルールブロック所定の競合解消戦略に従ったも
のに固定されることになる。
By the way, in an actual system, the same plurality of rules may be used for rule inference using different rule conflict resolution strategies. However, in the above-mentioned conventional rule block control method, since the rule conflict resolution strategy of the rule block requested to be activated is fixed to that rule block, the inference using one rule block is performed according to the rule block predetermined inference. It will be fixed according to the conflict resolution strategy.

この為、上述のような構成を採る従来方式においては、
同じルールを含むが内在された競合解消戦略の異なる同
種のルールブロックを多数準備し、この使用を切分ける
ことで上記要請に応えるしか方法がなく、同種のルール
ブロックを多数必要とすることから無駄が多いという問
題があった。またルール型知識はその維持管理を簡便化
するために整理された表現形式として構築されることが
望まれるが、上記の方式では同種のルールブロックが知
識ベース上に散在する結果、その要請にも応えることが
できない問題があった。
Therefore, in the conventional system having the above-mentioned configuration,
There is no choice but to respond to the above request by preparing many rule blocks of the same type that contain the same rule but have different internal conflict resolution strategies, and by separating this use, it is wasteful because many rule blocks of the same type are required. There was a problem that there were many. In addition, it is desirable that rule-based knowledge be constructed as an organized form of expression in order to simplify its maintenance. However, in the above method, rule blocks of the same type are scattered in the knowledge base, and as a result, they are also required. There was a problem I could not answer.

本発明はこのような事情に鑑みて為されたものであり、
その目的は、一つのルールブロックを異なるルール競合
解消戦略に従ってダイナミックに変更制御しつつ推論を
実行できるルールブロック制御方式を提供することにあ
る。
The present invention has been made in view of such circumstances,
It is an object of the present invention to provide a rule block control method capable of executing inference while dynamically changing and controlling one rule block according to different rule conflict resolution strategies.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記目的を達成するために、複数のルールブロ
ックを含むルール型知識ベースと、 該ルール型知識ベースに格納されたルールブロックの起
動法を該ルールブロックの起動要求に含まれるルール競
合解消戦略の指定に応じて制御するルールブロック起動
制御部と、 該ルールブロック起動制御部の制御に従ってルールブロ
ック推論を実行するルールブロック推論実行部とから構
成される。
In order to achieve the above object, the present invention provides a rule type knowledge base including a plurality of rule blocks and a method of activating a rule block stored in the rule type knowledge base to resolve a rule conflict included in a request to activate the rule block. A rule block activation control unit that controls according to the designation of a strategy, and a rule block inference execution unit that executes rule block inference under the control of the rule block activation control unit.

〔作用〕[Action]

ルール型知識ベースに格納されたルールブロックのルー
ル競合解消戦略は、そのルールブロック自体には含めら
れず、そのルールブロックの起動要求に含められるの
で、或るルールブロックが或るルール競合解消戦略の指
定を含む起動要求で起動された場合にはルールブロック
起動制御部によりその指定されたルール競合解消戦略で
そのルールブロックが使用されるように制御され、上記
ルールブロックと同一のルールブロックが上記とは異な
るルール競合解消戦略の指定を含む起動要求で起動され
た場合にはルールブロック起動制御部によってそのルー
ルブロックが別のルール競合解消戦略に従って使用され
るように制御される。
The rule conflict resolution strategy of the rule block stored in the rule type knowledge base is not included in the rule block itself but is included in the activation request of the rule block. Therefore, a certain rule block is included in the rule conflict resolution strategy. When the rule block is started by the start request including the specification, the rule block start control unit controls the rule block to be used in the specified rule conflict resolution strategy, and the same rule block as the above rule block is Is activated by an activation request including a different rule conflict resolution strategy, the rule block activation control unit controls the rule block to be used in accordance with another rule conflict resolution strategy.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の実施例の機能ブロック図であり、1は
ルール型の知識を格納するルール型知識ベース、2はル
ールブロックの起動要求に従ってルールの競合解消戦略
のダイナミックな制御を行なうルールブロック起動制御
部、3はルールブロック内のルール推論を実行するルー
ルブロック推論実行部であり、ルールブロック起動制御
部2とルールブロック推論実行部3とでルール推論実行
手段4が構成される。
FIG. 1 is a functional block diagram of an embodiment of the present invention, in which 1 is a rule type knowledge base for storing rule type knowledge, and 2 is a rule for dynamically controlling a rule conflict resolution strategy according to a rule block activation request. The block activation control unit 3 is a rule block inference execution unit that executes rule inference in the rule block, and the rule block activation control unit 2 and the rule block inference execution unit 3 form a rule inference execution means 4.

ルール型知識は、第1図に示すように、複数のルールブ
ロック11,12に分割され、ルール型知識ベース1に格納
される。このルール型知識ベース1のルール型知識を基
に、ルール推論実行手段4は推論を実行するが、一般的
に、複数のルールブロックを用いたマルチルールブロッ
ク推論では、或るルールブロックから他のルールブロッ
クの起動要求が生じ、それら複数のルールブロックを複
雑に組合せることによって、ルール推論が成り立つ。
As shown in FIG. 1, the rule-based knowledge is divided into a plurality of rule blocks 11 and 12 and stored in the rule-based knowledge base 1. The rule inference execution means 4 executes inference based on the rule type knowledge of the rule type knowledge base 1. Generally, in multi-rule block inference using a plurality of rule blocks, a certain rule block is changed to another one. A rule block invocation is generated, and rule inference is established by complexly combining a plurality of rule blocks.

各ルールブロック11,12内のルール推論の際には、ルー
ルの競合解消を行なう必要が生じ、前述した従来方式で
はその競合解消戦略をこれが適用されるルールブロック
中に記述し、固定的に持たせていた。これに対し、本実
施例では、ルールブロックの起動要求と共に、この起動
要求によって起動するルールブロックのルール競合解消
戦略の指定を同時にルールブロック起動制御部2に渡す
構成を採用し、ルールブロックとそのルール競合解消戦
略とを切離している。
When inferring rules in each of the rule blocks 11 and 12, it is necessary to resolve the rule conflict. In the above-mentioned conventional method, the conflict resolution strategy is described in the rule block to which it is applied and fixed. I was letting. On the other hand, in the present embodiment, the rule block activation control unit 2 and the rule conflict resolution strategy specification of the rule block activated by this activation request are simultaneously passed to the rule block activation control unit 2 together with the rule block activation request. Separated from the rule conflict resolution strategy.

ルールブロック起動制御部2はルール起動要求を受ける
と、ルールブロックの起動の用意をすると共に、要求さ
れたルールブロックについての指定されたルール競合解
消戦略をルールブロック推論実行部3が参照できるよう
に準備し、ルールブロック推論実行部3に対してそのル
ールブロック内のルール推論の実行開始を指示する。こ
の指示によりルールブロック推論実行部3では、ルール
ブロック起動制御部2に準備されたルール競合解消戦略
に従って、実行開始指示されたルールブロック内のルー
ル推論を実行する。
Upon receiving the rule activation request, the rule block activation control unit 2 prepares for activation of the rule block, and allows the rule block inference execution unit 3 to refer to the designated rule conflict resolution strategy for the requested rule block. It prepares and instructs the rule block inference execution unit 3 to start execution of rule inference in the rule block. According to this instruction, the rule block inference execution unit 3 executes the rule inference in the rule block instructed to start the execution according to the rule conflict resolution strategy prepared in the rule block activation control unit 2.

次に簡単なルールブロックを例に採り、第2図を参照し
ながら本実施例の動作をより詳細に説明する。なお第2
図において、21はルール型知識ベース、22はルールブロ
ック起動制御部、23はルールブロック推論実行部、24は
ルール推論実行手段である。
Next, taking a simple rule block as an example, the operation of this embodiment will be described in more detail with reference to FIG. The second
In the figure, 21 is a rule type knowledge base, 22 is a rule block activation control unit, 23 is a rule block inference execution unit, and 24 is a rule inference execution means.

例えばルール型知識ベース21の一つのルールブロックR
B2が次のような二つのルールから構成されるものとす
る。
For example, one rule block R of the rule type knowledge base 21
It is assumed that B2 is composed of the following two rules.

ルールブロックRB2 ルールR21 IF Aがリストで、 AがNILでない THEN AをPOPし、Bへ代入 ルールR22 IF BがNILでない THEN Bを出力し、BをNILにする 上記ルールブロックRB2は、最初にマッチしたルール
を各ルール高々1回だけ実行する競合解消戦略FM1を
採ると、リストAの最初の要素を出力する。また各ルー
ルの実行を1回に限らず、マッチしたルールを単純に実
行する競合解消戦略FMを採ると、リストAの最後の要
素を出力する。更に、IF部の単純なルールを実行する
という競合解消戦略NUMを採ると、リストAの各要素
を全て出力することになる。従来の方式では、そのルー
ルブロックRB2中にこの各競合解消戦略の何れかの指
定を記述していたので、ルールブロックRB2のルール
競合解消戦略は固定的なものとなり、同一のルールR2
1,R22に対して上記3通りのルール競合解消戦略を使
用して異なる3機能を実現する為には、同一のルールR
21,R22を含む3個のルールブロックを作成する必要が
あったが、本実施例ではルールブロック中には競合解消
戦略を記述せず、ルールブロックRB2の起動要求中に
その指定を含ませることにしたので、そのようなことは
なくなる。
Rule block RB2 Rule R21 IF A is a list, A is POP not THEN A which is not NIL, and it is assigned to B Rule R22 IF B is not NIL THEN B is output, and B is made NIL The above rule block RB2 is first When the conflict resolution strategy FM1 in which each matched rule is executed at most once is adopted, the first element of the list A is output. Also, the execution of each rule is not limited to once, and if the conflict resolution strategy FM that simply executes the matched rule is adopted, the last element of the list A is output. Further, if the conflict resolution strategy NUM of executing a simple rule of the IF section is adopted, all the elements of the list A will be output. In the conventional method, since any one of the conflict resolution strategies is described in the rule block RB2, the rule conflict resolution strategy of the rule block RB2 is fixed and the same rule R2 is used.
In order to realize three different functions by using the above three rule conflict resolution strategies for 1 and R22, the same rule R is used.
Although it was necessary to create three rule blocks including 21 and R22, in the present embodiment, the conflict resolution strategy is not described in the rule block, and the designation is included in the activation request of the rule block RB2. That's not the case because I chose.

第2図のルールブロックRB1は、ルールR11とルール
R12を含むルールブロックであり、ルールR12のTHE
N部にルールブロックRB2をルール競合解消戦略FM
で起動する下記のような起動要求が含められている。
The rule block RB1 in FIG. 2 is a rule block including rules R11 and R12, and the THE of rule R12
Rule block RB2 in N part Rule conflict resolution strategy FM
Includes the following activation requests to be activated in.

EXECUTE RB2 WITH FM このルールブロックRB1はルールブロックRB2をル
ール競合解消戦略FMで起動するものであるが、ルール
ブロックRB2を起動する別のルールブロックに例え
ば、 EXECUTE RB2 WITH NUM の起動要求が含められていれば、そのときはルールブロ
ックRB2はルール競合解消戦略NUMで処理されるこ
とになる。このように、起動時の競合解消戦略の指定を
変えることにより、一つのルールブロックRB2を使用
して複数の機能を実現することができる。
EXECUTE RB2 WITH FM This rule block RB1 activates the rule block RB2 by the rule conflict resolution strategy FM, but another rule block that activates the rule block RB2 includes, for example, an EXECUTE RB2 WITH NUM activation request. Then, at that time, the rule block RB2 is processed by the rule conflict resolution strategy NUM. In this way, by changing the designation of the conflict resolution strategy at the time of startup, it is possible to realize a plurality of functions using one rule block RB2.

さて、第2図において、ルールブロック例えばルールブ
ロックRB2の起動は、以下のような順序で制御され
る。
Now, in FIG. 2, the activation of the rule block, for example, the rule block RB2 is controlled in the following order.

先ず、ルール型知識ベース21とルール推論実行手段24に
よってルールブロックRB1を使用したルールブロック
推論実行中に、ルールR12のIF部が成立したことから
ルールブロックRB2の起動要求が出されたとすると、
その起動要求はルールブロック起動制御部22に渡される
()。この起動要求中には前述したようにルール競合
解消戦略の指定FMも含まれる。
First, when the rule block knowledge RB 21 and the rule inference execution means 24 are executing the rule block inference using the rule block RB1, it is assumed that a request to activate the rule block RB2 is issued because the IF part of the rule R12 is established.
The activation request is passed to the rule block activation control unit 22 (). The activation request includes the designated FM of the rule conflict resolution strategy as described above.

ルールブロック起動制御部22は、上記起動要求を受ける
と、先ずローカル変数の退避,他の形の知識のロード
等、ルールブロック起動の準備()をすると共に、ル
ール競合解消戦略を起動要求から分離し、格納する
()。即ち、予めルールブロック起動制御部22に用意
された複数のルール競合解消戦略の中から、起動要求中
に指定されたルール競合解消戦略を選択し、これをルー
ルブロック推論実行部23が参照可能なように第2図の符
号25に示す如く保持する。そして、ルールブロック推論
実行部23に対しルールブロックRB2内の推論の実行の
開始を指示する()。
Upon receiving the activation request, the rule block activation control unit 22 first prepares () for saving the local variables, loading other types of knowledge, etc., and activates the rule conflict resolution strategy from the activation request. And store (). That is, from the plurality of rule conflict resolution strategies prepared in advance in the rule block activation control unit 22, the rule conflict resolution strategy specified in the activation request is selected, and the rule block inference execution unit 23 can refer to it. Thus, it is held as indicated by reference numeral 25 in FIG. Then, it instructs the rule block inference execution unit 23 to start execution of inference in the rule block RB2 ().

これに応答してルールブロック推論実行部23では、ルー
ルブロック起動制御部22に格納されたルール競合解消戦
略25を参照しながら、ルールブロックRB2内の推論を
実行する()。
In response to this, the rule block inference execution unit 23 executes the inference in the rule block RB2 with reference to the rule conflict resolution strategy 25 stored in the rule block activation control unit 22 ().

以上本発明の実施例について説明したが、本発明は以上
の実施例にのみ限定されず、その他各種の付加変更が可
能である。例えば、ルール型知識と共にそれ以外の例え
ばフレーム型知識も同時に扱うシステムにおいても本発
明は有効であり、フレーム型知識やユーザからのコマン
ド等によるルールブロックの起動において、ダイナミッ
クなルールブロックの制御が実現できる。
Although the embodiments of the present invention have been described above, the present invention is not limited to the above embodiments, and various other additions and modifications can be made. For example, the present invention is effective in a system that handles not only rule type knowledge but also other types of frame type knowledge at the same time, and dynamic rule block control is realized when the rule block is activated by a frame type knowledge or a command from the user. it can.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明によれば、或るルールブロ
ックのルール競合解消戦略をそのルールブロック自体に
含めず、そのルールブロックの起動要求中に含めること
により、一つのルールブロックを異なるルール競合解消
戦略に従ってダイナミックに変更制御しつつ推論を実行
できる効果がある。従って従来のように、同じルールを
含むルールブロックを多数準備する必要がなくなるので
無駄が少なくなり、またルール型知識が整理された表現
形式となるので、その維持管理を簡便化することができ
る。
As described above, according to the present invention, a rule conflict resolution strategy of a rule block is not included in the rule block itself but is included in the activation request of the rule block, so that one rule block has different rule conflicts. There is an effect that inference can be executed while dynamically controlling change according to a solution strategy. Therefore, unlike the conventional case, it is not necessary to prepare a large number of rule blocks including the same rule, which reduces waste, and an expression form in which rule-type knowledge is organized can be maintained and management thereof can be simplified.

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

第1図は本発明の実施例の機能ブロック図、 第2図は本発明の実施例の動作説明図および、 第3図は従来方式の機能ブロック図である。 図において、1,21,31……ルール型知識ベース、2,
22……ルールブロック起動制御部、3,23,32……ルー
ルブロック推論実行部、4,24……ルール推論実行手
段、11,12,33,34,RB1,RB2……ルールブロッ
ク、25,35,36……ルール競合解消戦略。
FIG. 1 is a functional block diagram of an embodiment of the present invention, FIG. 2 is an operation explanatory diagram of an embodiment of the present invention, and FIG. 3 is a functional block diagram of a conventional system. In the figure, 1, 21, 31 ... Rule type knowledge base, 2,
22 ... Rule block activation control unit, 3, 23, 32 ... Rule block inference execution unit, 4, 24 ... Rule inference execution means, 11, 12, 33, 34, RB1, RB2 ... Rule block, 25, 35, 36 …… Rule conflict resolution strategy.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数のルールブロックを含むルール型知識
ベースと、 該ルール型知識ベースに格納されたルールブロックの起
動法をルールブロックの起動要求に含まれるルール競合
解消戦略の指定に応じて制御するルールブロック起動制
御部と、 該ルールブロック起動制御部の制御に従ってルールブロ
ック推論を実行するルールブロック推論実行部とから構
成されることを特徴とするルールブロック制御方式。
1. A rule-type knowledge base including a plurality of rule blocks, and a method of activating a rule block stored in the rule-type knowledge base is controlled according to designation of a rule conflict resolution strategy included in a rule block activation request. A rule block control method comprising: a rule block activation control unit that executes the rule block activation control unit; and a rule block inference execution unit that executes rule block inference under the control of the rule block activation control unit.
JP62078926A 1987-03-31 1987-03-31 Rule block control system Expired - Lifetime JPH0656579B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62078926A JPH0656579B2 (en) 1987-03-31 1987-03-31 Rule block control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62078926A JPH0656579B2 (en) 1987-03-31 1987-03-31 Rule block control system

Publications (2)

Publication Number Publication Date
JPS63245528A JPS63245528A (en) 1988-10-12
JPH0656579B2 true JPH0656579B2 (en) 1994-07-27

Family

ID=13675471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62078926A Expired - Lifetime JPH0656579B2 (en) 1987-03-31 1987-03-31 Rule block control system

Country Status (1)

Country Link
JP (1) JPH0656579B2 (en)

Also Published As

Publication number Publication date
JPS63245528A (en) 1988-10-12

Similar Documents

Publication Publication Date Title
US6269391B1 (en) Multi-processor scheduling kernel
JP3776449B2 (en) Multitasking low power controller
JPH0283627A (en) Interpreter
JPH0570177B2 (en)
JPS63245528A (en) Rule block control system
JPS62126451A (en) Initial program load system for distributed processor
JPH023828A (en) computer network system
JPH0656581B2 (en) Object-oriented programming method
JPH02105962A (en) System starting device
JPH0460843A (en) Task scheduling method in multiprocessor systems
JPS6423342A (en) Programmable controller
JPH02113363A (en) Time slice controlling system for multiprocessor system
JP2590872B2 (en) Task scheduling method
JPH0568726B2 (en)
JPH03257631A (en) Time division multitask executing device
JPH0610401Y2 (en) Program timer
JP2579008B2 (en) Time-division multitasking execution device
US6308196B1 (en) Method and interface device for sharing physical resources
JPS635790B2 (en)
JPH0630054B2 (en) File data management method
JPS6385938A (en) Controller for multiplex parallel operation of program
JPH0573340A (en) Inter-operating system bridge system
JPS63501987A (en) Special purpose processor for offloading many operating system functions in large data processing systems
JPH11353180A (en) Program control method
JPH04329462A (en) Dynamic degenerate operation system for multiprocessor system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070727

Year of fee payment: 13