Recently has been studying case reasoning, see a lot of papers are talking about the theory of CBR, is very worship. However, there has been a problem has not been understood, that is, cases (case) in the end is how to store it.
The masters of CBR, such as Schank, Koldner and so on, generally use dynamic storage model, such as the Memory model, such as Ray Bareiss, the category & case models are generally used (the Category & Exemplar Model), Professor Prof. Zhongzhi Shi of the Chinese Academy of Sciences has also put forward his own one due to the development of the network approach. Masters of the realm is not my one AI rookie can understand, the masters of the method is not I can master. Fortunately, there are several papers at home and abroad are relatively simple, said that you can use relational database to store, a stroke, is very chic, but I was more confused.
Half a month confused, in the third chapter of "AI Foundation" (Higher Education Press, 2002), Professor Gaozi and so on, this paper also gives the method of how to convert the semantic network into the first-order predicate representation, so it has the "EMC-CBR Fault Diagnosis Research (i.)" The results in a paper. But how is the first-order predicate logic stored in the database?
On the 122th page of the foundation for Artificial intelligence, the author presents a simple semantic network and a first-order predicate representation of the semantic network, which describes a method of storing predicates as columns of data tables. But there is a problem with this method, reasoning once the semantic network is complex (the semantic network representation of any problem in the problem is complex), the columns in the datasheet will swell rapidly; the more serious problem is that the number of predicates used to describe the case is indeterminate for different EMC failure cases. Therefore, the number of columns in the datasheet cannot be determined, which is not possible in a relational database. I am lost again.
God bless us. Finally came up with a storage method today. The idea is to store the first-order predicate as an object. The properties of the first-order predicate can be used as columns in the datasheet, while the predicate function and the predicate's arguments are stored as rows. The table is designed as follows:
CBR table
Column number
|
Column Name
|
Data type
|
whether to NULL
|
Description
|
1 |
Predicate_no |
smallint |
Not Null |
predicate number, primary key, logo, seed 1, increment 1 |
2 |
Case_no |
varchar (15) |
Not Null |
Case number, generally case+ number |
3 |
predicate |
varchar (30) |
Not Null |
Predicate |
4 |
Predicate_property |
varchar (30) |
Not Null |
predicate properties, values range Fault_character, phisical_structure, causation, settlement |
5 |
Param_nums |
tinyint |
Not Null |
The number of predicate arguments, with a value range of 1 or 2, and a default of 2 |
6 |
param1 |
varchar (50) |
Null |
The first argument of a predicate function |
7 |
Is_param1_digit |
Bit |
Null |
PARAM1 is a numeric type, default 0 |
8 |
Param1_unit |
varchar (8) |
Null |
param1 unit, if param1 is a numeric type, the item is generally NOT NULL |
9 |
Param2 |
varchar (50) |
Null |
The second argument of a predicate function |
10 |
Is_param2_digit |
Bit |
Null |
Param2 is a numeric type, default 0 |
11 |
Param2_unit |
varchar (8) |
Null |
Param2 unit, if param2 is a numeric type, the item is generally NOT NULL |
12 |
Has_sub_predicate |
Bit |
Null |
Whether the predicate function takes another predicate as an argument, and defaults to 0 |
13 |
Sub_predicate_no |
smallint |
Null |
The number of the predicate as a parameter |
This case library is implemented using SQL Server2005 Express Edition:
If you want to query the physical structure characteristics of eut in case 6, you can use the following query statement:
SELECT predicate, param1, param2
From Cases
WHERE (predicate_property = ' phisical_structure ') and (case_no = ' case6 ')
The results of the query are as follows:
"Note": Copyright is owned by the author, reproduced or cited please indicate the source.