@startuml interface IProcessor class processor implements IProcessor class searcher processor --> searcher class car_searcher processor --> car_searcher abstract class srv_base class event_looper extends srv_base event_looper --> "1" IProcessor abstract class tcp_client { abstract function remote_addr; } class search_client extends tcp_client class relation_client extends tcp_client class factory_client extends tcp_client class room_client extends tcp_client class one_one { public function add($key,$val) public function get($key) } note bottom of one_one : 单个Key获取单个值 class one_multi { public function add($key,$val) public function get($key) } note bottom of one_multi : 一个Key获取多个值 class indexer { public function parase($words,$value) public function find($key) public function name($val) } class brand_dict extends indexer class category_dict extends indexer class goods_dict extends indexer class special_dict extends indexer searcher --> "1" brand_dict searcher --> "1" category_dict searcher --> "1" goods_dict searcher --> "1" special_dict searcher --> "1" valtokey car_searcher --> "1" brand_dict car_searcher --> "1" category_dict car_searcher --> "1" goods_dict car_searcher --> "1" special_dict car_searcher --> "1" valtokey brand_dict --> "1" one_one goods_dict --> "1" one_one special_dict --> "1" one_one category_dict --> "1" parent_sub_tree brand_dict --> "1" one_multi category_dict --> "1" one_multi note top of indexer : 添加句子自动分词,\n建立和值之间的关系,\n然后通过字获取值,\n也可通过值获取原始词 class valtokey { public function add($key,$val) public function finish() public function findless($val,$start,$length) public function findall($val) } class parent_sub_tree { public function add($id,$pid) public function is_parent($hot) public function subs($hot) } note bottom of parent_sub_tree : 将父子关系表达为一维hash结构 class word_segment indexer --> word_segment note bottom of word_segment : 过滤掉一些符号字符,中文按字组织,英文凑成词组织 @enduml