# mermaid画图

```mermaid
graph TD
    A[多智能体随机网络结构分析] --> B[多智能体协同学习与推理]
    
    A --> A1["谱参数实时估算"]
    A1 --> A11["卡尔曼滤波"]
    A1 --> A12["矩阵扰动理论"]
    A1 --> A13["输出：谱参数"]
    A --> A2["网络拓扑重构"]
    A2 --> A21["低秩分解重构"]
    A2 --> A22["聚类量化"]
    A2 --> A23["输出：邻接矩阵、特征矩阵"]
    
    
    

    
```

```mermaid
graph TD
    B[多智能体协同学习与推理]
	B --> B1["联邦学习、强化学习"]
    B1 --> B11["谱驱动学习率调整"]
    B1 --> B12["自适应节点选择策略"]
    B --> B2["动态图神经网络"]
    B2 --> B21["动态图卷积设计"]
    B2 --> B22["一致性推理"]
```

```mermaid
graph TD
    %% 颜色和样式定义
    classDef startEnd fill:#e6ffe6,stroke:#333,stroke-width:2px
    classDef operation fill:#fff,stroke:#000,stroke-width:1px
    classDef decision fill:#ffcccc,stroke:#000,stroke-width:1px
    classDef update fill:#ccffcc,stroke:#000,stroke-width:1px

    %% 节点定义（严格按图片顺序）
    A([开始]):::startEnd
    B[交易信息\n外部订单号]:::operation
    C{判断是否为锁单订单}:::decision
    D[查询拼团组队信息]:::operation
    E[更新订单详情\n状态为交易完成]:::update
    F[更新拼团组队进度]:::update
    G{拼团组队完结\n目标量判断}:::decision
    H[写入回调任务表]:::operation
    I([结束]):::startEnd

    %% 流程连接（完全还原图片走向）
    A --> B
    B --> C
    C -->|是| D
    D --> E
    E --> F
    F --> G
    G -->|是| H
    H --> I
    C -->|否| I
    G -->|否| I

    %% 保持原图连接线样式
    linkStyle 0,1,2,3,4,5,6,7,8 stroke-width:1px
```

```mermaid
graph TD
    A[用户发起退单请求] --> B{检查拼团状态}
    
    B -->|拼团未完成| C1[场景1:拼团中退单]
    C1 --> D1{是否已支付?}
    D1 -->|未支付| E1[取消订单]
    E1 --> F1[更新订单状态为2]
    F1 --> G1[通知拼团失败]
    G1 --> H1[退单完成]
    D1 -->|已支付| I1[发起退款]
    I1 --> F1
    
    B -->|拼团已完成| C2[场景2:完成后退单]
    C2 --> D2{是否超时限?}
    D2 -->|未超时| E2[发起退款]
    E2 --> F2[更新订单状态]
    F2 --> H1
    D2 -->|超时| G2[退单失败]
    
    style A fill:#f9f,stroke:#333
    style B fill:#66f,stroke:#333
    style C1 fill:#fbb,stroke:#f66
    style C2 fill:#9f9,stroke:#090

```

```mermaid
flowchart LR
    %% ===================== 左侧：模板模式块 =====================
    subgraph Template["设计模式 - 模板"]
        direction TB
        SM["StrategyMapper
        策略映射器"]
        SH["StrategyHandler
        策略处理器"]
        ASR["AbstractStrategyRouter<T, D, R>
        策略路由抽象类"]

        SM -->|实现| ASR
        SH -->|实现| ASR
    end

    %% ===================== 右侧：策略工厂与支持类 =====================
    DASFactory["DefaultActivityStrategyFactory
    默认的拼团活动策略工厂"]
    AGMS["AbstractGroupBuyMarketSupport
    功能服务支撑类"]

    DASFactory --> AGMS
    AGMS -->|继承| ASR

    %% ===================== 业务节点链路 =====================
    Root["RootNode
    根节点"]
    Switch["SwitchRoot
    开关节点"]
    Market["MarketNode
    营销节点"]
    End["EndNode
    结尾节点"]
    Other["其他节点"]

    AGMS --> Root
    Root --> Switch
    Switch --> Market
    Market --> End
    Switch -.-> Other
    Other --> End

    %% ===================== 样式（可选） =====================
    classDef green fill:#DFF4E3,stroke:#3B7A57,stroke-width:1px;
    classDef red fill:#E74C3C,color:#fff,stroke:#B03A2E;
    classDef purple fill:#7E60A2,color:#fff,stroke:#4B3B6B;
    classDef blue fill:#3DA9F5,color:#fff,stroke:#1B6AA5;

    class SM,SH,Root,Switch,Market,End,Other green;
    class DASFactory red;
    class AGMS purple;
    class ASR blue;

    style Template stroke-dasharray: 5 5;

```

