首页 理论 架构 工程 文档 白皮书 著作 研究 案例 下载 博客 关于 开始使用 →

第258章 Cognitive Interface|认知界面

第258章 Cognitive Interface|认知界面

258.1 提出背景

第257章建立了 Smarty Template|Smarty模板,解决了ICAI认知系统内部数据向Web页面表现层转换的问题。

但是,Smarty主要解决的是:

机器认知状态如何被显示出来。

而一个完整的机器认知系统还需要解决另一个问题:

人或者其他软件系统如何与机器认知结构发生交互。

因此,本章建立:

Cognitive Interface|认知界面

认知界面不是普通的网页界面,也不是简单的按钮、表单和菜单集合。

它的核心任务是建立:

Human / External System → Cognitive System

以及:

Cognitive System → Human / External System

之间的结构化交互通道。

因此,认知界面位于:

Human
↓
Cognitive Interface
↓
Controller
↓
Cognitive System
↓
Object / Scene / Cognition / Behavior
↓
Action / Device

同时又存在反向信息流:

Device / Cognition / Behavior
↓
Controller
↓
Cognitive Interface
↓
Human

由此,ICAI从“机器内部认知系统”进一步形成“可交互认知系统”。


258.2 Cognitive Interface 的定义

Cognitive Interface|认知界面是机器认知系统与外部主体之间进行认知信息输入、认知状态查询、目标输入、行为控制、执行观察和反馈交互的结构化接口。

可以定义:

CIt=F(It,Ot,Ct,Rt)CI_t=F(I_t,O_t,C_t,R_t)

其中:

  • CItCI_t:时间 tt 的认知界面状态;
  • ItI_t:外部输入 Input;
  • OtO_t:系统输出 Output;
  • CtC_t:当前认知状态 Cognitive State;
  • RtR_t:交互结果 Interaction Result。

认知界面的核心不是“显示”。

而是:

Input→CognitionInput\rightarrow Cognition

以及:

Cognition→OutputCognition\rightarrow Output

最终形成:

Input→Interface→CognitiveSystem→Interface→OutputInput \rightarrow Interface \rightarrow Cognitive System \rightarrow Interface \rightarrow Output


258.3 Cognitive Interface 与普通用户界面的区别

普通用户界面通常围绕:

页面
按钮
菜单
表单
数据
操作

进行设计。

而认知界面围绕:

目标
对象
属性
状态
场景
关系
认知
行为
动作
设备
反馈

进行组织。

因此:

UI≠CognitiveInterfaceUI\neq CognitiveInterface

UI主要回答:

用户如何操作软件?

Cognitive Interface进一步回答:

用户如何向机器提供目标、对象、场景和控制信息,并观察机器当前的认知过程?

例如普通界面可能只有:

[启动]
[停止]
[执行]

而认知界面可以表现:

当前目标
↓
当前场景
↓
识别对象
↓
对象属性
↓
对象状态
↓
对象关系
↓
当前认知
↓
当前行为
↓
当前动作
↓
当前设备
↓
执行状态
↓
反馈结果

因此,认知界面是机器认知结构的外部交互表现。


258.4 Cognitive Interface 的基本组成

ICAI认知界面可以建立以下结构:

Cognitive Interface
│
├── Input Interface
│
├── Goal Interface
│
├── Object Interface
│
├── Scene Interface
│
├── Cognition Interface
│
├── Behavior Interface
│
├── Action Interface
│
├── Device Interface
│
├── Feedback Interface
│
└── State Monitor

其中:

Input Interface|输入界面

接收外部输入。

Goal Interface|目标界面

向系统提供目标。

Object Interface|对象界面

观察和管理对象信息。

Scene Interface|场景界面

观察当前场景结构。

Cognition Interface|认知状态界面

观察机器当前认知。

Behavior Interface|行为界面

观察和控制行为过程。

Action Interface|动作界面

观察当前动作。

Device Interface|设备界面

观察设备运行状态。

Feedback Interface|反馈界面

观察执行反馈。

State Monitor|状态监控器

综合表现整个认知系统当前运行状态。


258.5 认知界面的输入

认知界面首先需要解决:

外部主体向机器输入什么?

输入不应该只有字符串。

在ICAI结构中,输入可以对应不同认知元素。

例如:

Input
├── Goal
├── Object
├── Attribute
├── State
├── Scene
├── Method
├── Behavior
├── Action
└── Control

例如用户输入一个目标:

Goal = MoveObject

系统接收到的不是单纯文字,而是一个结构化目标对象。

可以表示:

G=(ID,Type,Target,Condition)G=(ID,Type,Target,Condition)

其中:

  • IDID:目标标识;
  • TypeType:目标类型;
  • TargetTarget:目标对象;
  • ConditionCondition:完成条件。

于是:

External Input
↓
Goal Object
↓
Controller
↓
Cognitive System

258.6 Goal Interface|目标界面

目标是机器行为产生的重要条件。

因此认知界面需要允许外部主体提供或者修改目标。

例如:

目标:
移动对象

目标对象:
Object_001

目标位置:
Position_002

完成条件:
Object_001.position = Position_002

系统接收以后:

Goal Interface
↓
Goal Object
↓
Cognitive Model
↓
Behavior Model

因此:

Goalinput→CognitiveModelGoal_{input}\rightarrow CognitiveModel

目标进入机器认知系统后,才能影响行为产生。


258.7 Object Interface|对象界面

对象界面用于表现当前机器认知系统中的对象。

例如:

Object
├── ID
├── Class
├── Type
├── Attributes
├── Relations
├── State
├── Position
└── Timestamp

界面可以显示:

Object: object_001
Class: Container
Position: (x,y,z)
State: Stable
Weight: ...
Distance: ...

这些数据来自:

Object Model

而不是由Smarty或者认知界面重新计算。

因此:

Object Model
↓
Controller
↓
Cognitive Interface
↓
Object View

258.8 Scene Interface|场景界面

场景界面负责表现当前Scene Model。

例如:

Scene
├── Environment
├── Space
├── Objects
├── Relations
├── States
├── Time
└── Goal

其核心不是显示一张静态图片,而是表现:

当前机器认为世界中存在什么,以及这些对象之间处于什么结构关系。

例如:

Object A
   ↓
Relation
   ↓
Object B

Object A
   ↓
State
   ↓
Contacting

因此Scene Interface可以成为机器当前场景结构的外部观察窗口。


258.9 Cognition Interface|认知状态界面

这是认知界面最核心的部分之一。

系统应该允许观察:

Current Goal
Current Scene
Current Objects
Current Relations
Current States
Current Cognition
Current Method
Current Behavior
Current Action

例如:

Cognitive State

Goal:
Grasp Object

Scene:
Object_001 + Robot_001

Object State:
Stable

Relation:
Robot Near Object

Cognition:
Object is reachable

Method:
GraspMethod

Behavior:
Grasping

Action:
Move Gripper

这样用户观察的已经不是普通业务数据。

而是:

机器当前的认知结构。


258.10 Behavior Interface|行为界面

行为界面用于观察Behavior Model的动态变化。

例如:

Behavior
↓
Approaching
↓
Contacting
↓
Grasping
↓
Holding
↓
Completed

界面可以表现:

Goal
Current Behavior
Behavior State
Current Method
Current Action
Parameters
Feedback
Result

因此行为界面可以显示:

Bt→Bt+1→Bt+2B_t\rightarrow B_{t+1}\rightarrow B_{t+2}

用户可以观察行为从一个状态进入另一个状态。


258.11 Action Interface|动作界面

Behavior产生具体Action。

因此可以单独表现当前动作:

Action
├── ID
├── Type
├── Target
├── Parameters
├── Start Time
├── State
├── Result
└── Feedback

例如:

Action:
Move

Target:
Object_001

Position:
(x,y,z)

Velocity:
v

State:
Running

这样能够区分:

Behavior≠ActionBehavior\neq Action

行为是过程。

动作是过程中的具体执行单元。

认知界面必须保持这一结构区别。


258.12 Device Interface|设备界面

设备界面表现Device Model和Device Engine的运行状态。

例如:

Device
↓
Capability
↓
State
↓
Parameter
↓
Constraint
↓
Execution
↓
Feedback

界面可以显示:

Device:
Robot Arm 01

State:
Running

Capability:
Position Control
Force Control
Gripper Control

Current Action:
Grasp

Parameter:
Force = ...
Velocity = ...

Execution:
Running

因此,用户可以观察:

机器认知系统当前通过什么设备执行什么动作。


258.13 Feedback Interface|反馈界面

设备执行以后会产生反馈。

反馈必须重新进入认知系统。

因此界面可以表现:

Action
↓
Device
↓
Execution
↓
Feedback

例如:

Feedback

Position:
Changed

Force:
Increased

Contact:
Detected

Device State:
Running

然后:

Feedback
↓
State Update
↓
Scene Update
↓
Cognitive Update

因此反馈界面不仅是日志显示。

它实际上可以让用户观察:

世界变化以后,机器认知如何继续更新。


258.14 Cognitive Interface 的双向结构

认知界面形成双向信息结构:

        Human
          ↕
Cognitive Interface
          ↕
      Controller
          ↕
   Cognitive System
          ↕
   Physical System

向下:

Human→Interface→CognitiveSystemHuman\rightarrow Interface\rightarrow CognitiveSystem

向上:

PhysicalSystem→CognitiveSystem→Interface→HumanPhysicalSystem\rightarrow CognitiveSystem \rightarrow Interface\rightarrow Human

因此认知界面成为机器认知系统的外部边界。


258.15 Cognitive Interface 与 Controller

认知界面本身不应该直接调用底层Engine。

正确结构:

Cognitive Interface
↓
Controller
↓
Engine
↓
Model

例如用户点击“执行行为”:

User
↓
Behavior Interface
↓
BehaviorController
↓
BehaviorEngine
↓
Action
↓
DeviceEngine

用户并不直接调用:

$deviceEngine->execute();

而是:

Interface
↓
Controller
↓
Behavior Engine
↓
Action
↓
Device Engine

这样才能保持MVC架构的层次边界。


258.16 Cognitive Interface 与 Smarty

第257章的Smarty Template是认知界面的重要实现技术。

关系可以表示为:

Cognitive Model
↓
Controller
↓
Cognitive Interface
↓
Smarty Template
↓
HTML

因此:

Smarty⊂CognitiveInterfaceSmarty\subset CognitiveInterface

这里的含义不是Smarty等于认知界面。

而是:

Smarty可以作为Cognitive Interface的Web表现实现。

认知界面是功能和结构概念。

Smarty是具体的软件表现技术。


258.17 Cognitive Interface 的PHP OOP结构

可以建立独立的认知界面类:

class CognitiveInterface
{
    protected $controller;
    protected $view;

    public function __construct($controller, $view)
    {
        $this->controller = $controller;
        $this->view = $view;
    }

    public function showCognition()
    {
        $data = $this->controller->getCognitiveData();

        $this->view->assign(
            'cognition',
            $data
        );

        return $this->view->display(
            'cognition.tpl'
        );
    }
}

进一步可以建立:

CognitiveInterface
├── GoalInterface
├── ObjectInterface
├── SceneInterface
├── CognitionInterface
├── BehaviorInterface
├── ActionInterface
├── DeviceInterface
└── FeedbackInterface

这样认知界面本身也可以采用面向对象结构。


258.18 Cognitive Interface 的状态监控

认知系统是动态系统,因此界面必须具有状态观察能力。

例如系统状态:

IDLE
↓
PERCEIVING
↓
RECOGNIZING
↓
PLANNING
↓
ACTING
↓
EXECUTING
↓
FEEDBACK
↓
RECOGNIZING

认知界面可以将当前状态显示出来。

例如:

System State:
EXECUTING

Goal:
Move Object

Behavior:
Moving

Action:
Move Device

Device:
Running

Feedback:
Position Updated

这使用户能够看到机器当前处于整个认知闭环的哪个阶段。


258.19 Cognitive Interface 与动态认知

ICAI中的认知不是静态对象:

Cognition(t0)≠Cognition(t1)Cognition(t_0)\neq Cognition(t_1)

因为:

World(t0)≠World(t1)World(t_0)\neq World(t_1)

所以认知界面所表现的数据也必须允许动态变化:

World(t)
↓
Cognition(t)
↓
Interface(t)

World(t+1)
↓
Cognition(t+1)
↓
Interface(t+1)

因此认知界面实际上是:

动态认知状态的观察与交互窗口。


258.20 Cognitive Interface 的API形式

认知界面不一定只有Web页面。

未来同一个认知系统可以提供:

Web Interface
↓
Smarty / HTML

API Interface
↓
JSON

Desktop Interface
↓
Application UI

External System Interface
↓
Structured Data

底层仍然统一使用:

Object Model
Scene Model
Cognitive Model
Behavior Model
Device Model

因此:

CognitiveModel→Interface1CognitiveModel \rightarrow Interface_1

以及:

CognitiveModel→Interface2CognitiveModel \rightarrow Interface_2

都可以成立。

这使认知系统与表现技术保持解耦。


258.21 Cognitive Interface 的工程边界

ICAI必须明确以下边界:

Cognitive Interface
    ↓
负责:
输入
输出
观察
交互
状态表现
控制请求

而:

Cognitive Engine
    ↓
负责:
认知
Behavior Engine
    ↓
负责:
行为
Device Engine
    ↓
负责:
设备执行

因此:

Interface≠CognitionInterface\neq Cognition Interface≠BehaviorInterface\neq Behavior Interface≠DeviceExecutionInterface\neq DeviceExecution

接口负责连接,而不是替代核心认知逻辑。


258.22 完整认知交互闭环

经过本章,ICAI的闭环进一步扩展:

Human
↓
Cognitive Interface
↓
Controller
↓
Cognitive Model
↓
Behavior Model
↓
Action
↓
Device Engine
↓
Physical Device
↓
World
↓
Feedback
↓
Object Model
↓
Scene Model
↓
Cognitive Model
↓
Controller
↓
Cognitive Interface
↓
Human

这形成:

Human→Cognition→Behavior→Execution→World→Feedback→Cognition→HumanHuman \rightarrow Cognition \rightarrow Behavior \rightarrow Execution \rightarrow World \rightarrow Feedback \rightarrow Cognition \rightarrow Human

因此认知界面成为完整机器认知闭环的外部交互节点。


258.23 本章核心模型

认知界面可以最终表示为:

CIt=F(Inputt,CognitiveStatet,BehaviorStatet,DeviceStatet,Feedbackt)CI_t= F(Input_t, CognitiveState_t, BehaviorState_t, DeviceState_t, Feedback_t)

完整结构:

External Input
↓
Cognitive Interface
↓
Controller
↓
Cognitive System
↓
Object
↓
Scene
↓
Cognition
↓
Behavior
↓
Action
↓
Device
↓
World
↓
Feedback
↓
Cognitive System
↓
Cognitive Interface
↓
External Output

258.24 本章总结

Cognitive Interface|认知界面不是普通的网页UI,而是ICAI机器认知系统与外部主体之间的结构化交互层。

它使外部主体能够:

  • 输入目标;
  • 查看对象;
  • 查看场景;
  • 观察认知状态;
  • 观察行为过程;
  • 查看当前动作;
  • 查看设备状态;
  • 查看反馈;
  • 发出控制请求。

同时,它严格保持与核心认知系统的边界:

Interface → Controller → Engine → Model

而不是让界面直接承担认知和执行逻辑。

至此,第231—258章的MVC认知系统逐步形成:

Model
↓
Engine
↓
Controller
↓
Cognitive Interface
↓
Smarty Template
↓
HTML

与此同时,ICAI内部的核心运行链保持:

Object
↓
Scene
↓
Cognition
↓
Behavior
↓
Action
↓
Device
↓
World
↓
Feedback
↓
Re-Cognition

最终形成:

机器内部负责认知与执行,认知界面负责外部交互,Controller负责系统连接,Smarty负责Web表现。

这使ICAI从一个内部运行的机器认知系统,进一步成为一个具有认知状态可观察、认知过程可交互、行为过程可控制、设备执行可监控能力的完整MVC认知软件系统。

Leave a Reply

Your email address will not be published. Required fields are marked *