Development and implementation of expert database

zhaozj2021-02-11  270

Development and implementation of expert database

Qi Yudong Li Yibo

Traditional database systems lack knowledge, only static data can be handled; and the narrow expert system

The application field and the existing database cannot be accessed, and the effective application of the expert system is broken. number

According to the limitations of the two fields of library and artificial intelligence, they have prompted the two to take short,

Develop together. This is the generation of expert database EDS (Expert Database Syst EM) and

The reason for development. Usually, we have both database management functions and interpretation skills,

A database system for a number of good performance in the expert system, called an expert database. EDS base

This idea is the expert system ES mainly based on knowledge expression and knowledge processing.

) Technology introduces traditional databases to make them organically combined to develop facilities for sharing information.

The problem solving system for knowledge processing. Currently, EDS mainly uses systematic coupling - "fastening coupling"

And "loosely coupled" is achieved. Tightening the rules management system into DBMS to make DBM

S Manage both databases and management rules libraries. This method has great difficulty. And loosely coupled

Refers to a ready-made expert system shell and an off-the-shelf dbms as two separate subsides.

Combine together, they manage the rules and databases separately. Take a loosely coupled to achieve strategy

You can give full play to all the features of the original system without any change in the original system.

move. It only needs to design an efficient, flexible interface module that connects ES / DBMS to coordinate two

The work of the person, so it has a short time, it is quick.

First, the system structure of the fault diagnosis expert system

In the development of the fault diagnosis system HF-2000, we have adopted a loosely coupled strategy.

Troubleshooting Expert Database System. The system is a generating system with depth excellent

First strategy as its control strategy. The system rooted in the W Indows platform, using an object-oriented

Program design technology and advanced database technology; in the database end, we use SE

RVER / Client mechanism of MS SQL database technology. In the reasoning control, use Visual

C is programmed to implement a thrust machine. The interface between the throttle and the database is connected

The ODBC API is directly adjusted to implement access to the database. The construction model of this system is

The database is a configuration form of the carrier, and the system mechanism is shown in 1. figure 1

The knowledge acquisition structure in Figure 1 is responsible for establishing, modifying and expanding each database; interpretation organization

Used to make a solution process

The instructions indicate the reason for solving success or fail, and answers the issues raised by the user. thing

Real library is used to store the original facts and intermediate results of the input; the Dictionary library is used to store the rules

Real basic definition and explanation; rule library is used to store rules; trash cans are used to store reasoning

The reasoning the reason for the reason.

Second, the rules and database design

1. Model for generating rules

The general form of the rules is:

IF Then

It indicates that when is established, the credibility of is obtained.

Promotion> is the form of facts or assertions. Refer to Figure 2 for the rule model in this system.

2. Fact Library

Structure: Fact_DB (Fact_ID, Rank, NO)

Uses: Store the original facts, intermediate results, and final results.

Where: Fact_ID is the factual FACT code; RANK is used to represent the system specific part,

For example, "magnify", "slot", etc.; NO represents the number of components in a particular portion; such as "1" table

A "slot" portion 1 is tube, "2" means "slot" portion 2 tube, etc.

3. Dictionary library

Structure: DICT_DB (FAC_ID, Component, Appear, Why, KNown)

Uses: Prerequisites and conclusions in the regular library and its encoding.

Where: Fact_ID is the factual code; Component is part name; APPEAR is the FAC

T_ID's natural language interpretation; KNOWN is used to indicate that the fact is known or unknown to prevent it from breaking

Repeated date of interest.

4. Rules Library

The rule library includes four tables (Table), which are rule front libraries (pre_table),

Activated rule front library (Active_PRE TABLE), Rules Background Library (ACT_TABLE)

And the activated rule rear library (Active_ACT_TAB Le).

figure 2

(1) Rules Previous Library

Structure: pre_table (rule_name, fact_id)

Uses: Prerequisites for storing each rule.

Where: rule_name is a rule name; Fact_ID is a and condition for the rule_name rule; the N and conditions of a rule have n to have n to records the rules in the library.

(2) Activated rule front library

Structure: ACTIVE_PRE_TABLE (Fact_ID, Rank, NO)

Uses: Store active prerequisites to avoid repetition matching of the regulations

.

Where: Fact_ID is a rule of the rule_name rule; Rank is used to represent the system

A particular portion; NO represents the number of components in a particular portion.

(3) Rules rear library

Structure: ACT_TABLE (rule_name, fact_id, num, num 2)

Uses: The result of the corresponding to the rules.

Where: rule_name is the rule name; Fact_ID is the result of rule_name rules; NUM

Indicates the number of prerequisites for this rule; NUM2 is the auxiliary value of the NUM field.

(4) Activated rule rear library

Structure: active_act_table (rule_name, rank, no)

Uses: Store activated backs to avoid repetition of the conclusions of the rules.

Where: rule_name is the rule name; Rank is used to represent the system specific part; no representation

Number of components in the portion.

5. Trash can

Structure: Garbage_bin_db (Fact_ID, Rule_Name, pre_num)

Uses: Record the reasons for cutting the dead leaves.

Where: Fact_ID is the factual code; rule_name is the rule name applied to this node, P

RE_NUM is the number of prerequisites that actually matches.

Third, the design of the control mechanism

We have implemented a reverse reinforcing machine with depth priority strategy with a C language. whole

A reasoning process. It is the source program of a process of searching for the long branches of the tree.

under:

Int ccause :: RTREE * RTREE

{

Rule prule, rule;

Int ruleflag;

While (1) {

While (true) {

IF (RTREE- Choose Rule) == 1

{

/ / Select the rules for the current leaf node

Rtree- Sctact (prule);

// put the current application rule into the activated rule table AR

Ruleflag = 1;

Break;

}

Else {

Ruleflag = 0; // If there is no rule, set the failed flag

IF (depth return 0;

Else {

Rtree- Clipbranch (depth -; path ); // Cut the dead branch

IF (DEPTH! = 0)

Return 0;

// If it is not a tree root, return a failed flag; otherwise continue reasoning

}}}

Rtree- setleaf (& prule);

// Set the first premise as the current leaf node

DEPTH ;

While (1) {

Int isucc = 0;

ISUCC = RTREE- SuccessDirect ();

// Is the fact that the fact is immediately established

IF (isucc == 0)

{

// If there is no corresponding fact in the fact library and the node is not a component, search rules

While (1) {

IF (RTREE- Choose Rule (& Rule) == 1)

{

// Search the rules corresponding to the current leaf node

Ruleflag = 1;

IF (backreason (rtree) == 1)

{

// If the fact is established, the next premise is calculated;

Otherwise choose the next rule reasoning

Rtree undersuccess ();

// The fact is established, reset the current premise as the current leaf node

Break;}}

Else {

Ruleflag = 0; // If there is no rule, set the failed flag

Break;}}}

IF (isucc == 1) {// If the truth is not established, set the failed flag

Ruleflag = 0;

Break;

IF (Ruleflag == 0)

// The current application rule fails, select the next rule reasoning

Break;

Else {

IF (prule.num == prule.num2) // The last premise is successful, and it is said that there is still a premise that there is no evidence.

Break: // If you don't quit the loop

Else

Rtree- setleaf (& prule);

// If there is, set this precondition as the current leaf node

}

IF (ruleflag == 1) {

RTREE- ProduceneWFACT ();

// If the truth is successful, it adds this fact.

Return 1;

// Return success mark

}}}

(Author Address: Graduate team of Shandong Yantai Navy Aviation Engineering, 264001)

转载请注明原文地址:https://www.9cbs.com/read-4021.html

New Post(0)