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

第九卷 第二章 需求解析

第二章 需求解析

2.1 需求解析的提出

第一章建立了WSaiOS-SI的需求理论,并确定:

需求是智能过程开始组织Knowledge、匹配Structure、形成Capability、Cognition和Decision的重要驱动力。

但是,需求本身通常不是一个已经完成结构化的Structure。

在实际输入中,需求可能表现为:

  • 一句话;
  • 一个问题;
  • 一个任务;
  • 一个目标;
  • 一个操作要求;
  • 一个状态变化要求;
  • 一个复杂业务条件;
  • 一个由多个问题组成的问题集合;
  • 一个由用户、设备或其他Structure产生的需求。

例如:

“判断库存低于安全库存的产品,并在不超过预算的情况下决定哪些产品需要补货。”

这并不是一个单一Element。

其中同时存在:

Object
Product

Attribute
Inventory
Safety Inventory
Budget

Value
Current Inventory
Budget Amount

State
Inventory Low

Condition
Inventory < Safety Inventory

Goal
Determine Replenishment

Constraint
Budget Limit

Expected Result
Replenishment Decision

如果不对这些内容进行结构化,系统无法准确确定:

  • 当前处理什么Object;
  • 需要检查什么Attribute;
  • 当前Value是什么;
  • Object处于什么State;
  • 什么Condition成立;
  • 目标是什么;
  • 什么Constraint限制当前解决过程;
  • 最终需要得到什么Result。

因此,WSaiOS-SI需要建立需求解析(Demand Analysis)机制。

需求解析的任务不是简单地从句子中提取关键词,而是:

根据需求的语义、结构角色、上下文和已有Knowledge,识别需求中的Object、Condition、Attribute、State、Goal和Constraint,并建立这些Element之间的Relation,使需求形成可以进入Structure Matching、Knowledge Matching、Method Matching和Operation的Demand Structure。


2.2 需求解析的定义

在WSaiOS-SI中:

需求解析,是对需求信息进行自主语义理解,识别其中的Object、Attribute、Value、State、Condition、Goal、Constraint以及其他需求Element,并确定其结构角色、相互Relation和组织方式,从而形成Demand Structure的过程。

其基本过程为:

需求信息
   ↓
WSaiOS-SI自主语义理解
   ↓
需求Element识别
   ↓
结构角色识别
   ↓
Relation识别
   ↓
需求结构组织
   ↓
Demand Structure

形式化表示为:

DS=AnalyzeDemand(D,I,K,C)DS = AnalyzeDemand(D,I,K,C)

其中:

  • DD:Demand
  • II:Demand Information
  • KK:已有Knowledge
  • CC:Context
  • DSDS:Demand Structure

需求解析不是简单的信息抽取。

它至少包含:

Semantic Understanding+Element Recognition+Role Recognition+Relation Recognition+Structure OrganizationSemantic\ Understanding + Element\ Recognition + Role\ Recognition + Relation\ Recognition + Structure\ Organization

因此:

需求解析的结果不是关键词集合,而是结构化需求。


2.3 需求解析与自主语义理解

WSaiOS-SI的需求解析必须建立在自身的自主语义理解能力之上。

基本路径为:

Demand Information
        ↓
WSaiOS-SI自主语义理解
        ↓
Semantic Elements
        ↓
Structural Roles
        ↓
Relations
        ↓
Demand Structure

这里必须严格区分:

文字
≠
语义
≠
Element
≠
Demand Structure

例如:

“库存不足的产品需要补货。”

其中:

产品

不是简单的一个文字片段,而是一个Object相关Element。

库存

承担Attribute角色。

不足

表达State或状态判断。

补货

表达Goal、Method或Expected Operation相关语义。

因此,同一个词在不同Demand中可能承担不同结构角色。

WSaiOS-SI不能通过固定关键词直接决定结构角色,而必须结合:

  • Context;
  • Object;
  • Class;
  • Attribute;
  • Value;
  • Relation;
  • Goal;
  • Condition;
  • State;
  • Constraint;
  • Knowledge。

共同确定。


2.4 需求解析的基本对象

本章重点研究六类核心需求结构Element:

Demand
│
├── Object
├── Condition
├── Attribute
├── State
├── Goal
└── Constraint

同时还需要识别与它们相关的:

Value
Relation
Context
Rule
Expected Result
Method
Operation

因此完整Demand Structure可以表示为:

Demand Structure
│
├── Object
│   ├── Class
│   ├── Identity
│   └── Relation
│
├── Attribute
│   └── Value
│
├── State
│   ├── Current State
│   └── Target State
│
├── Condition
│   └── Rule
│
├── Goal
│   └── Expected Result
│
├── Constraint
│   └── Limit / Requirement
│
├── Context
│
└── Relations

这六类Element不是相互孤立的。

其核心关系为:

Object→Attribute→Value→StateObject \rightarrow Attribute \rightarrow Value \rightarrow State

并由:

Condition+Rule→State EvaluationCondition + Rule \rightarrow State\ Evaluation

同时:

Goal+Constraint→Solution SpaceGoal + Constraint \rightarrow Solution\ Space

最终形成:

Demand→Object→Attribute→Value→State→Condition→Goal→ConstraintDemand \rightarrow Object \rightarrow Attribute \rightarrow Value \rightarrow State \rightarrow Condition \rightarrow Goal \rightarrow Constraint


2.5 Object的需求解析

2.5.1 Object的作用

需求首先需要确定:

当前问题针对什么对象?

Object是需求结构的重要基础。

例如:

“判断订单是否能够发货。”

这里的主要Object至少包括:

Order
Product
Shipment

而:

“判断某设备是否可以运行。”

则Object可能是:

Device

因此:

Demand→ObjectDemand \rightarrow Object

是需求解析的重要过程。


2.5.2 Object识别不是名称提取

需求中的对象不能简单按照名词识别。

例如:

“检查苹果公司的订单。”

其中:

Apple
Order

具有不同结构角色。

又例如:

“检查苹果产品的库存。”

其中:

Apple
Product
Inventory

可能形成:

Brand → Product → Attribute

因此Object识别必须考虑:

  • Class;
  • Identity;
  • Attribute;
  • Relation;
  • Context;
  • Knowledge。

2.5.3 Object与Class

需求中识别Object时,可以通过Class进行结构匹配:

Demand→ObjectRequirement→ClassMatching→ObjectMatchingDemand \rightarrow ObjectRequirement \rightarrow ClassMatching \rightarrow ObjectMatching

例如:

“检查所有低库存产品”

其结构不是指定一个具体Product,而是:

Class = Product
Condition = Inventory < SafetyInventory

因此需求可以针对:

  • 一个Object;
  • 多个Object;
  • 一个Class;
  • 一个Object集合;
  • 一个Object Relation。

2.5.4 Object集合

复杂需求可能针对多个Object:

Product A
Product B
Product C

或者:

所有Product

这时Demand Structure需要表示:

Object Scope
    ↓
Object Set
    ↓
Selection Condition

因此:

需求中的Object可以是单一Object,也可以是Object集合。


2.6 Attribute的需求解析

确定Object以后,需要进一步确定:

当前需求需要处理Object的哪些Attribute?

基本关系:

Demand→Object→RequiredAttributeDemand \rightarrow Object \rightarrow RequiredAttribute

例如:

“判断产品是否需要补货。”

可能需要:

Object = Product

Required Attributes:
├── Inventory
├── Safety Inventory
├── Sales
└── Order Quantity

这些Attribute并不一定全部在需求文字中明确出现。

部分Attribute可以通过已有Knowledge和Structure推导。

因此需求解析不是单纯的文字提取,而是:

显式识别 + 结构推理 + Knowledge匹配。


2.6.1 Attribute的结构角色

需求中的Attribute必须绑定到Object。

不能只记录:

Inventory

而应该形成:

Product
   ↓
Inventory

即:

Object→AttributeObject \rightarrow Attribute

否则无法确定:

“Inventory属于哪个Object?”

在多对象需求中尤其重要。

例如:

“比较供应商库存和仓库库存。”

需要形成:

Supplier
   └── Inventory

Warehouse
   └── Inventory

虽然两个Attribute名称相同,但结构角色不同。

因此:

相同Attribute名称不代表相同Attribute实例。


2.7 Value的需求解析

Attribute本身不能完全表达需求。

很多需求还包含具体Value。

例如:

“找出库存低于100件的产品。”

其中:

Attribute = Inventory
Operator = <
Value = 100
Unit = Piece

因此形成:

Attribute+Operator+ValueAttribute + Operator + Value

这类结构是Condition形成的重要基础。


2.7.1 Value类型

需求中的Value可以包括:

数值
文字
布尔值
日期
时间
时间范围
数量
金额
比例
区间
对象引用
集合
计算值

例如:

库存 < 100
价格 <= 500
温度 > 80
日期 = 2026-10-07
状态 = Active

因此需求解析必须识别:

Attribute
+
Operator
+
Value
+
Unit
+
Context

2.8 State的需求解析

State是需求解析中的重要结构。

需求可能描述:

当前Object是什么状态?

也可能描述:

当前Object应该达到什么状态?

因此必须区分:

Current State
Target State

例如:

“将设备从停止状态恢复到运行状态。”

可以形成:

Object = Device

Current State = Stopped
Target State = Running

其结构为:

CurrentState→Operation→TargetStateCurrentState \rightarrow Operation \rightarrow TargetState


2.8.1 State不是Value

需求解析必须保持:

Attribute≠Value≠StateAttribute \neq Value \neq State

例如:

Temperature = 90°C

其中:

Attribute = Temperature
Value = 90°C

但:

Temperature = 90°C
+
Rule
+
Context

可能得到:

State = Overheated

因此:

State是根据Object的多个Attribute Values、Relations、Conditions、Rules和Context确定的结构状态,而不是单个Value本身。


2.8.2 State需求

需求可以直接要求状态:

“找出不可用设备。”

形成:

Object = Device
State = Unavailable

也可以要求状态转换:

“使设备恢复运行。”

形成:

Current State = Unavailable
Target State = Available
Goal = Restore

因此State解析需要识别:

Current State
Target State
State Condition
State Transition

2.9 Condition的需求解析

Condition用于描述:

在什么条件下,某个需求成立、执行或者产生某种结果。

例如:

“库存低于安全库存时补货。”

其中:

Condition:
Inventory < Safety Inventory

Condition可以表示为:

Condition=Predicate(Object,Attribute,Value,Relation,Context)Condition = Predicate(Object,Attribute,Value,Relation,Context)

例如:

Inventory<SafetyInventoryInventory < SafetyInventory

Condition不是普通Attribute,也不是State本身。

Condition是一种用于判断某个结构是否满足要求的结构Element。


2.10 Condition的结构组成

Condition通常包含:

Condition
│
├── Subject
├── Attribute
├── Operator
├── Value
├── Relation
├── Context
└── Result

例如:

Inventory < 100

可以表示:

Subject   = Product
Attribute = Inventory
Operator  = <
Value     = 100
Result    = True / False

多个Condition可以进一步组合:

Condition A
AND
Condition B
OR
Condition C

因此Condition本身也可以形成Structure。


2.11 Condition与State

Condition和State必须区分。

例如:

Inventory < 100

是Condition。

而:

Low Inventory

可以是State。

二者关系为:

Condition→StateEvaluationCondition \rightarrow StateEvaluation

即:

Inventory = 80
Safety Inventory = 100
        ↓
Inventory < Safety Inventory
        ↓
Condition = True
        ↓
State = Low Inventory

因此:

Condition是判断结构,State是经过相关条件、Value、Relation和Rule评价后形成的对象状态。


2.12 Goal的需求解析

Goal表示:

当前需求最终希望达到什么目标。

例如:

“判断库存是否足够。”

Goal:

Determine Inventory Sufficiency

又例如:

“将设备恢复运行。”

Goal:

Restore Device Operation

Goal与Expected Result相关,但二者不完全相同。

Goal
↓
希望达到什么

而:

Expected Result
↓
最终希望获得什么结果

例如:

Goal = 判断是否需要补货
Expected Result = Replenishment Decision

因此:

Goal→ExpectedResultGoal \rightarrow ExpectedResult

但:

Goal≠ExpectedResultGoal \neq ExpectedResult


2.13 Goal与Object

Goal通常必须绑定Object。

例如:

“提高库存。”

不能仅解析为:

Goal = Increase

还必须确定:

Object = Product
Attribute = Inventory
Target State / Value = Increased

因此:

Goal+Object+Attribute→TargetStructureGoal + Object + Attribute \rightarrow TargetStructure

形成:

Product
   ↓
Inventory
   ↓
Increase

如果没有Object绑定,Goal就无法进入具体运算。


2.14 Constraint的需求解析

Constraint表示:

对需求解决过程、结构选择、Operation、Result或者Target State形成限制的结构条件。

例如:

“在预算不超过10万元的情况下采购设备。”

其中:

Goal = Purchase Equipment

Constraint:
Budget <= 100,000

Constraint不是Condition的简单别名。

Condition主要描述:

某个判断是否成立。

Constraint则描述:

解决过程允许达到什么范围、必须遵守什么限制。

因此:

Condition≠ConstraintCondition \neq Constraint


2.15 Constraint的类型

需求中的Constraint可以包括:

数值约束

Price <= 1000
Quantity >= 100

时间约束

Complete <= 7 days

资源约束

Budget <= 100000

状态约束

Device must be Available

结构约束

Only Product of Class A

方法约束

Must use approved Method

结果约束

Accuracy >= Required Level

安全约束

Operation must not exceed safety threshold

因此:

Constraint可以限制Object、Attribute、Value、State、Method、Operation、Result以及Solution Structure。


2.16 Constraint与Condition的关系

二者可能在结构上相似,但作用不同。

例如:

Inventory < SafetyInventory

可以作为Condition。

而:

Purchase Quantity <= Budget

可能作为Constraint。

可以概括为:

Condition
↓
判断某条件是否成立

Constraint
↓
限制允许的解决空间

二者又可以组合:

Condition
   ↓
进入解决过程
   ↓
Constraint
   ↓
限制解决方案
   ↓
Operation

因此:

Condition+Constraint→SolutionSpaceCondition + Constraint \rightarrow SolutionSpace


2.17 六类核心需求Element之间的关系

经过前面的解析,可以形成:

                         Demand
                           │
        ┌──────────────────┼──────────────────┐
        │                  │                  │
        ▼                  ▼                  ▼
      Object              Goal           Constraint
        │                  │                  │
        ▼                  ▼                  ▼
    Attribute        Expected Result     Solution Space
        │
        ▼
      Value
        │
        ▼
     Condition
        │
        ▼
      State

但是这并不是单向线性关系。

实际Demand Structure是网络结构:

Object
 ├── Attribute
 │      └── Value
 │            └── Condition
 │                  └── State
 │
 ├── Relation
 │
 └── Method

Goal
 └── Expected Result

Constraint
 ├── Object
 ├── Attribute
 ├── State
 ├── Method
 ├── Operation
 └── Result

因此:

需求解析的真正结果不是一棵固定树,而是一个由Element和Relation组成的Demand Structure。


2.18 需求解析中的Relation

需求中的六类核心Element必须通过Relation连接。

例如:

“如果产品库存低于安全库存,则在预算范围内进行补货。”

可以形成:

Product
   │
   └── Inventory
          │
          └── Value
                 │
                 ▼
          Inventory < SafetyInventory
                 │
                 ▼
              Condition
                 │
                 ▼
             Low Inventory
                 │
                 ▼
               Goal
            Replenishment
                 │
                 ▼
             Constraint
             Budget Limit

这里至少存在:

Object → Attribute
Attribute → Value
Attribute → Condition
Condition → State
State → Goal
Goal → Operation
Constraint → Operation
Operation → Result

因此:

Element+Relation=DemandStructureElement + Relation = DemandStructure


2.19 需求解析中的Context

同一个Element在不同Context中可能产生不同意义。

例如:

“100。”

如果Context是:

Product Inventory

则可能表示:

Inventory = 100

如果Context是:

Product Price

则可能表示:

Price = 100

如果Context是:

Order Quantity

则可能表示:

Quantity = 100

因此:

需求解析不能脱离Context确定Element的结构角色。

形式为:

Meaning=f(Element,Context,Relation,Knowledge)Meaning = f(Element,Context,Relation,Knowledge)

因此Demand Structure必须保存必要的Context。


2.20 需求解析与已有Knowledge

需求解析不是完全孤立的过程。

已有Knowledge可以帮助确定需求中没有明确表达的结构。

例如:

“找出需要补货的产品。”

文字中没有明确写出:

Inventory
Safety Inventory

但是已有Knowledge可能包含:

Product
 └── Inventory

Product
 └── Safety Inventory

于是系统可以通过Knowledge Matching建立:

Need Replenishment
        ↓
Required State
        ↓
Low Inventory
        ↓
Required Attributes
├── Inventory
└── Safety Inventory

因此:

需求解析不仅识别需求显式表达的信息,也可以根据已有Knowledge补充必要结构。

但这种补充必须保留推理依据,不能把推导结果错误地当作需求原文中的明确Element。


2.21 显式需求与推导需求

因此Demand Structure应区分:

Explicit Element

和:

Derived Element

例如:

原始需求:
“找出需要补货的产品。”

Explicit:

Object = Product
Goal = Replenishment

通过Knowledge推导:

Derived:
Attribute = Inventory
Attribute = Safety Inventory
State = Low Inventory
Condition = Inventory < Safety Inventory

因此可以表示:

DemandStructure=ExplicitStructure+DerivedStructureDemandStructure = ExplicitStructure + DerivedStructure

这种区分对于后续验证非常重要。


2.22 需求解析中的不确定性

需求并不总是完整明确的。

例如:

“把库存低的产品处理一下。”

其中:

Object = Product
State = Low Inventory

比较明确。

但是:

Goal
Method
Expected Result

可能不明确。

因此系统不能强行生成一个确定Demand Structure。

应该形成:

Demand Candidate

或者:

Incomplete Demand Structure

并标记缺失部分:

Missing:
Goal
Expected Result
Method

进一步:

IncompleteDemand→InformationGap→Perception/UserInputIncompleteDemand \rightarrow InformationGap \rightarrow Perception / UserInput

因此:

需求解析允许存在不确定、部分确定和多个候选结构。


2.23 需求解析中的冲突

需求中也可能出现结构冲突。

例如:

“在预算不超过10万元的情况下,购买价格超过20万元的设备。”

此时可能存在:

Constraint:
Budget <= 100000

Candidate:
Price > 200000

系统不能简单覆盖其中一个结构。

而应该识别:

Constraint Conflict

然后进行:

Conflict Detection
        ↓
Constraint Analysis
        ↓
Knowledge / Context Evaluation
        ↓
Resolution

可能结果:

Valid
Invalid
Conflicted
Need Clarification
Alternative Structure Required

因此需求解析本身也需要验证机制。


2.24 需求解析与Structure Validation

Demand Structure形成以后,不能立即认为其正确。

需要进行结构验证。

至少包括:

Semantic Validation
Element Validation
Relation Validation
Object Validation
Attribute Validation
State Validation
Condition Validation
Goal Validation
Constraint Validation
Context Validation
Consistency Validation

因此:

Demand→Analyze→DemandStructure→ValidateDemand \rightarrow Analyze \rightarrow DemandStructure \rightarrow Validate

只有通过必要验证的Demand Structure,才能进入后续:

Knowledge Matching
Structure Matching
Object Matching
Method Matching
Operation

2.25 需求解析的完整过程

综合本章,可以建立完整的需求解析流程:

                 Demand Information
                        │
                        ▼
            WSaiOS-SI自主语义理解
                        │
                        ▼
                 Element Recognition
                        │
          ┌─────────────┼─────────────┐
          ▼             ▼             ▼
       Object          Goal       Constraint
          │             │             │
          ▼             ▼             ▼
      Attribute     Expected      Solution
          │          Result         Space
          ▼
        Value
          │
          ▼
      Condition
          │
          ▼
        State
          │
          └─────────────┬─────────────┘
                        ▼
                 Relation Analysis
                        │
                        ▼
                Context Association
                        │
                        ▼
              Knowledge Matching
                        │
                        ▼
             Demand Structure
                        │
                        ▼
             Structure Validation
                        │
              ┌─────────┴─────────┐
              ▼                   ▼
           Valid              Incomplete
              │                   │
              ▼                   ▼
       Structure Matching     More Information

2.26 需求解析的形式化模型

设:

  • DD:原始Demand
  • IDI_D:需求信息
  • KK:已有Knowledge
  • CC:Context

则需求解析:

DS=AnalyzeDemand(D,ID,K,C)DS = AnalyzeDemand(D,I_D,K,C)

其中:

DS=⟨O,A,V,S,Cn,G,Q,R,Ct,X⟩DS = \langle O,A,V,S,Cn,G,Q,R,Ct,X \rangle

分别表示:

  • OO:Object
  • AA:Attribute
  • VV:Value
  • SS:State
  • CnCn:Condition
  • GG:Goal
  • QQ:Constraint
  • RR:Relation
  • CtCt:Context
  • XX:Expected Result

Demand Structure形成后:

DS′=Validate(DS,K,C)DS’ = Validate(DS,K,C)

如果:

Valid(DS′)=TrueValid(DS’) = True

则:

DS′→KnowledgeMatching→StructureMatchingDS’ \rightarrow KnowledgeMatching \rightarrow StructureMatching

如果:

Valid(DS′)=FalseValid(DS’) = False

则:

DS′→GapAnalysis→Perception/UserInputDS’ \rightarrow GapAnalysis \rightarrow Perception/UserInput


2.27 需求解析不是关键词提取

必须明确区分:

Keyword Extraction

与:

Demand Analysis

关键词提取可能得到:

产品
库存
100
补货
预算

但这些内容还不能直接用于结构运算。

需求解析必须进一步确定:

Product = Object

Inventory = Attribute

100 = Value

Inventory < Safety Inventory = Condition

Low Inventory = State

Replenishment = Goal

Budget <= X = Constraint

因此:

Keyword≠ElementKeyword \neq Element

进一步:

Element≠DemandStructureElement \neq DemandStructure

必须经过:

Element+Role+Relation+Context→DemandStructureElement + Role + Relation + Context \rightarrow DemandStructure


2.28 需求解析与Object-Oriented结构

WSaiOS-SI前面已经建立了Class、Object、Attribute、Value、Method和Instantiation理论。

需求解析可以直接与这一结构体系连接。

例如:

Demand
   ↓
Required Class
   ↓
Object
   ↓
Attribute
   ↓
Value
   ↓
State
   ↓
Method

因此需求解析可以形成:

Demand
│
├── Class Requirement
│
├── Object Requirement
│
├── Attribute Requirement
│
├── Value Requirement
│
├── State Requirement
│
├── Method Requirement
│
└── Result Requirement

这使Demand Structure能够直接进入后续的:

Structure Matching → Object Matching → Attribute/Value Matching → Method Matching → Instantiation → Operation


2.29 需求解析与认知机制的连接

前面的认知理论已经建立:

结构匹配 → 对象匹配 → 属性值匹配 → 方法匹配 → 实例化 → 运算 → 判断 → 认知结果

而需求解析负责为这一过程提供结构化入口。

因此:

Demand
   ↓
Demand Analysis
   ↓
Demand Structure
   ↓
Structure Matching
   ↓
Object Matching
   ↓
Attribute / Value Matching
   ↓
Method Matching
   ↓
Instantiation
   ↓
Operation
   ↓
Judgment
   ↓
Cognition Result

这说明需求解析不是独立于认知机制之外的预处理步骤。

它是认知过程的需求结构入口。


2.30 需求解析与感知

如果需求解析发现:

Object明确
Attribute明确
State明确
Goal明确

但发现:

Value缺失

则系统可能需要感知。

例如:

“判断当前设备是否过热。”

需求解析:

Object = Device
Attribute = Temperature
State = Overheated
Goal = Determine

但当前:

Temperature Value = Unknown

因此:

Demand Analysis
      ↓
Value Gap
      ↓
Information Requirement
      ↓
Perception
      ↓
Temperature
      ↓
Value
      ↓
State Evaluation

因此需求解析可以直接产生Information Gap。


2.31 需求解析与知识缺口

同样,如果需求结构已经明确:

Object
Attribute
State
Goal
Constraint

但是系统没有相应Knowledge,则:

Demand Structure
       ↓
Knowledge Matching
       ↓
Knowledge Gap
       ↓
Perception / Learning

因此:

需求解析不仅确定需求是什么,还可以确定系统为了满足需求还缺什么Knowledge。

这是需求理论与Knowledge理论之间的重要连接。


2.32 需求解析结果的类型

需求解析完成后,可能形成不同结果。

1. 完整需求结构

Complete Demand Structure

2. 部分需求结构

Partial Demand Structure

3. 候选需求结构

Candidate Demand Structures

4. 多需求结构

Multiple Demand Structures

5. 复合需求结构

Composite Demand Structure

6. 冲突需求结构

Conflicted Demand Structure

7. 不可解析需求

Unresolvable Demand

8. 需要补充信息的需求

Demand Requiring More Information

这些结果不能简单归并为“成功”或“失败”。

因为智能系统需要保留需求解析过程中的结构状态。


2.33 多需求解析

一个输入可能包含多个Demand。

例如:

“检查库存,找出缺货风险最高的产品,并生成补货建议。”

这里至少包含:

Demand A
检查库存

Demand B
识别缺货风险

Demand C
生成补货建议

它们之间存在顺序关系:

Demand A
   ↓
Demand B
   ↓
Demand C

因此可以形成:

D1+R12+D2+R23+D3→CompositeDemandStructureD_1 + R_{12} + D_2 + R_{23} + D_3 \rightarrow CompositeDemandStructure

这与普通多个Demand并存不同。

如果Demand之间存在任务依赖关系,就可以形成复合需求结构。


2.34 需求结构的可运算性

需求解析的最终目的不是让Demand“看起来结构化”。

真正目标是:

使Demand Structure能够参与Knowledge Matching、Structure Matching、Method Matching和Operation。

因此Demand Structure必须具有必要的:

Element
Relation
Context
Condition
Constraint
Expected Result

并能够形成:

DemandStructure→Matching→OperationDemandStructure \rightarrow Matching \rightarrow Operation

例如:

Demand:
判断库存是否不足

Demand Structure:
Object = Product
Attribute = Inventory
Condition = Inventory < Safety Inventory
Goal = Determine
Expected Result = Boolean

这样系统才能进一步匹配:

Product Class
Inventory Attribute
Safety Inventory Knowledge
Compare Method

并执行:

Inventory < Safety Inventory

最终产生:

Result = True / False

因此:

需求结构化的最终标准,是是否能够进入后续结构运算,而不仅仅是是否完成字段提取。


2.35 需求解析的核心结构模型

综合本章,可以建立WSaiOS-SI需求解析模型:

                         Demand
                           │
                           ▼
                Autonomous Semantic
                   Understanding
                           │
                           ▼
                    Demand Elements
                           │
        ┌──────────┬───────┼───────┬──────────┐
        ▼          ▼       ▼       ▼          ▼
      Object    Attribute  State   Goal    Constraint
        │          │       │       │          │
        │          ▼       │       ▼          │
        │         Value     │   Expected      │
        │                   │    Result       │
        └────────────┬──────┴──────┬───────────┘
                     ▼             ▼
                  Relation       Condition
                     │             │
                     └──────┬──────┘
                            ▼
                     Context Binding
                            │
                            ▼
                    Demand Structure
                            │
                            ▼
                       Validation
                            │
                  ┌─────────┴─────────┐
                  ▼                   ▼
               Valid               Gap/Conflict
                  │                   │
                  ▼                   ▼
          Structure Matching      Perception /
          Knowledge Matching      User Input /
          Method Matching         Resolution

2.36 需求解析的基本原则

由上述理论可以建立WSaiOS-SI需求解析的基本原则。

原则一:自主语义解析原则

需求必须经过WSaiOS-SI自身的自主语义理解,而不能把外部模型输出直接视为需求结构。

原则二:结构角色原则

同一个信息Element在不同Context和Relation中可以承担不同结构角色。

原则三:Object绑定原则

Attribute、Value、State和Condition必须在必要情况下绑定到对应Object。

原则四:Attribute—Value分离原则

Attribute表示对象结构成员,Value表示具体取值,二者不得混淆。

原则五:Value—State分离原则

Value是具体值,State是由Value、Relation、Condition、Rule和Context共同形成的对象状态。

原则六:Condition—State分离原则

Condition用于判断,State用于表达Object当前状态。

原则七:Goal—Result分离原则

Goal表达希望达到的目标,Expected Result表达希望得到的结果。

原则八:Constraint独立原则

Constraint用于限制问题解决空间,不应简单等同于Condition。

原则九:Relation完整原则

需求Element必须通过Relation形成完整Demand Structure,而不是停留在Element集合。

原则十:Context原则

需求Element的语义必须结合Context进行确定。

原则十一:Knowledge辅助原则

已有Knowledge可以辅助补充需求中未显式表达但结构上必要的Element。

原则十二:显式与推导分离原则

Demand Structure必须区分原始需求显式表达的Element与根据Knowledge推导出的Element。

原则十三:不确定性保留原则

无法确定的需求结构不得被强制确定,应保留候选、未知或待补充状态。

原则十四:冲突保留原则

需求内部存在冲突时,应识别并保留冲突,而不是简单覆盖其中一个结构。

原则十五:可运算原则

需求结构化的最终目标是使Demand能够进入Structure Matching、Method Matching和Operation过程。


2.37 需求解析的完整理论链

本章建立的需求解析过程可以最终表示为:

DemandInformation→AutonomousSemanticUnderstanding→ElementRecognition→RoleRecognition→RelationRecognition→ContextBinding→DemandStructure→ValidationDemandInformation \rightarrow AutonomousSemanticUnderstanding \rightarrow ElementRecognition \rightarrow RoleRecognition \rightarrow RelationRecognition \rightarrow ContextBinding \rightarrow DemandStructure \rightarrow Validation

其中:

DemandStructure=⟨Object,Attribute,Value,State,Condition,Goal,Constraint,Relation,Context,ExpectedResult⟩DemandStructure = \langle Object, Attribute, Value, State, Condition, Goal, Constraint, Relation, Context, ExpectedResult \rangle

随后进入:

DemandStructure→KnowledgeMatching→StructureMatching→ObjectMatching→AttributeValueMatching→MethodMatching→Instantiation→OperationDemandStructure \rightarrow KnowledgeMatching \rightarrow StructureMatching \rightarrow ObjectMatching \rightarrow AttributeValueMatching \rightarrow MethodMatching \rightarrow Instantiation \rightarrow Operation

最终:

Operation→Result→Judgment→CognitionResult→DecisionOperation \rightarrow Result \rightarrow Judgment \rightarrow CognitionResult \rightarrow Decision


2.38 本章理论结论

需求解析的核心不是把一句话拆成几个关键词,而是把需求转换为一个具有明确结构角色、Relation、Context、Condition和Constraint的Demand Structure。

其基本过程为:

需求信息 → WSaiOS-SI自主语义理解 → Element识别 → 结构角色识别 → Relation识别 → Demand Structure → 结构验证

其中六类核心需求Element形成需求结构的主要骨架:

Object、Condition、Attribute、State、Goal、Constraint。

它们又与Value、Relation、Context、Rule和Expected Result共同构成完整的需求结构。

核心关系为:

Object→Attribute→Value→Condition→StateObject \rightarrow Attribute \rightarrow Value \rightarrow Condition \rightarrow State

同时:

Goal→ExpectedResultGoal \rightarrow ExpectedResult

以及:

Constraint→SolutionSpaceConstraint \rightarrow SolutionSpace

最终通过Relation统一组织:

Element+Relation+Context→DemandStructureElement + Relation + Context \rightarrow DemandStructure

因此:

需求解析的本质,是将“需要解决什么问题”转换为“当前需要处理什么Object、什么Attribute、什么Value、什么State、满足什么Condition、达到什么Goal以及遵守什么Constraint”的结构化问题定义。

进一步:

Demand Structure不是静态描述,而是后续Knowledge Matching、Structure Matching、Object Matching、Attribute/Value Matching、Method Matching、Instantiation和Operation的直接需求入口。

由此,WSaiOS-SI形成从需求到认知的连续结构:

需求
 ↓
需求解析
 ↓
Object / Attribute / Value / State
Condition / Goal / Constraint
 ↓
Demand Structure
 ↓
Knowledge Matching
 ↓
Structure Matching
 ↓
Object Matching
 ↓
Attribute / Value / State Matching
 ↓
Method Matching
 ↓
Instantiation
 ↓
Operation
 ↓
Result
 ↓
Judgment
 ↓
Cognition Result

这说明:

需求不是一个等待执行的命令,而是一个需要先被结构化理解的问题空间。

而需求解析,就是将这个问题空间转换为WSaiOS-SI能够进一步匹配、运算、判断和形成认知的结构入口。

Leave a Reply

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

客服咨询
● 欢迎咨询与合作
您好!欢迎咨询。 我可以帮助您了解人工智能技术研发、智能软件系统开发、网站建设、搜索优化及项目定制等相关信息。 请问有什么可以帮您?
免费申请
请填写以下信息,方便我们进一步沟通。
欢迎咨询 AI 系统开发、网站建设、搜索优化、项目定制合作
电话:15089196448
邮箱:1602401899@qq.com
地址:陕西省渭南市
服务时间:周一至周五 09:00 - 18:00 | 7×24小时技术值守