原理是程序与知识库分开,通过程序调用知识库,并能修改知识库的内容,由于本人第一次尝试专家系统设计,对如何分开知识库和程序并不十分了解,而且知识库的更新也仅限于一小部分程序中,由于我以后的研究方向可能是人工智能方向,所以一定能在未来内学到更深入的方法。
2.实现过程原始化
在编写代码的过程中,发现大部分代码都是IF...ELSE...语句不免让人觉得过于简单,现代专家系统绝大部分采用了神经网络和BAYES模糊推理的方法,在这个方面可以加以改进。
3.知识提取不全面
在提取糖尿病知识中,对医学知识的缺乏,无法完整的提取出推理策略,比如慢性病诊断中,只是简单的推理有某些症状就能得出某个结论。
致 谢
即将走完大学的历程,在此,我首先要向我的指导老师沈丽容老师表示最真挚的谢意。无论在毕业设计阶段还是在参加实习阶段,我都得到了何老师学习上的指点和生活上的关心。在我论文的前期准备、实验和写作过程中,何老师坚持每个星期抽出固定时间为我们解决阶段性的问题,并且花费了很多的精力来指导和点拨,提出了许多极有价值的意见和建议,使我在毕业设计的完成过程中少走了很多弯路,并如期的完成了我的论文。他严谨的治学态度,真诚的待人处事方式,我始终印象深刻,也是我今后治学、为人的榜样。对于他的鼓励和教诲,我将终生铭记。
衷心感谢我的同学,在这期间能及时地交换各种意见,提出了不少有益的见解。
参考文献
[1] 郭宝利编著.PowerBuilder8.0完全解析.北京:电子工业出版社.2002
[2] 樊金生等编著.PowerBuilder8.0实用教程.北京:科学出版社.2003
[3] 何旭洪,余建英编著.PowerBuilder数据库系统开发实例导航.北京:人民邮电出版社2003.6
[4]黄厚宽,田胜风著.人工智能.电子工业出版社.2004
[5]武波,马玉祥.专家系统.北京理工大学出版社.2000
[6]超楚生.内分泌学.北京:人民卫生出版社.2001
[7]王士同.人工只能教程.北京:电子工业出版社.2002
[8]林尧瑞,张钹,石纯一.专家系统原理与实践.清华大学出版社.2001
[9]P.H温斯顿蓍傀光南,周少柏译.人工智能.科学出版社.2003
[10]Anderson,P.F.ExpertSystems,Expertise,andtheLibraryandInformationProfessions.LibraryandInformationScienceResearch10,no.4(Oct-Dec1988)
附录
程序1糖尿病初步诊断第一个窗口w_first_checked
cb_1代码
realbayes=0.0
stringnofeture
ifcbx_1.checked=truethen
realp_d_t=0.5//患糖尿病有三多一少症状的概率
realp_dn_t=0.04//不患
realt//患三多一少的概率
realp_t_d//三多一少条件下糖尿病概率
t=p_d*p_d_t+p_dn*p_dn_t
p_t_d=p_d_t*p_d/t
bayes=bayes+p_t_d
messagebox("提示","你换糖尿病概率为"+left(STRING(bayes),5))
syms=syms+"三多一少症状"
else
messagebox("提示","您无明显的糖尿病症状是否继续")
nofeture="您无明显的糖尿病症状是否继续"
endif
ifcbx_2.checked=truethen
realp_d_y=0.8//换糖尿病视力模糊
realp_dn_y=0.4//不患
realeye//视力模糊的概率
realp_y_d
eye=p_d*p_d_y+p_dn*p_dn_y
p_y_d=p_d_y*p_d/eye
messagebox("提示","您患糖尿病概率为"+left(string(p_y_d),5))
bayes=bayes+p_y_d
syms=syms+""+"视力模糊"
endif
ifcbx_3.checked=truethen
realp_d_h=0.78
realp_dn_h=0.2
realhurt
realp_h_d
hurt=p_d*p_d_h+p_dn*p_dn_h
p_h_d=p_d_h*p_d/hurt
bayes=bayes+p_h_d
messagebox("提示","您患糖尿病概率为"+left(string(p_h_d),5))
syms=syms+""+"创口久不愈合"
endif
ifcbx_4.checked=truethen
syms=syms+"体重减少"
endif
ifcbx_5.checked=truethen
syms=syms+"皮肤骚痒"
endif
ifsyms=""then
messagebox("提示","您没以下症状如要想要继续请点下一步")
endif
opensheet(w_first_history,w_main,3,original!)
程序2既往史代码
ifcbx_1.checked=truethen
history=history+"高血压"
endif
ifcbx_2.checked=truethen
history=history+""+"饮食不均"
endif
ifcbx_3.checked=truethen
history=history+""+"酗酒"
endif
ifcbx_5.checked=truethen
history=history+"肾上腺、垂体、有无手术史"
endif
opensheet(w_third_bloodchecked,w_main,3,original!)
close(parent)
程序3测量血糖w_bloodchecked代码
cb_1代码
blood=REAL(trim(sle_1.text))
ifrb_pre.checked=truethen
ifblood>=3.9andblood<=5.9then
messagebox("提示","您的血糖正常但请继续做口服葡萄糖检测")
opensheet(w_third_blood_oggt,w_main,3,original!)
endif
ifblood>=6.0andblood<=6.9then
messagebox("提示","您的血糖异常,请继续做口服葡萄糖检测")
opensheet(w_third_blood_oggt,w_main,3,original!)
endif
ifblood>=7.0then
messagebox("警告","有糖尿病危险请再测一次")
sle_2.setfocus()
rb_pre.checked=false
endif
elseifrb_aft.checked=truethen
ifblood>=3.9andblood<=7.8then
messagebox("提示","您的血糖正常但请继续做口服葡萄糖检测")
opensheet(w_third_blood_oggt,w_main,3,original!)
endif
ifblood>=7.9andblood<=11.0then
messagebox("提示","您的血糖异常,请继续做口服葡萄糖检测")
opensheet(w_first_check,w_main,3,original!)
endif
ifblood>=11.1then
messagebox("警告","有糖尿病危险请再测一次")
sle_2.setfocus()
rb_pre.checked=false
endif
endif
cb_2代码blood=real(trim(sle_2.text))
ifrb_pre.checked=truethen
ifblood<7.0then
messagebox("提示","与前一次测量有误差请重新测量")
rb_pre.checked=false
sle_1.setfocus()
sle_1.text=""
sle_2.text=""
else
ifblood>7.1andblood<15.0then
messagebox("提示","您有糖尿病请往下继续分型")
status="饭前"
opensheet(w_fouth_kind_second,w_main,3,original!)
else
ifblood>15.0then
integerNet
Net=MessageBox("Result","您的血糖过高建议进行急性诊断",&
Exclamation!,OKCancel!,2)
IFNet=1THEN
opensheet(w_dka_first,w_main,3,original!)//ProcessOK.
ELSE
opensheet(w_fouth_kind_second,w_main,3,original!)
//close(parent)
ENDIF
endif
endif
endif
elseifrb_aft.checked=truethen
ifblood<11.0then
messagebox("提示","与前一次测量有误差请重新测量")
rb_aft.checked=false
sle_1.setfocus()
sle_1.text=""
sle_2.text=""
else
status="饭后"
messagebox("提示","您有糖尿病请往下继续分型")
opensheet(w_fouth_kind_second,w_main,3,original!)
endif
endif
程序4糖尿病结论w_last_result
ifb_ins>8then
ifbmi>23.1then
ifb_oggt<>0then
result="敬爱的"+pname+"用户您在"+string(today())&
+"使用本系统,您有"+syms+"症状,"+"您有"+history+"病史,"&
+"您的"+status+"血糖="+string(blood)+"mmol/l,您继续测量的葡萄糖耐糖检测为"+string(b_oggt)+"mmol/l,您的真胰岛素INSC肽化验"+string(b_ins)&
+"mmol/l,值"+ins_st+"您的GAD为阴性继续测量体重值为"+string(bmi)+weight+"所以推断"+"您患二型糖尿病"
else
result="敬爱的"+pname+"用户您在"+string(today())&
+"使用本系统,您有"+syms+"症状,"+"您有"+history+"病史,"&
+"您的"+status+"血糖="+string(blood)+"mmol/l,"+"您的真胰岛素INSC肽化验"+string(b_ins)&
+"mmol/l,值"+ins_st+"您的GAD为阴性继续测量体重值为"+string(bmi)+weight+"所以推断"+"您患二型糖尿病"
endif
elseifbmi<=23.0then
p_type1=0.3
p_type2=0.7
ifb_oggt<>0then
result="敬爱的"+pname+"用户您在"+string(today())&
+"使用本系统,您有"+syms+"症状,"+"您有"+history+"病史,"&
+"您的"+status+"血糖="+string(blood)+"mmol/l,您继续测量的葡萄糖耐糖检测为"+string(b_oggt)+"mmol/l,您的真胰岛素INSC肽化验"+string(b_ins)&
+"mmol/l,值"+ins_st+"您的GAD为阴性继续测量体重值为"+string(bmi)+weight+"您患二型糖尿病"
else
result="敬爱的"+pname+"用户您在"+string(today())&
+"使用本系统,您有"+syms+"症状,"+"您有"+history+"病史,"&
+"您的"+status+"血糖="+string(blood)+"mmol/l,"+"您的真胰岛素INSC肽化验"+string(b_ins)&
+"mmol/l,值"+ins_st+"您的GAD为阴性继续测量体重值为"+string(bmi)+we
上一篇:
PB科研管理系统pb(论文和程序).SQL
下一篇:
试析影响公路路面平整度的因素及应采取的施工措施