第二章 信息识别与结构匹配
2.1 信息识别在结构智能中的作用
在WSaiOS-SI中,认知并不是直接作用于未经处理的感知信息。
感知系统从外部环境、数据源、用户输入、文件、数据库、设备、接口或其他信息来源获取信息之后,首先必须确定这些信息中包含什么结构意义。
因此,感知之后必须建立一个由信息进入结构世界的转换过程:
感知信息 → 信息识别 → Element → Structure Matching
其中:
- 感知信息是系统获取到的外部信息;
- 信息识别是确定感知信息所表达的对象、属性、值、状态、事件、关系等结构意义;
- Element是经过自主语义理解后形成的基本结构单位;
- Structure Matching是将形成的Element与已有Structure、Knowledge Structure以及当前需求结构进行匹配的过程。
因此,本章研究的不是简单的信息读取,而是:
如何将感知获得的信息识别为WSaiOS-SI能够处理的Element,并进一步将这些Element放入已有结构空间进行匹配。
2.2 感知信息不是Element
必须首先明确:
感知信息 ≠ Element。
感知信息属于信息层。
Element属于结构智能内部的基本结构层。
二者之间存在一个不可省略的自主语义理解过程。
完整路径为:
外部信息
↓
感知
↓
感知信息
↓
WSaiOS-SI自主语义理解
↓
Element
↓
Relation
↓
Structure
例如感知到:
“Product A 当前库存只有 5 件。”
这句话首先是感知信息。
它不能直接作为一个Element整体进入结构系统。
经过自主语义理解后,可以形成:
Object
↓
Product A
Attribute
↓
Inventory
Value
↓
5
State
↓
Low Inventory
因此,信息识别完成的不是文字切分,而是结构意义识别。
2.3 信息识别的定义
WSaiOS-SI中的信息识别定义为:
信息识别,是对感知获得的信息进行自主语义理解,识别其中具有独立结构意义的对象、属性、值、状态、事件、关系、条件、规则和行为等基本结构内容,并确定其在当前上下文中的结构角色,从而形成Element的过程。
因此:
Information→Semantic Understanding→ElementInformation \rightarrow Semantic\ Understanding \rightarrow Element
信息识别的结果不是单纯的文本片段,而是具有明确结构角色的Element。
2.4 信息识别的基本任务
信息识别至少需要完成以下任务:
感知信息
│
├── 对象识别
├── 属性识别
├── 值识别
├── 状态识别
├── 事件识别
├── 关系识别
├── 条件识别
├── 规则识别
├── 方法/行为识别
└── 上下文识别
这些内容并不是彼此孤立的。
例如:
“Product A 库存为 5 件。”
可以识别为:
Object
└── Product A
Attribute
└── Inventory
Value
└── 5
Unit
└── Piece
随后形成:
Product A
│
└── Inventory
│
└── 5 pieces
由此进入Structure层。
2.5 信息识别不是字符拆分
WSaiOS-SI中的Element不是通过简单的字符、词语或Token切分产生的。
例如:
“100”
本身无法确定Element的完整结构意义。
它可能是:
- Price;
- Quantity;
- Inventory;
- Weight;
- Length;
- Score;
- Percentage;
- Order Number;
- Product Model;
- Date的一部分。
因此:
“100”≠一个固定Element”100″ \neq 一个固定Element
必须结合:
- Object;
- Attribute;
- Context;
- Source;
- Relation;
- Unit;
- Demand;
- Existing Structure。
才能确定其结构意义。
例如:
Product
└── Price
└── 100 USD
与:
Product
└── Inventory
└── 100 pieces
虽然包含相同字符“100”,但属于不同的结构Element。
因此:
Element边界由语义和结构意义确定,而不是由字符边界确定。
2.6 信息识别与上下文
信息识别必须依赖Context。
同一信息在不同Context下可能形成不同Element。
例如:
“5”
在不同Context中可能表示:
Product.Quantity = 5
Product.Inventory = 5
Product.Rating = 5
Order.Count = 5
Machine.SpeedLevel = 5
因此:
Element=f(Information,Context,Semantic,Structure)Element = f(Information, Context, Semantic, Structure)
Context至少可以包括:
- 当前对象;
- 当前需求;
- 当前问题;
- 来源;
- 时间;
- 空间;
- 当前状态;
- 已有知识;
- 当前结构;
- 相关Relation。
因此,WSaiOS-SI不能仅根据信息表面形式确定Element。
2.7 信息识别与需求
信息识别虽然必须保持自主语义能力,但其识别重点可以受到当前需求影响。
例如当前需求是:
判断产品是否需要补货。
系统感知到:
“Product A:库存5件,过去7天销售120件,供应周期20天。”
此时信息识别重点包括:
Product
├── Inventory = 5
├── Sales7Days = 120
└── SupplyTime = 20 days
而与当前问题无关的信息可以暂时不进入当前认知结构。
因此:
需求不直接决定信息的语义是什么,但可以决定哪些已识别信息进入当前结构匹配过程。
形成:
需求
↓
确定问题空间
↓
感知信息
↓
信息识别
↓
Element
↓
相关性筛选
↓
Structure Matching
2.8 Element形成
经过信息识别之后,感知信息进入Element层。
Element的基本定义保持不变:
Element是能够被识别、组织、关联和参与运算的基本结构单位。
因此,一个有效Element至少应当能够回答:
- 它是什么?
- 它具有什么语义?
- 它属于什么结构角色?
- 它与哪些对象存在关系?
- 它能否进入结构组织?
- 它是否能够被匹配?
- 它是否可以参与后续运算?
例如:
Element
├── Identity
├── Semantic
├── Role
├── Value
├── Context
├── Source
├── Relation
└── Structure Position
这样形成的Element才真正进入结构智能内部世界。
2.9 Element的结构角色
Element不是没有角色的抽象数据。
同一个Element在不同Structure中可能承担不同结构角色。
基本角色包括:
Element
├── Object
├── Attribute
├── Value
├── State
├── Event
├── Relation Target
├── Condition
├── Rule
├── Method
└── Structure
例如:
Product A
可以作为Object。
而:
Inventory
可以作为Attribute。
5
可以作为Value。
因此:
Element是基本结构单位,而Object、Attribute、Value、State、Event等是Element在不同结构位置中承担的结构角色。
这与前面建立的对象理论保持一致。
2.10 Element进入Relation
单独的Element只能表达基本结构意义。
要形成Structure,还需要建立Relation。
例如:
Product A
+
Inventory
+
5
三个Element本身只是三个结构单位。
通过Relation:
Product A
│ has attribute
↓
Inventory
│ has value
↓
5
才形成:
Product A.Inventory = 5
因此:
Element+Relation→StructureElement + Relation \rightarrow Structure
信息识别必须为后续Relation形成提供基础。
2.11 信息识别与Relation识别
在复杂信息中,Element识别和Relation识别通常相互关联。
例如:
“Supplier A supplies Product B.”
可以识别:
Element 1 = Supplier A
Element 2 = Product B
然后识别:
Relation = supplies
最终形成:
Supplier A
│
supplies
↓
Product B
因此:
Information
↓
Element Recognition
↓
Relation Recognition
↓
Structure
关系识别不是简单的词语识别,而是确定:
哪些Element之间存在什么结构关系。
2.12 从Element到Structure
经过Element识别和Relation识别后,系统可以形成Structure。
基本过程为:
感知信息
↓
Element识别
↓
Element集合
↓
Relation识别
↓
Relation组织
↓
Structure形成
例如:
Product A
Inventory
5
Low Inventory Rule
Sales = High
经过组织:
Product A
│
├── Inventory = 5
├── Sales = High
└── Rule = Low Inventory
进一步形成:
Current Product State Structure
此时感知信息已经进入Structure层。
2.13 Structure Matching的定义
结构形成之后,并不意味着它已经成为新的知识。
系统必须进一步判断:
当前形成的Structure与已有Knowledge Structure之间是什么关系?
因此建立Structure Matching。
定义为:
Structure Matching,是将当前由Element和Relation形成的结构,与已有Structure、Knowledge Structure、Demand Structure以及Context中的相关结构进行结构对应、语义对应、关系对应、状态对应和运算能力对应,以确定当前结构是否能够被已有结构识别、补充、更新、组合或形成新结构的过程。
因此:
Structurecurrent→Structure Matching→StructureexistingStructure_{current} \rightarrow Structure\ Matching \rightarrow Structure_{existing}
2.14 Structure Matching不是字符串匹配
Structure Matching不能理解为:
“两个字符串是否相同。”
也不能理解为:
“两个字段名称是否相同。”
它比较的是结构意义。
例如:
Current:
Product A
Inventory = 5
已有Knowledge Structure:
Product
├── Inventory
├── Sales
├── SupplyTime
└── SupplyState
虽然当前感知结果只有Inventory信息,但它可以与已有Product Knowledge Structure中的Inventory部分匹配。
因此:
Structure Matching≠String MatchingStructure\ Matching \neq String\ Matching
而是:
Structure Matching=Semantic Fit+Element Fit+Relation Fit+Context Fit+State Fit+Rule Fit+Operation FitStructure\ Matching = Semantic\ Fit + Element\ Fit + Relation\ Fit + Context\ Fit + State\ Fit + Rule\ Fit + Operation\ Fit
2.15 结构匹配的基本维度
WSaiOS-SI的Structure Matching至少包括以下维度。
1. Semantic Fit
判断当前Element与已有结构中的语义是否一致。
例如:
Inventory
是否对应:
Stock Level
不能只看名称,而要判断其结构意义。
2. Element Fit
判断当前Element是否能够对应已有Structure中的Element。
例如:
Product A
是否对应已有Object:
Product
或者:
Product A
是否属于某个已有Product Object实例。
3. Relation Fit
判断Element之间的关系是否能够对应已有结构。
例如:
Supplier A
supplies
Product B
是否与已有供应关系结构匹配。
4. Context Fit
判断当前信息所在Context是否与已有结构的适用Context一致。
例如:
Inventory = 5
可能属于:
- Warehouse A;
- Warehouse B;
- Retail Store;
- Factory;
- Online Inventory。
Context不同,结构意义可能不同。
5. State Fit
判断当前State是否能够进入已有结构的状态空间。
例如:
Inventory = 5
根据已有规则可能形成:
State = Low
6. Rule Fit
判断当前结构是否满足已有Rule的条件。
例如:
Inventory < Threshold
是否成立。
7. Operation Fit
判断当前Structure是否能够被已有Method和Operation处理。
例如已有:
CalculateReorderQuantity()
当前Structure是否提供该Method所需要的Attribute和Value。
2.16 Structure Matching的基本过程
完整匹配过程可以表示为:
Current Information
↓
Element
↓
Relation
↓
Current Structure
↓
Existing Structure Retrieval
↓
Semantic Matching
↓
Element Matching
↓
Relation Matching
↓
Context Matching
↓
State Matching
↓
Rule Matching
↓
Operation Matching
↓
Structure Match Result
匹配结果可能包括:
├── 完全匹配
├── 部分匹配
├── 可补充匹配
├── 可更新匹配
├── 可综合匹配
├── 冲突匹配
├── 无匹配
└── 信息不足
2.17 完全匹配
如果当前Structure与已有Structure在关键结构维度上高度一致,则形成完全匹配。
例如:
Current Structure
Product A
Inventory = 5
已有结构:
Product A
Inventory = 5
经过:
- Identity;
- Semantic;
- Relation;
- Context;
- State
确认一致后,可以直接匹配到已有结构。
此时通常不需要创建全新的Structure。
2.18 部分匹配
当前感知信息可能只提供已有结构的一部分。
例如:
Current:
Product A
Inventory = 5
已有Knowledge Structure:
Product A
├── Inventory
├── Sales
├── Supplier
├── SupplyTime
└── State
此时:
Inventory
能够匹配已有结构。
其他部分暂时没有信息。
因此形成:
部分结构匹配。
这并不意味着必须创建新的知识结构。
当前信息可以成为已有结构的补充信息。
2.19 补充匹配
如果当前Element不存在于已有结构中,但能够作为已有Structure的新组成部分,则形成补充匹配。
例如已有:
Product
├── Price
├── Inventory
└── Supplier
当前感知发现:
LeadTime = 20 days
如果已有结构允许扩展,则:
Existing Structure
+
New Element
↓
Structure Extension
形成:
Product
├── Price
├── Inventory
├── Supplier
└── LeadTime
因此Structure Matching不仅用于识别,也用于结构扩展。
2.20 更新匹配
当前感知信息可能不是新Element,而是已有Element的新Value或新State。
例如:
已有:
Inventory = 20
新感知:
Inventory = 5
此时并不是创建新的Inventory Element。
而是:
Existing Element
↓
New Value
↓
State Update
形成:
Inventory
├── Previous Value = 20
└── Current Value = 5
然后重新计算State。
因此:
Structure Matching必须能够识别“新结构”和“已有结构的新状态”之间的区别。
2.21 冲突匹配
当前信息可能与已有Knowledge发生冲突。
例如:
已有知识:
Inventory = 20
当前感知:
Inventory = 5
不能简单地认为其中一个必然错误。
系统应当保留:
Value A = 20
Source A
Time A
Value B = 5
Source B
Time B
然后通过:
- Source;
- Time;
- Reliability;
- Context;
- Validation;
- State;
进行判断。
因此:
Structure Matching发现冲突,但不应通过简单覆盖消除冲突。
冲突本身也可以形成结构信息。
2.22 无匹配结构
如果当前Structure无法与已有Knowledge Structure建立有效对应关系,则可能形成新Structure。
过程:
Current Structure
↓
Structure Matching
↓
No Match
↓
Structure Validation
↓
New Structure
但“无匹配”并不立即等于“新知识”。
仍然需要经过:
- 结构完整性判断;
- Relation确认;
- Context确认;
- Source确认;
- 必要验证;
- Knowledge Formation。
因此:
没有匹配到已有结构,只意味着当前结构暂时无法被已有结构解释,不意味着它自动成为有效知识。
2.23 多结构匹配
当前Structure可能同时与多个已有Structure匹配。
例如一个订单可能同时涉及:
Customer Structure
+
Product Structure
+
Supplier Structure
+
Order Structure
+
Payment Structure
因此:
Current Order
↓
Multiple Structure Matching
↓
Customer Structure
Product Structure
Supplier Structure
Payment Structure
然后通过Relation形成更高层综合结构:
Customer
↓ places
Order
↓ contains
Product
↓ supplied by
Supplier
↓ paid through
Payment
这就进入前面建立的:
多Structure → Structure Integration → 综合Structure
2.24 Structure Matching与Structure Synthesis
结构匹配不仅可以找到已有结构,还可以为结构综合提供基础。
过程:
Current Elements
↓
Structure Formation
↓
Structure Matching
↓
Multiple Structures Identified
↓
Relation Mapping
↓
Structure Integration
↓
Composite Structure
因此:
Structure Matching→Structure Integration→Composite StructureStructure\ Matching \rightarrow Structure\ Integration \rightarrow Composite\ Structure
Structure Matching是Structure Synthesis的重要前置过程。
2.25 Structure Matching与Knowledge Matching
二者必须区分。
Structure Matching
主要判断:
当前结构与已有结构是否存在结构对应关系。
Knowledge Matching
进一步判断:
当前问题需要调用哪个知识结构,以及该知识结构是否能够解决当前问题。
因此:
Current Information
↓
Element
↓
Structure
↓
Structure Matching
↓
Knowledge Structure Matching
↓
Knowledge Selection
↓
Operation
↓
Cognition
因此Structure Matching是Knowledge Matching的重要基础。
2.26 结构匹配与对象实例
在面向对象逻辑中,当前Element和Structure还需要区分Class与Object。
例如已有:
Class Product
├── Price
├── Inventory
├── Supplier
└── Method
当前感知:
Product A
Inventory = 5
匹配过程:
Product A
↓
Object Recognition
↓
Class Matching
↓
Product Class
↓
Object Instance Matching
↓
Product A
然后:
Product A
└── Inventory = 5
被绑定到具体Object。
因此Structure Matching可以发生在不同层级:
Element Level
↓
Attribute Level
↓
Object Level
↓
Class Level
↓
Structure Level
↓
Knowledge Structure Level
↓
Composite Structure Level
2.27 结构匹配与方法调用
如果当前Structure匹配到某个可运算Knowledge Structure,则可以进入Method调用。
例如:
Current Product
Inventory = 5
Sales = High
SupplyTime = 20
匹配到:
ReorderEvaluation Method
之后:
Object
↓
Method
↓
Self Binding
↓
Attribute Value
↓
Operation
↓
Result
最终形成:
Cognition:
Current Product requires replenishment.
因此:
Structure Matching→Method Matching→Operation→CognitionStructure\ Matching \rightarrow Method\ Matching \rightarrow Operation \rightarrow Cognition
2.28 结构匹配的动态性
Structure Matching不是一次性操作。
随着:
- 新信息进入;
- Element更新;
- Relation变化;
- Value变化;
- State变化;
- Rule变化;
- Context变化;
- Demand变化;
匹配结果也会变化。
例如:
第一次:
Inventory = 20
→ Normal
第二次:
Inventory = 5
→ Low
第三次:
Inventory = 0
→ Out of Stock
因此:
New Information
↓
Element Update
↓
Structure Update
↓
Structure Rematching
↓
Knowledge Rematching
↓
Cognition Update
结构匹配本质上是动态过程。
2.29 结构匹配的形式化表达
设:
- IpI_p = Perceived Information
- EpE_p = Perceived Elements
- RpR_p = Perceived Relations
- SpS_p = Perceived Structure
- SkS_k = Existing Knowledge Structure
- DD = Demand
- CC = Context
首先:
Ep=Elementize(Ip,C,D)E_p = Elementize(I_p,C,D)
然后:
Rp=Relate(Ep,C)R_p = Relate(E_p,C)
形成:
Sp=Construct(Ep,Rp,C)S_p = Construct(E_p,R_p,C)
随后进行结构匹配:
M=Match(Sp,Sk,D,C)M = Match(S_p,S_k,D,C)
匹配函数可以定义为:
M=f(SemanticFit,ElementFit,RelationFit,ContextFit,StateFit,RuleFit,OperationFit)M = f( SemanticFit, ElementFit, RelationFit, ContextFit, StateFit, RuleFit, OperationFit )
最终:
M∈{Full,Partial,Supplement,Update,Synthesis,Conflict,None,Insufficient}M \in \{ Full, Partial, Supplement, Update, Synthesis, Conflict, None, Insufficient \}
2.30 信息识别与结构匹配的完整过程
综合本章内容,可以建立:
需求
↓
感知
↓
感知信息
↓
信息识别
↓
WSaiOS-SI自主语义理解
↓
Element
↓
Element结构角色确定
↓
Relation识别
↓
Structure形成
↓
Existing Structure Retrieval
↓
Structure Matching
│
├── 完全匹配
├── 部分匹配
├── 补充匹配
├── 更新匹配
├── 综合匹配
├── 冲突匹配
├── 无匹配
└── 信息不足
↓
Knowledge Structure
↓
Method / Operation
↓
Result
↓
Cognition
这条路径明确建立了:
感知信息 → Element → Structure Matching
并将其连接到上一章的认知理论。
2.31 信息识别与结构匹配的核心关系
本章可以进一步将整个过程压缩为三个阶段。
第一阶段:信息识别
回答:
感知到的信息是什么?
形成:
Information→Semantic Understanding→ElementInformation \rightarrow Semantic\ Understanding \rightarrow Element
第二阶段:结构形成
回答:
这些Element之间是什么结构关系?
形成:
Element+Relation→StructureElement + Relation \rightarrow Structure
第三阶段:结构匹配
回答:
当前Structure与已有Structure有什么关系?
形成:
Structurecurrent→Structure Matching→Existing StructureStructure_{current} \rightarrow Structure\ Matching \rightarrow Existing\ Structure
因此:
Perceived Information→Element→Structure→Structure Matching\boxed{ Perceived\ Information \rightarrow Element \rightarrow Structure \rightarrow Structure\ Matching }
这是本章最核心的理论链。
2.32 与总体认知链的连接
本章建立的结构匹配机制最终连接上一章的认知定义。
完整路径为:
感知信息
↓
信息识别
↓
Element
↓
Relation
↓
Structure
↓
Structure Matching
↓
Knowledge Matching
↓
Method
↓
Operation
↓
Result
↓
Cognition
因此:
信息识别解决“信息是什么”的结构化问题;Structure Matching解决“当前结构与已有结构是什么关系”的问题;Knowledge Matching解决“当前问题应该调用什么知识”的问题;Operation最终使知识进入运行;Cognition则由运行结果及其结构解释形成。
2.33 本章基本原则
原则一:信息与Element分离
感知信息不是Element,必须经过WSaiOS-SI自主语义理解才能形成Element。
原则二:Element必须具有结构意义
Element不是字符、词语或Token的简单切分结果。
原则三:Element必须能够进入结构
不能参与组织、关联和后续结构运算的普通信息片段,不应直接等同于Element。
原则四:Element必须保留Context
Element的结构意义必须结合当前对象、上下文、来源、需求和关系确定。
原则五:Element通过Relation形成Structure
Element+Relation→StructureElement + Relation \rightarrow Structure
原则六:Structure必须进入匹配
当前Structure不能孤立存在,应当与已有Structure和Knowledge Structure进行匹配。
原则七:结构匹配不是字符串匹配
Structure Matching比较的是语义、Element、Relation、Context、State、Rule和Operation等结构关系。
原则八:匹配结果不是只有“是”与“否”
结构匹配可以产生:
完全匹配、部分匹配、补充、更新、综合、冲突、无匹配、信息不足。
原则九:匹配结果可以推动结构演化
Structure Matching
↓
Structure Update
↓
Knowledge Update
↓
Rematching
原则十:信息识别与结构匹配服务于认知
最终:
Information→Element→Structure→Matching→Operation→CognitionInformation \rightarrow Element \rightarrow Structure \rightarrow Matching \rightarrow Operation \rightarrow Cognition
2.34 本章结论
WSaiOS-SI不能让感知信息直接进入认知过程。
感知获得的信息首先必须经过自身的自主语义理解,识别其中具有结构意义的基本单位,形成Element;随后通过Relation将多个Element组织成Structure;再将当前Structure与已有Structure和Knowledge Structure进行匹配。
因此,本章建立的完整理论路径为:
感知信息 → 信息识别 → WSaiOS-SI自主语义理解 → Element → Relation → Structure → Structure Matching
进一步连接:
Structure Matching → Knowledge Matching → Method → Operation → Result → Cognition
因此,信息进入结构智能体系的过程不是:
信息 → 知识
而是:
信息 → Element → Structure → Structure Matching → Knowledge
而认知形成过程则进一步表现为:
Structure → Knowledge → Matching → Operation → Cognition
由此形成两个连续但不同的理论过程:
【信息进入结构智能】
感知信息
↓
自主语义理解
↓
Element
↓
Relation
↓
Structure
↓
Structure Matching
↓
Knowledge
以及:
【结构进入认知】
Knowledge
↓
Structure Matching
↓
Method
↓
Operation
↓
Result
↓
Interpretation
↓
Cognition
二者连接后形成:
感知信息→Element→Structure→Structure Matching→Knowledge→Operation→Cognition\boxed{ 感知信息 \rightarrow Element \rightarrow Structure \rightarrow Structure\ Matching \rightarrow Knowledge \rightarrow Operation \rightarrow Cognition }
因此,信息识别是感知进入结构世界的入口,Element是信息获得结构存在的基本单位,Structure是信息形成整体意义的组织形式,而Structure Matching则是当前感知结构进入已有结构与知识体系的关键机制。
这构成WSaiOS-SI从“感知”走向“认知”的重要基础。