JPH02210541A - Discrimination network processing method - Google Patents
Discrimination network processing methodInfo
- Publication number
- JPH02210541A JPH02210541A JP1029799A JP2979989A JPH02210541A JP H02210541 A JPH02210541 A JP H02210541A JP 1029799 A JP1029799 A JP 1029799A JP 2979989 A JP2979989 A JP 2979989A JP H02210541 A JPH02210541 A JP H02210541A
- Authority
- JP
- Japan
- Prior art keywords
- network
- condition
- conditions
- interval
- structure data
- 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
Links
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、条件の成立判定を行なうための弁別ネットワ
ークに類し、特に知識ベースシステムに好適なネットワ
ークを用いるシステムに係り、弁別ネットワークに付加
すべきデータを、すでにデータが付加されている他のネ
ットワークのデータを利用して付加する方法に関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a system using a network similar to a discrimination network for determining whether a condition is met, and which is particularly suitable for a knowledge-based system. The present invention relates to a method of adding data to be added using data of another network to which data has already been added.
条件の真偽判定を高速に行う方法としては、ルール条件
部を弁別ネットワークに類したネットワークで表わし、
これを用いて条件成立判定を行う方法が知られている。One way to quickly determine the truth or falsity of a condition is to represent the rule condition part as a network similar to a discrimination network.
A method is known in which this is used to determine whether a condition is satisfied.
これについては、[多パターン・多オブジェクト高速マ
ツチアルゴリズム“Rate”(人工知能、第19巻、
第1号、1982年) J (”Rate”: A
Fast Algorithm for theMan
y Pattern/Many 0bject Pat
tern MatchProblem (ARTIFI
CIAL IN置LIGENCE、voQ、19.Nc
il。Regarding this, see [Multi-pattern/multi-object high-speed matching algorithm “Rate” (Artificial Intelligence, Vol. 19,
No. 1, 1982) J (“Rate”: A
Fast Algorithm for the Man
y Pattern/Many 0bject Pat
tern MatchProblem (ARTIFI
CIAL IN LIGENCE, voQ, 19. Nc
il.
(1982)))の記載を参考にすることができる。(1982))) can be referred to.
上記方法は、ワーキングメモリエレメントと呼ばれる、
ワーキングメモリエレメント名および単数または複数の
属性名と属性値との対から成る構造体データに関する条
件をネットワークに変換し、それを用いて条件の真偽判
定を行うものである。The above method is called working memory element.
Conditions related to structure data consisting of a working memory element name and a pair of one or more attribute names and attribute values are converted into a network, and the network is used to determine the truth or falsehood of the condition.
例えば、第5図で示すようなルール501からルール5
03の条件部を、第8図で示すような弁別ネットワーク
に変換する。次に、第4図で示すようなワーキングメモ
リエレメントがルールの条件部を満たすかどうか判定す
る処理を、弁別ネットワークの一番上のノード、この場
合ノード601から始める。あるワーキングメモリエレ
メントがノード601に付いている条件を満たすならば
、ノード602などの弁別ネットワーク上で下にあるノ
ードに移る。そのようにして、ノード603の様な一番
下のノードにたどりつけば、そのノードに付いているル
ールの条件部を満たしたことになる。また、一番下のノ
ードには、条件部を満足したワーキングメモリエレメン
トを覚えておく。For example, rules 501 to 5 as shown in FIG.
The condition part of 03 is converted into a discrimination network as shown in FIG. Next, the process of determining whether a working memory element as shown in FIG. 4 satisfies the condition part of the rule starts from the top node of the discrimination network, in this case node 601. If a certain working memory element satisfies the condition attached to node 601, it moves to a lower node on the discrimination network, such as node 602. In this way, if the lowest node such as node 603 is reached, the condition part of the rule attached to that node is satisfied. Further, the working memory element that satisfies the conditional part is stored in the bottom node.
以上のことを詳しく述べると次のようになる。The above can be explained in detail as follows.
ワーキングメモリエレメントに関する条件は、ワーキン
グメモリエレメントの属性に関する複数の条件項から構
成されており、各条件項はネットワークのノードに対応
している。また、ネットワークの終端には、終端ノード
があり、頂点ノードから終端ノードまでの条件を全て満
たしたワーキングメモリエレメントを保持する機能を備
えている。The conditions regarding the working memory element are composed of a plurality of condition terms regarding the attributes of the working memory element, and each condition term corresponds to a node of the network. Furthermore, there is a terminal node at the end of the network, which has a function of holding working memory elements that satisfy all conditions from the vertex node to the terminal node.
条件の成立判定を行うには、ワーキングメモリエレメン
トをネットワークに流し、各ノードに記憶されている条
件部を満足するかを調べ、満足していれば次のノードへ
と流し、満足していなければ処理を中止するという処理
を繰り返す。あるワーキングメモリエレメントが終端ノ
ードまで到達すると、その終端ノードにワーキングメモ
リエレメントをつけ加えて保持したうえで、終端ノード
に記述されている条件部(ルール名)が成立したと判定
する方法であり、高速性に優れている。To determine if a condition is met, the working memory element is passed through the network, checked to see if it satisfies the condition part stored in each node, and if it is, passed to the next node, and if not Repeat the process of canceling the process. When a certain working memory element reaches the terminal node, the working memory element is added to the terminal node and retained, and then it is determined that the condition part (rule name) written in the terminal node is satisfied, and it is a fast method. Excellent in sex.
この様な弁別ネットワークで表わされたルール条件部に
対し、新たな一つのルール条件部を付加し、一つのネッ
トワークに合併する方法が知られている。これについて
は、「知識ベースの逐次的構造化−Rateネットワー
クの逐次的構築法−(電子情報通信学会論文誌D Vo
Q、J 71−DN[16pp、1100−1108.
1988年)」の記載を参考にすることができる。A method is known in which a new rule condition part is added to the rule condition parts represented by such a discrimination network, and the rules are merged into one network. Regarding this, please refer to "Sequential Structuring of Knowledge Base - Sequential Construction Method of Rate Network" (IEICE Transactions D Vo
Q, J 71-DN [16pp, 1100-1108.
1988) can be referred to.
考えていた通りに動作を行うルールを作成するとき、推
論を行いながらルールの動作を調べ、足りないルールが
あれば、推論を一旦止めて、新たなルールを追加したの
ち、再び推論を行なわせることが考えられる。このとき
、従来の技術を用いることにより、ルール条件部を表わ
すネットワークに新たなルールの条件部をつけ加えるこ
とができる。これにより、推論を初めからやりなおす場
合、すなわちワーキングメモリエレメントをネットワー
クに流しなおす場合に対応できる。When creating a rule that behaves as expected, examine the behavior of the rule while performing inference, and if any rules are missing, stop the inference, add a new rule, and then perform the inference again. It is possible that At this time, by using conventional techniques, a new rule condition part can be added to the network representing the rule condition part. This makes it possible to handle cases in which inference is restarted from the beginning, that is, cases in which working memory elements are sent to the network again.
また、推論途中でルールの追加を行い、ルール追加後中
断時点から推論を続行させたい場合には、つけ加えたル
ールに対応する終端ノードにそこまでの条件を満たすワ
ーキングメモリエレメントの付加を行う必要がある。し
かしながら現在の所、この処理を効率的に行う方法はな
い。Additionally, if you add a rule during inference and want to continue inference from the point where it was interrupted after adding the rule, you need to add a working memory element that satisfies the conditions up to that point to the terminal node corresponding to the added rule. be. However, there is currently no way to efficiently perform this process.
本発明の目的は、弁別ネットワークに付加すべきデータ
を、すでにデータが付加されているネットワークのデー
タを利用して付加する方法を提供ことにある。An object of the present invention is to provide a method of adding data to be added to a discrimination network by using data of a network to which data has already been added.
本発明の上記目的は、追加されたルールに対するネット
ワークのノードに付加するワーキングメモリエレメント
を、他のネツトリーりのすでにノードに付加されている
ワーキングメモリエレメントを利用して得ることにより
達成される。The above object of the present invention is achieved by obtaining a working memory element to be added to a node of a network for an added rule by using a working memory element already attached to a node in another network.
本発明においては上述の如く、追加されたルールに対す
るネットワークのノードに付加するワーキングメモリエ
レメントを、他のネットワークのすでにノードに付加さ
れているワーキングメモリエレメントを利用して得るの
で、すべてのワーキングメモリエレメントを調べる必要
がなくなる。In the present invention, as described above, working memory elements to be added to a network node for an added rule are obtained by using working memory elements already added to nodes in other networks, so all working memory elements There is no need to investigate.
これにより、条件判定すべきワーキングメモリエレメン
ト数が少なくなり、データ付加処理時間を短縮できる。As a result, the number of working memory elements to be subjected to condition determination is reduced, and data addition processing time can be shortened.
以下、本発明の一実施例を図面に基づいて詳細に説明す
る。Hereinafter, one embodiment of the present invention will be described in detail based on the drawings.
第2図は、本発明を適用する推論システムを示すブロッ
ク構成図である。利用者は、CPU203からの出力を
モニタ201を通じて見て、キーボード202より入力
を行うことによりCPU203を通じてディスク204
中のファイルの修正や推論実行の制御などを行うことが
できる。FIG. 2 is a block configuration diagram showing an inference system to which the present invention is applied. The user views the output from the CPU 203 through the monitor 201 and inputs information from the keyboard 202 to read the output from the disk 204 through the CPU 203.
You can modify the files inside it and control inference execution.
第3図は、CPU203およびディスク204の機能ブ
ロック図である。入出力部301.デバッガ302.エ
ディタ303. トランスレータ304、ネットワーク
修正部305.推論部306はCPU203の機能ブロ
ックである。ルールファイル307.ネットワークファ
イル308.ワーキングメモリエレメントファイル30
9はディスク204の機能ブロックである。FIG. 3 is a functional block diagram of the CPU 203 and the disk 204. Input/output section 301. Debugger 302. Editor 303. Translator 304, network modification unit 305. The inference unit 306 is a functional block of the CPU 203. Rule file 307. Network file 308. Working memory element file 30
9 is a functional block of the disk 204.
入出力部301はモニタ201やキーボード202の制
御を行う。また、推論システムの利用者は、この入出力
部301を通じて以下の各部分を起動する。エディタ3
03は、ルールファイル307およびワーキングメモリ
エレメントファイタ304は、ルールファイル307に
記述されているルールを推論部306が扱いやすい形式
であるネットワークに変換し、ネットワークファイル3
08に格納する。ネットワーク修正部305は、ルール
を表わしているネットワークの修正を行う。An input/output unit 301 controls the monitor 201 and keyboard 202. Furthermore, the user of the inference system activates the following parts through this input/output unit 301. Editor 3
03, the rule file 307 and the working memory element fighter 304 convert the rules written in the rule file 307 into a network in a format that is easy for the inference unit 306 to handle, and create the network file 3.
Store in 08. The network modification unit 305 modifies the network representing the rule.
推論部306は、ネットワークファイル308中のネッ
トワークおよびワーキングメモリエレメントファイル3
09中のワーキングメモリエレメントをメモリ内に読み
込んだ上で、それらに基づいて推論を行う。デバッガ3
02は、エディタ303゜トランスレータ304.ネッ
トワーク修正部305゜推論部306を起動することに
より、推論の制御。The inference unit 306 uses the network in the network file 308 and the working memory element file 3.
After reading the working memory elements in 09 into memory, inferences are made based on them. Debugger 3
02 is an editor 303 degree translator 304 . Network modification unit 305 Controls inference by activating inference unit 306.
推論の途中状態の表示、推論途中でルールやワーキング
メモリエレメントの追加や修正、削除、削除したものの
復活などを行う。It displays the state during inference, adds, modifies, and deletes rules and working memory elements during inference, and restores deleted items.
第4図に309内のワーキングメモリエレメントの例を
示す。このワーキングメモリエレメントは店の売上デー
タを示している。ワーキングメモリエレメント401は
、ワーキングメモリエレメがA、属性名$個数の属性値
が1であるワーキングメモリエレメントを表わしている
。すなわち、商品A、1個の売上があったことを示して
いる。FIG. 4 shows an example of working memory elements in 309. This working memory element shows store sales data. The working memory element 401 represents a working memory element in which the working memory element is A and the attribute value of the attribute name $number is 1. In other words, it shows that one item of product A was sold.
ワーキングメモリエレメント402からワーキングメモ
リエレメント404も同様である。The same applies to working memory elements 402 to 404.
第5図にファイル307内のルールの例を示す。FIG. 5 shows an example of rules in the file 307.
これらのルールは、売上を調べて、売られた商品に適切
な包装用の箱を指示するものである。ルール501は、
属性名$商品名の属性値がBで、属性名$個数の属性値
が2であるワーキングメモリエレメントが存在すれば、
その商品を包装する箱は箱1を使うようにモニタ201
に出力するものである。These rules examine sales and dictate appropriate packaging boxes for sold items. Rule 501 is
If there exists a working memory element whose attribute value of attribute name $product name is B and attribute value of attribute name $number is 2,
Monitor 201 so that box 1 is used to package the product.
This is what is output to.
例えば、ワーキングメモリエレメント402が存在すれ
ば、ルール501の条件を満たすので、売上2の商品に
対して箱1を用いて包装するようにモニタ201に出力
される。ここで、ifの次からthenの前までを条件
部、thenの次からを実行部と呼ぶ。ルール502と
ルール503も同様である。例えば、ワーキングメモリ
エレメント404が存在すれば、ルール502.ルール
503の条件部が成立し、それぞれ箱22箱3を用いる
ようにモニタ201に出力される。For example, if the working memory element 402 exists, the condition of the rule 501 is satisfied, and therefore, a message is output to the monitor 201 to package the product with sales 2 using box 1. Here, the part after if and before then is called the conditional part, and the part after then is called the execution part. The same applies to rules 502 and 503. For example, if working memory element 404 exists, rule 502. The condition part of the rule 503 is satisfied, and the output is output to the monitor 201 to use the boxes 22 and 3, respectively.
第6図に、307内のルール501とルール502の条
件部をネツ1−ワークで表現し、308内に格納されて
いたものに、309内に格納されていた第4図のすべて
のワーキングメモリエレメントを流した図を示す。ワー
キングメモリエレメントを流す作業はネットワークの一
番上のノード601から行われる。ノード601.ノー
ド602゜ノード604には条件が付いており、この条
件を満足するワーキングメモリエレメントのみをその下
のノードに流す。ノード603.ノード605に流れた
ワーキングメモリエレメントは、その上のノードにある
条件をすべて満たしたものとして、記録される。ノード
603とノード605の括弧内に記録されているのは、
条件を満たしたワーキングメモリエレメントであり、ワ
ーキングメモリエレメント名で示している。In FIG. 6, the condition parts of rules 501 and 502 in 307 are expressed in network 1-work, and all the working memory of FIG. 4 stored in 309 is added to what was stored in 308. A diagram showing the flow of elements. The work of streaming working memory elements is done from node 601 at the top of the network. Node 601. A condition is attached to the nodes 602 and 604, and only working memory elements that satisfy this condition are passed to the nodes below. Node 603. The working memory element that has flowed to node 605 is recorded as satisfying all the conditions in the nodes above it. What is recorded in parentheses at node 603 and node 605 is:
This is a working memory element that satisfies the conditions and is indicated by the working memory element name.
第7図に、利用者がデバッガ302を通じて追加するル
ール503の条件部をネットワークで表現し、まだワー
キングメモリエレメントを流していない図を示す。FIG. 7 shows a diagram in which the condition part of the rule 503 added by the user through the debugger 302 is expressed by a network, and the working memory element has not yet been sent.
第8図に、第6図に示すネットワークに第7図に示すネ
ットワークを追加し、本発明により、ノード605に付
加されているワーキングメモリエレメントを用いて、ノ
ード803にワーキングメモリエレメントを付加した図
を示す。ここで付加されたワーキングメモリエレメント
は、ノード803より上、すなわちノード601.ノー
ド801、ノード802に付いている条件を満足するワ
ーキングメモリエレメントである。FIG. 8 is a diagram in which the network shown in FIG. 7 is added to the network shown in FIG. 6, and a working memory element is added to node 803 using the working memory element added to node 605 according to the present invention. shows. The working memory elements added here are located above node 803, that is, node 601. This is a working memory element that satisfies the conditions attached to nodes 801 and 802.
まず、処理の概要を、第8図のネットワークを用いて説
明する。First, the outline of the process will be explained using the network shown in FIG.
ネットワークに新たに追加したノード803に、ノード
803より上、すなわちノード601.ノード801.
ノード802に付いている条件を満足するワーキングメ
モリエレメントを付加することを考える。新たに追加し
たノード803に付加するワーキングメモリエレメント
が満足すべき条件は、ノード601の$商品名=Bとノ
ード801の$個数く7とノード802の$個数〉4で
ある。The newly added node 803 to the network has nodes above node 803, that is, node 601. Node 801.
Consider adding a working memory element that satisfies the conditions attached to node 802. The conditions to be satisfied by the working memory element added to the newly added node 803 are $product name=B of the node 601, $number of the node 801 minus 7, and $number of the node 802>4.
ノード605に付加されているワーキングメモリエレメ
ントが満足している条件と比べると、$商品名=Bは同
じ、$個数〉2より$個数〉4の方がきつい条件、$個
数く7が増えた条件である。Compared to the conditions that the working memory element attached to node 605 satisfies, $product name=B is the same, $number>4 is tighter than $number>2, and $number>7 has increased. It is a condition.
そこで、ノード605に付加されているワーキングメモ
リエレメントの内、きつくなった条件$個数〉4、およ
び、増えた条件$個数く7を満足するものをノード80
3に付加する。Therefore, among the working memory elements added to the node 605, those that satisfy the tightened condition $number>4 and the increased condition $number>7 are added to the node 805.
Add to 3.
次に、データの付加方法の処理の詳細を、フローチャー
トを用いて説明する。Next, details of the data addition method will be explained using a flowchart.
第1図に、データの付加方法のメインフローを示す。ま
ず、複写元ノードの選出を行い(ステップ1)、複写元
があれば(同2)、複写元にあるワーキングメモリエレ
メントの内で複写先の方がきつい条件と増えた条件を満
足するものを選ぶ(同3)、そうでなければ、すべての
ワーキングメモリエレメントの内で複写先が満足すべき
すべ選んだワーキングメモリエレメントを複写先に付加
する(同5)。FIG. 1 shows the main flow of the data addition method. First, select a copy source node (step 1), and if there is a copy source (step 2), select one of the working memory elements in the copy source that satisfies the stricter conditions and increased conditions in the copy destination. If not, select working memory elements that satisfy the copy destination among all working memory elements and add them to the copy destination (same 5).
上記複写元の選出(ステップ1)の処理フローを、第9
図により説明する。The process flow of selecting the copy source (step 1) is explained in the ninth step.
This will be explained using figures.
複写元の終端ノードを順に取り出す(ステップ6)、取
り出せれば、複写元なしとする(同10)、取り出せな
ければ、取りだした終端ノードにある現状データが満足
している条件を順に取り出す(同7)、取り出せなけれ
ば、現在取りだした終端ノードを複写元とする(同11
)、取り出せれば、複写先の終端ノードに付加する現状
データが満足すべき条件を順に取り出す(同8)、取り
出せなければ、ステップ6へ戻る、取り出せれば、2条
件のきつさ判定を行う(同9)、2条件は同じ又は複写
先の方がきつければ、ステップ7へ戻る。2条件はこと
なる又は複写元の方がきつければ、ステップ8へ戻る。The terminal node of the copy source is retrieved in order (step 6). If it can be retrieved, it is assumed that there is no copy source (step 10). If it cannot be retrieved, the conditions that are satisfied by the current data in the retrieved terminal node are sequentially retrieved (step 6). 7), if it cannot be extracted, the currently extracted terminal node is used as the copy source (see 11).
), if it can be retrieved, then sequentially retrieve the conditions that the current data to be added to the end node of the copy destination should satisfy (see 8); if it cannot be retrieved, return to step 6; if it can be retrieved, determine the tightness of the two conditions. (Same as 9) If the two conditions are the same or the copy destination is better, the process returns to step 7. If the two conditions are different or if the copying source applies, the process returns to step 8.
次に、2条件のきつさ判定(ステップ9)の処理概略を
、例を用いて示す。Next, an outline of the process of determining the tightness of the two conditions (step 9) will be described using an example.
「〉2」と「〉4」といった2条件のきつさを判定する
。条件を判定する定義例であるすべての実数において「
〉4」が成り立つとき、「〉2」も成り立てば、「〉4
」の方がきつい条件であるといえる。ところが、すべて
の実数に関して調べることは不可能である。そこで、ま
ず、実数を、条件の中に含まれる定数である2と4に着
目して、以下のような区間に分割する。The severity of two conditions such as ">2" and ">4" is determined. For all real numbers, which are definition examples for determining conditions,
When 〉4'' holds true, if ``〉2'' also holds true, then ``〉4'' holds true.
' can be said to be a stricter condition. However, it is impossible to investigate all real numbers. Therefore, first, we focus on the constants 2 and 4 included in the condition and divide the real number into the following intervals.
区間1:2より小さい
区間2:2のみ
区間3:2より大きく4より小さい
区間4:4のみ
区間5:4より大きい
次に、それぞれの区間にある実数が条件を満たすかどう
か調べる。「〉2」を満たすのは区間3、区間49区間
5であり、「〉4」を満たすのは区間5のみである。「
〉4」を満たす区間は「〉2」をも満たすことにより、
「〉4」の方がきつい条件であると判定する。Only section 2:2 is smaller than section 1:2, section 3: is larger than 2 and smaller than 4, only section 4:4 is larger than section 5:4.Next, it is checked whether the real numbers in each section satisfy the conditions. Section 3, section 49 and section 5 satisfy ">2", and only section 5 satisfies ">4". "
The section that satisfies “〉4” also satisfies “〉2”,
It is determined that ">4" is a stricter condition.
次に、2条件のきつさ判定(ステップ9)の処理の詳細
を第10図のフローチャートを用いて説明する。Next, details of the process of determining the tightness of the two conditions (step 9) will be explained using the flowchart of FIG.
区間分割を行い(ステップ12)、すべての区間につい
てその区間にある数が条件を満足するかどうかを調べる
(同13)、すべての区間において条件の判定結果が同
じならば(同14)、2つの条件は同じとする(同17
)、そうでなければ、第一の条件が満足されるとき第二
の条件も満足するならば(同15)、第一の条件は第二
の条件よりきついとする(同18)、そうでなければ、
2つの条件は異なるとする(同16)。Perform interval division (step 12), check whether the numbers in that interval satisfy the conditions for all intervals (step 13), and if the judgment result of the condition is the same in all intervals (step 14), 2 The two conditions are the same (same 17
), otherwise, if the second condition is also satisfied when the first condition is satisfied (ibid. 15), then the first condition is stricter than the second condition (ibid. 18), then If not,
Assume that the two conditions are different (ibid. 16).
次に、区間分割(ステップ12)の処理フローを、第1
1図により説明する。Next, the processing flow of section division (step 12) is
This will be explained using Figure 1.
2条件中の定値を比べる(ステップ19)、異なるなら
ば、小さい方の定値を甲、大きい方を乙とする(同20
)、同じならば、定値を甲、甲より大きい任意の値を乙
とする(同21)、区間1を甲より小さい、区間2を甲
のみ、区間3を甲より大きく乙より小さい、区間4を乙
のみ、区間5を乙より大きいとする(同22)。Compare the fixed values under the two conditions (step 19), and if they are different, set the smaller fixed value as A and the larger one as B (step 19).
), if they are the same, set the fixed value as A and any value larger than A as B (same 21), section 1 is smaller than A, section 2 is only A, section 3 is larger than A and smaller than B, section 4 Assume that only B is larger than B, and section 5 is larger than B (same 22).
次に、区間分割(ステップ12)の別な方法の処理フロ
ーを、第12図により説明する。Next, the processing flow of another method of section division (step 12) will be explained with reference to FIG.
2条件中の定値を比べる(ステップ23)、異なるなら
ば、小さい方の定値を甲、大きい方を丙、甲と丙の間の
任意の値を乙とする(同24)、同じなら、定値を乙、
乙より小さい任意の前を甲、乙より大きい任意の値を丙
とする(同25)、区間1を甲より小さい、区間2を甲
のみ、区間3を甲より大きく乙より小さい、区間4を乙
のみ、区間5を乙より大きく丙より小さい、区間6を丙
のみ、区間7を丙より大きいとする(同26)。Compare the fixed values in the two conditions (step 23), if they are different, set the smaller fixed value as A, the larger one as C, and any value between A and C as O (step 24); if the same, set the fixed value. B,
Any value smaller than B is A, any value greater than B is C (same 25), section 1 is smaller than A, section 2 is only A, section 3 is larger than A and smaller than B, section 4 is For B only, section 5 is larger than B and smaller than C, section 6 is only C, and section 7 is larger than C (Same 26).
次に、区間分割(ステップ12)の更に別な方法の処理
フローを、第13図により説明する。Next, the processing flow of yet another method of section division (step 12) will be explained with reference to FIG.
第一の条件中の定植を乙とする(ステップ27)、乙と
第二の条件中の定値ヲ比べる(同23)、乙の方が大き
いならば、第2の条件中の定値を甲とし、乙より大きい
任意の値を丙とする(同29)、同じならば、乙より小
さい任意の値を甲、乙より大きい任意の値を丙とする(
同30)、乙の方が小さいならば、第2の条件中の定値
を丙とし、乙よ甲より小さい、区間2を甲のみ、区間3
を甲より大きく乙より小さい、区間4を乙のみ、区間5
を乙より大きく丙より小さい、区間6を丙のみ、区間7
を丙より大きいとする(同32)。Set the planting value under the first condition as B (step 27), compare the fixed value under the second condition with B (step 23), and if B is larger, set the fixed value under the second condition as A. , any value greater than B shall be C (same 29); if they are the same, any value smaller than B shall be A, and any value greater than B shall be C (
30), if B is smaller, the fixed value in the second condition is C, B is smaller than A, section 2 is only A, and section 3 is
is larger than A and smaller than B, section 4 is only B, section 5 is
is larger than B and smaller than C, section 6 is C only, section 7
is larger than C (ibid. 32).
上述のように、本実施例では、追加したルールに対する
ネットワークに付加すべきワーキングメモリエレメント
を、すでにワーキングメモリエレメントが付加されてい
るネットワークのデータを利用することにより付加する
。これにより、従来であれば、第4図で示した4個のワ
ーキングメモリエレメントを条件判定しなければならな
かったが、本実施例では第8図に示したように2個のワ
ーキングメモリエレメントの条件判定を行えば良く、デ
ータ付加処理時間を短縮できる。As described above, in this embodiment, the working memory element to be added to the network for the added rule is added by using the data of the network to which the working memory element has already been added. As a result, in the past, it was necessary to make conditional judgments on the four working memory elements shown in FIG. 4, but in this embodiment, two working memory elements as shown in FIG. It is only necessary to perform conditional judgment, and data addition processing time can be shortened.
また、推論システムの利用者がデバッガ302を通じて
、推論途中において一度推論を止めたうえで、ルールを
追加し、データを付加し、再び推論を再開することが本
実施例で示した方法を用いることにより可能となる。Furthermore, using the method shown in this embodiment, the user of the inference system can use the debugger 302 to stop inference once in the middle of inference, add rules, add data, and restart inference again. This becomes possible.
また、ルールの実行部で指定することにより推論途中で
新たなルールの追加を行うことが、本実施例で示した方
法により実現できる。Furthermore, the method shown in this embodiment allows the addition of a new rule during inference by specifying it in the rule execution unit.
また、本実施例では同一のネットワークでワーキングメ
モリエレメントの複写を行ったが、同様にして、異なる
ネットワーク間でもワーキングメモリエレメントの複写
を行える。Furthermore, although working memory elements are copied in the same network in this embodiment, working memory elements can be copied in the same way between different networks.
また、本実施例で示したデータ付加の処理は、ネットワ
ークの追加前や、ネットワークの追加と同時に行うこと
も同様に行える。Further, the data addition process shown in this embodiment can be similarly performed before adding a network or simultaneously with adding a network.
以上述べた如く、本発明によれば、追加されたルールに
対するネットワークのノードに付方Uするワーキングメ
モリエレメントを、他のネットワークのすでにノードに
付加されているワーキングメモリエレメントを利用して
得るので、すべてのワーキングメモリエレメントを調べ
る必要がなくなることにより、条件判定すべきワーキン
グメモリエレメント数が少なくなり、データ付加処理時
間の短縮という効果を奏するものである。As described above, according to the present invention, a working memory element to be attached to a node of a network for an added rule is obtained by using a working memory element already attached to a node of another network. Since it is no longer necessary to examine all working memory elements, the number of working memory elements to be subjected to condition determination is reduced, resulting in the effect of shortening data addition processing time.
第1図は、本発明の一実施例になるデータ付加方式処理
のメインフローを示す図、第2図は、実施例の推論シス
テムを示すブロック構成図、第3図は、実施例のCPU
203およびディスク204の機能ブロック図、第4図
は、ワーキングメモリエレメントの記述例を示す説明図
、第5図は、ルールの記述例を示す説明図、第6図は、
新たなルールを追加する前のネットワークを示す説明図
、第7図は、新たに追加するルールのネットワークを示
す説明図、第8図は、第6図で示したネットワークに第
7図で示したネットワークを付加して、かつ、データを
付加したネットワークを示した説明図、第9図は、第1
の詳細を示すフローチャート、第10図は、第9図の詳
細を示すフローチャート、第11図は、第10図の詳細
を示すフローチャート、第12図は、第10図の別な詳
細を示すフローチャート、第13図は、第10図の別な
詳細を示すフローチャートである。
1−32・・・処理ステップ、201・・・モニタ、2
02・・・キーボード、203・・・CPU、204・
・・ディスり、301・・・入出力部、302・・・デ
バッガ、303・・・エディタ、304・・・トランス
レータ、305・・・ネットワーク修正部、306・・
・推論部、307・・ルールファイル、308・・・ネ
ットワークファイル、309・・・ワーキングメモリエ
レメントファイル、401−404・・・ワーキングメ
モリエレメント、501−503・・・ルール、601
−605・・・ノード、701−704・・・ノード、
801−803・・・ノード。ン
区
\(
α)
嶋
α)FIG. 1 is a diagram showing the main flow of data addition method processing according to an embodiment of the present invention, FIG. 2 is a block diagram showing an inference system of the embodiment, and FIG. 3 is a CPU of the embodiment.
203 and the disk 204, FIG. 4 is an explanatory diagram showing an example of description of a working memory element, FIG. 5 is an explanatory diagram showing an example of rule description, and FIG.
An explanatory diagram showing the network before adding a new rule, Figure 7 is an explanatory diagram showing the network of the newly added rule, and Figure 8 is an explanatory diagram showing the network shown in Figure 6 to the network shown in Figure 7. FIG. 9 is an explanatory diagram showing a network with additional networks and data added.
10 is a flowchart showing details of FIG. 9, FIG. 11 is a flowchart showing details of FIG. 10, FIG. 12 is a flowchart showing other details of FIG. 10, FIG. 13 is a flowchart showing additional details of FIG. 1-32...Processing step, 201...Monitor, 2
02...Keyboard, 203...CPU, 204.
... Distortion, 301 ... Input/output section, 302 ... Debugger, 303 ... Editor, 304 ... Translator, 305 ... Network correction section, 306 ...
- Inference section, 307... Rule file, 308... Network file, 309... Working memory element file, 401-404... Working memory element, 501-503... Rule, 601
-605... Node, 701-704... Node,
801-803... Nodes. N Ward\( α) Shima α)
Claims (1)
の対からなる構造体データに関する複合的条件を、個々
の条件をノードとするネットワークで記憶し、該ネット
ワークの頂点ノードから逐次条件判定を行ない、ネット
ワーク上のあるノードまでの条件が全て成立した構造体
データを保持することにより構造体データに関する複合
的条件の成立判定を行う機能を持つシステムにおいて、 いくつかの構造体データについて既に条件判定し、条件
が成立した構造体データを保持している第一のネットワ
ーク、および第一のネットワークで条件判定した構造体
データをまだ条件判定していない第二のネットワークに
関して、第一のネットワーク上のノードが保持している
構造体データの満足している条件をSN1とし、第二の
ネットワーク上のノードが保持する構造体データの満足
すべき条件をSN2とし、SN1とSN2が特定の関係
であるとき、第一のネットワーク上のノードに付加され
ている構造体データSD1の内、特定のいくつかの条件
を満たす構造体データSD2を第二のネットワーク上の
ノードに付加することを特徴とする弁別ネットワークの
処理方法。 2、前記請求項1に記載のSN1とSN2がその順序も
含めて同じであり、SD2はSD1と同じであることを
特徴とする弁別ネットワークの処理方法。 3、前記請求項1に記載のSN1とSN2が条件の順序
に関係なくその条件の内容が同じであり、SD2はSD
1と同じであることを特徴とする弁別ネットワークの処
理方法。 4、前記請求項1に記載のSN1中の条件がすべてSN
2に含まれており、SD2はSD1のなかでSN1に含
まれていないSN2中の条件を満たすものであることを
特徴とする弁別ネットワークの処理方法。 5、前記請求項1に記載のSN1中の条件もしくはその
条件よりきつい条件がすべてSN2に含まれており、S
D2はSD1のなかでSN1に含まれていないSN2中
に条件とSN1に含まれている条件よりきついSN2中
の条件を満たすものであることを特徴とする弁別ネット
ワークの処理方法。 6、前記請求項1〜5において、第一のネットワークに
保持されている構造体データに利用できるものがない場
合、SD2をすべての構造体データのうちSN2を満た
すものとすることを特徴とする弁別ネットワークの処理
方法。 7、前記請求項1〜6において、第一のネットワークお
よび第二のネットワークのいずれか又は両方がそれぞれ
更に大きなネットワークの一部であることを特徴とする
弁別ネットワークの処理方法。 8、前記請求項1〜6において、第一のネットワークお
よび第二のネットワークが同一のネットワークの一部で
あることを特徴とする弁別ネットワークの処理方法。 9、連続量の開区間又は閉区間において、定値を基準と
した区間を表わす二つの条件間のきつさを、 条件に現れる定値のみを含む区間及びそれ以外の全区間
を含む重なりのない区間に分け、それぞれの区間にある
値がそれぞれの条件を満たすか否かを調べ、 すべての区間に対し同じ結果ならば二つの条件は同じで
あるとし、第一の条件が満たす区間はすべて第二の条件
が満たすならば第一の条件は第二の条件よりきついと判
断することを特徴とする条件のきつさの判定方法。 10、前記請求項9において、離散量でかつ全順序であ
る集合上の条件に関するきつさの判断を行なうことを特
徴とする条件のきつさの判定方法。 11、前記請求項9および請求項10において、開区間
上の値に関する条件の場合、無限小から二つの条件に現
われる定値のうち小さい方の手前までの区間、二つの条
件に現われる定値のうち小さい方のみを含む区間、二つ
の条件に現われる定値のうち小さい方の次から大きい方
の手前までの区間、二つの条件に現われる定値のうち大
きい方のみを含む区間、二つの条件に現われる定値のう
ち大きい方の次から無限大までの区間、といつた五つの
区間に分けることを特徴とする条件のきつさの判定方法
。 12、前記請求項11において、二つの条件に現われる
定値のうち小さい方の次から大きい方の手前までの区間
中に、二つの条件に現われる定値が同じときにその値の
みを含む区間を設け、三つの区間に分割し、全区間では
、七つに分割することを特徴とする条件のきつさの判定
方法。 13、前記請求項9または請求項10において、閉区間
上の条件の場合、最小値のみを含む区間、最小値の次か
ら二つの条件に現われる定値のうち小さい方の手前まで
の区間、二つの条件に現われる定値のうち小さい方のみ
を含む区間、二つの条件に現われる定値のうち小さい方
の次から大きい方の手前までの区間、二つの条件に現わ
れる定値のうち大きい方のみを含む区間、二つの条件に
現われる定値のうち大きい方の次から最大値の手前まで
の区間、最大値のみを含む区間、といつた七つの区間に
分けることを特徴とする条件のきつさの判定方法。 14、前記請求項13において、二つの条件に現われる
定値のうち小さい方の次から大きい方の手前までの区間
中に、二つの条件に現われる定値が同じときにその値の
みを含む区間を設け、三つの区間に分割し、全区間では
、九つに分割することを特徴とする条件のきつさの判定
方法。 15、前記請求項5〜8において、前記請求項9〜14
記載の条件のきつさの判定方法を用いることを特徴とす
る弁別ネットワークの処理方法。 16、前記請求項1〜8または請求項15記載の弁別ネ
ットワークの処理方法を用いて、まだ構造体データの条
件判定を行つていないネットワークに保持すべき構造体
データを付加することにより構造体データの条件判定を
行なうことを特徴とする構造体データ条件判別方法。 17、すでに構造体データの条件判定を行つている第一
のネットワークと、まだ条件判定を行つていない第二の
ネットワークに、前記請求項1〜8または請求項15記
載の弁別ネットワークの処理方法を用いて保持すべき情
報を付加し、その上で第一のネットワークと第二のネッ
トワークを合併することを特徴とするネットワークの合
併方法。 18、前記請求項17において、二つのネットワークを
合併しながら、第二のネットワークに保持すべき情報を
付加することを特徴とするネットワークの合併方法。 19、前記請求項17において、二つのネットワークを
合併した後に、第二のネットワークに保持すべき情報を
付加することを特徴とするネットワークの合併方法。 20、前記請求項17〜19記載のネットワークの合併
方法を用いて、構造体データの条件判定の結果により、
複合的条件を動的にネットワークに付加することを特徴
とするネットワークの動的変形方法。 21、前記請求項17〜19記載のネットワークの合併
方法を用いて、複合的条件もしくは条件部が複合的条件
であるルールのデバツガにおいて、複合的条件をネット
ワークに付加することを特徴とするデバツガにおけるネ
ットワークの変形方法。 22、前記請求項17〜19記載のネットワークの合併
方法を用いて、いくつかの複合的条件を表わすネットワ
ークを別のネットワークと合併することを特徴とするネ
ットワークの動的結合方法。[Claims] 1. Composite conditions regarding structure data consisting of a data name and at least one attribute name/attribute value pair are stored in a network in which each condition is a node, and the apex node of the network is In a system that has the function of determining the establishment of complex conditions related to structure data by sequentially performing condition judgments from 1 to 3 and retaining structure data in which all conditions are satisfied up to a certain node on the network, some structures Regarding the first network that has already made a conditional judgment on the data and holds the structure data for which the condition has been met, and the second network that has not yet made the conditional judgment on the structure data for which the condition has been judged in the first network. Let SN1 be the condition that the structure data held by a node on one network satisfies, and let SN2 be the condition that the structure data held by a node on the second network should satisfy, and SN1 and SN2 are When there is a specific relationship, among the structure data SD1 added to the node on the first network, structure data SD2 that satisfies some specific conditions is added to the node on the second network. A processing method for a discrimination network characterized by the following. 2. A discrimination network processing method, characterized in that SN1 and SN2 according to claim 1 are the same including their order, and SD2 is the same as SD1. 3. SN1 and SN2 according to claim 1 have the same content regardless of the order of the conditions, and SD2 is SD
1. A method for processing a discrimination network, characterized in that the method is the same as 1. 4. All conditions in SN1 according to claim 1 are SN
2, and SD2 satisfies a condition in SN2 that is not included in SN1 among SD1. 5. All conditions in SN1 according to claim 1 or conditions stricter than the conditions are included in SN2, and S
A discrimination network processing method characterized in that D2 satisfies a condition in SN2 that is not included in SN1 in SD1 and a condition in SN2 that is stricter than the condition included in SN1. 6. According to claims 1 to 5, if there is no structure data that can be used in the first network, SD2 is set to satisfy SN2 among all the structure data. How to process discrimination networks. 7. A method for processing a discrimination network according to any one of claims 1 to 6, characterized in that either or both of the first network and the second network are each part of a larger network. 8. A method for processing a discrimination network according to claim 1, wherein the first network and the second network are part of the same network. 9. In an open or closed interval of a continuous quantity, the tightness between two conditions representing an interval based on a constant value is divided into an interval containing only the constant value that appears in the condition and a non-overlapping interval containing all other intervals. If the results are the same for all intervals, then the two conditions are the same, and all intervals that satisfy the first condition are considered to be the same in the second. A method for determining the tightness of a condition, characterized in that if the condition is satisfied, the first condition is determined to be stricter than the second condition. 10. A method for determining the tightness of a condition according to claim 9, characterized in that the tightness of a condition on a set that is a discrete quantity and in total order is determined. 11. In claims 9 and 10, in the case of a condition regarding a value on an open interval, the interval from infinity to the smaller of the constant values appearing in the two conditions, the smaller of the constant values appearing in the two conditions. an interval that includes only the larger of the constant values that appear in the two conditions; an interval that includes only the larger of the constant values that appear in the two conditions; an interval that includes only the larger of the constant values that appear in the two conditions; A method for determining the tightness of a condition, which is characterized by dividing the method into five sections, such as the section from the next largest one to infinity. 12. In the above-mentioned claim 11, when the constant value appearing in the two conditions is the same, an interval is provided that includes only that value when the constant value appearing in the two conditions is the same, in the interval from the smaller one to before the larger one of the constant values appearing in the two conditions, A method for determining the tightness of a condition, which is characterized by dividing the method into three sections, and dividing the entire section into seven sections. 13. In the case of the condition on a closed interval, in the case of the condition on a closed interval, the interval including only the minimum value, the interval from the minimum value to the front of the smaller of the constant values appearing in the two conditions, and the interval between the two conditions. An interval that includes only the smaller of the constant values appearing in the condition, an interval from the smaller of the constant values that appear in the two conditions to just before the larger one, an interval that includes only the larger of the constant values that appear in the two conditions, A method for determining the severity of a condition, which is characterized by dividing the condition into seven sections, including the section from the larger constant value that appears in the condition to just before the maximum value, and the section that includes only the maximum value. 14. In claim 13, when the constant value appearing in the two conditions is the same, an interval is provided that includes only that value when the constant value appearing in the two conditions is the same, in the interval from the smaller one to before the larger one of the constant values appearing in the two conditions, A method for determining the tightness of a condition, characterized by dividing it into three sections, and dividing the entire section into nine sections. 15. In the claims 5 to 8, the claims 9 to 14
A method for processing a discrimination network, characterized in that the method for determining the severity of conditions described above is used. 16. By using the discrimination network processing method according to claims 1 to 8 or claim 15, structure data to be retained is added to a network that has not yet undergone condition determination for the structure data. A structure data condition determination method characterized by performing data condition determination. 17. The discrimination network processing method according to any one of claims 1 to 8 or claim 15 is applied to the first network that has already performed the condition determination of the structure data and the second network that has not yet performed the condition determination. A method for merging networks, characterized in that information to be held is added using a method, and then a first network and a second network are merged. 18. The network merging method according to claim 17, characterized in that while merging the two networks, information to be held in the second network is added. 19. The network merging method according to claim 17, characterized in that after merging the two networks, information to be held in the second network is added. 20. Using the network merging method according to claims 17 to 19, based on the result of condition determination of the structure data,
A method for dynamically deforming a network, characterized by dynamically adding complex conditions to the network. 21. Debugging hemlock for a complex condition or a rule whose condition part is a complex condition by using the network merging method according to claims 17 to 19, in which the complex condition is added to the network. How to transform the network. 22. A method for dynamically combining networks, characterized in that a network representing some complex conditions is merged with another network by using the method for merging networks according to claims 17 to 19.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1029799A JPH02210541A (en) | 1989-02-10 | 1989-02-10 | Discrimination network processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1029799A JPH02210541A (en) | 1989-02-10 | 1989-02-10 | Discrimination network processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02210541A true JPH02210541A (en) | 1990-08-21 |
Family
ID=12286053
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1029799A Pending JPH02210541A (en) | 1989-02-10 | 1989-02-10 | Discrimination network processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02210541A (en) |
-
1989
- 1989-02-10 JP JP1029799A patent/JPH02210541A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110264326B (en) | Method, device and equipment for identifying abnormal account set and risk account set | |
| CN109816032B (en) | Unbiased mapping zero sample classification method and device based on generative countermeasure network | |
| CN101076783B (en) | Execution of control tasks | |
| US5438511A (en) | Disjunctive unification | |
| CN114818973A (en) | Method, device and equipment for training graph model based on privacy protection | |
| Groote et al. | Modelling and analysing software in mCRL2 | |
| CN113407752B (en) | Graph database memory management method, system, electronic device and storage medium | |
| CN104915717A (en) | Data processing method, knowledge base reasoning method and related device | |
| US5301260A (en) | Inference processor using data consistency holder | |
| CN112883241A (en) | Supercomputer benchmark test acceleration method based on connected component generation optimization | |
| US8078564B2 (en) | Controlling forward chaining execution in a rules system | |
| CN116340581B (en) | Incremental meta-path storage and dynamic maintenance method and system | |
| Tani et al. | A reordering operation for an ordered binary decision diagram and an extended framework for combinatorics of graphs | |
| JP7427979B2 (en) | Adaptive data positional relationship learning device, adaptive data positional relationship learning method, and adaptive data positional relationship learning program | |
| CN119249215A (en) | Node classification and clustering method, device and equipment based on semantic information extraction | |
| Fonseca i Casas | Towards a representation of cellular automaton using specification and description language | |
| CN116974763A (en) | Data processing method, device, equipment and medium based on artificial intelligent model | |
| US20100050132A1 (en) | System and GUI for specifying composite predicates and dynamic systems | |
| CN114519432A (en) | Method for improving speed of embedded equipment for running machine learning model | |
| CN110162531A (en) | A kind of distribution concurrent data processing assignment decisions method | |
| CN111443943A (en) | Attribute dynamic configuration method based on rule engine | |
| US6173281B1 (en) | Method and computer program product for processing and combining data sets including bitmaps | |
| CN119292780B (en) | A data-oriented particle system task design and scheduling method and device | |
| WO2015045091A1 (en) | Method and program for extraction of super-structure in structural learning of bayesian network | |
| Mrena et al. | Experimental Survey of Algorithms for the Calculation of Node Traversal Probabilities in Multi-valued Decision Diagrams |