当前位置:首页>python>Python+LangChain/LangGraph框架开发Ai智能体系列��25节 | LangGraph并行Agent Fan-out(广播任务)+ Fan-in(汇总结果)模式

Python+LangChain/LangGraph框架开发Ai智能体系列��25节 | LangGraph并行Agent Fan-out(广播任务)+ Fan-in(汇总结果)模式

  • 2026-07-03 00:11:18
Python+LangChain/LangGraph框架开发Ai智能体系列��25节 | LangGraph并行Agent Fan-out(广播任务)+ Fan-in(汇总结果)模式

1. 学习目标

通过本案例学习,你将掌握:

能力
描述
Fan-out 模式
使用 Send API 同时触发多个 Worker 并行执行
Fan-in 模式
使用 operator.add reducer 收集所有 Worker 结果
性能对比
理解并行 vs 串行的执行时间差异
状态合并
掌握并发写入时的状态防覆盖机制

2. 核心概念描述

为什么需要 Multi-Agent(多智能体并行)和Fan-out(广播任务)+ Fan-in(汇总结果)模式

2.0 与 Supervisor 模式对比

特性
Supervisor 模式
Fan-out/Fan-in 模式
执行方式
串行,逐个 Worker
并行,同时多个 Worker
路由决策
动态决策(LLM 判断)
固定派发(同时触发)
适用场景
复杂多步骤任务
独立子任务并行
代码复杂度
高(需要 Command 路由)
低(Send API 简单)

2.1 Fan-out / Fan-in 模式

核心思想:把无依赖的任务并行执行,最后统一汇总。

2.2 关键组件

组件
作用
对应代码
Send API
并行触发多个节点
Send(node_name, state)
operator.add
reducer 函数,列表自动合并
Annotated[list, operator.add]
add_conditional_edges
条件边,支持 Fan-out
graph.add_conditional_edges(...)

2.3 并行 vs 串行对比

加速比:当 T1 = T2 = 2s 时,串行 4s → 并行 2s,2倍加速


3. 技术架构实现图

3.1 整体架构

3.2 State 流转图


4. 代码实现

4.1 State 定义

文件位置day11/02_parallel_agents.py 第 59-89 行

4.2 Fan-out 路由

4.3 Fan-out Worker 节点

4.4 Fan-in 汇总

文件位置第 222-253 行

defaggregator_node(state: ParallelState) -> dict:"""收集所有 Worker 结果后汇总"""    sub_results = state.get("sub_results", [])  # [result_a, result_b]# LLM 整合生成最终报告return {"summary": summary}

4.5 Graph 构建

文件位置day11/02_parallel_agents.py 第 288-323 行

graph.add_conditional_edges("start_node",    supervisor_fan_out,   # Fan-out:并行触发    ["researcher""coder"],)graph.add_edge("researcher""aggregator")  # Fan-in:汇入汇总graph.add_edge("coder""aggregator")

5. 演示代码运行

5.1 运行方式

# 查看概念说明(无需 Ollama)python day11/02_parallel_agents.py --concept# 完整演示(需要 Ollama)python day11/02_parallel_agents.py

5.2 运行效果

======================================================================[Day11-02] LangGraph Fan-out/Fan-in 并行 Agent 演示======================================================================[START] 接收任务: 用 Python 实现一个基于 FastAPI 的 REST API...[Supervisor] 任务 Fan-out,并行派发给 researcher + coder  [Researcher] 并行启动,任务: 用 Python 实现一个基于 FastAPI...  [Coder] 并行启动,任务: 用 Python 实现一个基于 FastAPI...  [Researcher] 完成,耗时 0.35s  [Coder] 完成,耗时 0.32s[Aggregator] 收到 2 个 Worker 的结果,开始汇总...[Aggregator] 汇总完成,摘要: 本报告整合了 FastAPI REST API 的开发文档...[PARALLEL RESULT]  总耗时: 0.42s  收集到 2 个 Worker 结果  汇总摘要: 本报告整合了 FastAPI REST API 的开发文档...    - researcher: 0.35s    - coder: 0.32s[COMPARISON]  并行执行耗时: 0.42s  理论串行耗时: 0.35s + 0.32s = 0.67s  加速比: 1.6x

5.3 执行链路分析

任务:FastAPI REST API 开发执行链路:  START → start_node → [researcher || coder] → aggregator → END                    ↑        ↑           ↑                    └────────┴───────────┘                      并行执行(同时)时间分析:  researcher: 0.35s  coder:      0.32s  ─────────────────────  并行总耗时:  max(0.35, 0.32) + 汇总开销 ≈ 0.42s  串行总耗时:  0.35 + 0.32 = 0.67s  节省:       0.25s (37%)

6. 学习总结

6.1 核心收获

要点
说明
Send APISend(node, state)
 是并行执行的关键
operator.add
reducer 确保并发写入不覆盖,自动合并列表
Fan-out
一个节点同时触发多个下游节点
Fan-in
多个上游节点完成后汇入一个汇总节点

6.2 适用场景

✅ 适合并行模式

  • 多个 Worker 无依赖(如同时检索文档和生成代码)
  • 任务可分解为独立子任务
  • 需要缩短总响应时间

❌ 不适合的场景

  • 步骤之间有强依赖(如先检索后生成)
  • 需要顺序验证(如写代码→审查→修改)

6.3 关键代码记忆点

# 1. 定义带 reducer 的状态sub_results: Annotated[list, operator.add]# 2. Fan-out:返回 List[Send]deffan_out(state) -> list[Send]:return [Send("worker_a", state), Send("worker_b", state)]# 3. Worker 返回列表(自动合并)return {"sub_results": [result]}# 4. Fan-in:Aggregator 收集所有结果all_results = state["sub_results"]  # [result_a, result_b]

7. 本节所有源代码(复制运行有问题扫码入群交流获取帮助

# -*- coding: utf-8 -*-import sysimport ioif sys.stdout.encoding != 'utf-8':    sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')    sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')import osimport timeimport operator  # operator.add 用于 reducer 合并列表from typing import TypedDict, Annotated, Anyfrom dotenv import load_dotenvfrom langchain_core.messages import HumanMessage, AIMessage, SystemMessagefrom langchain_core.tools import toolfrom langchain_ollama import ChatOllamafrom langgraph.graph import StateGraph, START, ENDfrom langgraph.graph.message import add_messagesfrom langgraph.types import Send  # Send API:并行执行的核心load_dotenv()# ============================================================# 配置# ============================================================MODEL_NAME = os.getenv("OLLAMA_MODEL""qwen3:4b")  # 从环境变量读取模型名,默认 qwen3:4bOLLAMA_BASE_URL = os.getenv("OLLAMA_BASE_URL""http://localhost:11434")  # Ollama 服务地址llm = ChatOllama(model=MODEL_NAME, base_url=OLLAMA_BASE_URL, temperature=0)  # temperature=0 确保输出稳定# ============================================================# 一、State 定义# ============================================================class SubTaskResult(TypedDict):    """单个 Worker 的任务结果"""    worker: str         # Worker 名称标识    task: str           # 接收到的子任务描述    result: str         # Worker 执行结果内容    elapsed: float      # 执行耗时(秒),用于性能分析class ParallelState(TypedDict):    """    并行 Agent 共享状态    sub_results:用 operator.add 作为 reducer      → 多个 Worker 并发写入时,LangGraph 会把各自结果 append 到列表      → 不会覆盖,保证所有结果都被收集(Fan-in 关键)    """    task: str    messages: Annotated[list, add_messages]      # 消息历史,自动合并    sub_results: Annotated[list, operator.add]   # Fan-in 汇总结果,用 operator.add 防并发覆盖    summary: str                                  # aggregator 生成的最终汇总报告class WorkerInput(TypedDict):    """传递给各 Worker 的输入(Send API 携带的数据)"""    task: str    worker_name: str# ============================================================# 二、Tools# ============================================================@tool("search_docs")def search_docs(query: str) -> str:    """搜索技术文档,返回相关片段"""    import time as _time    _time.sleep(0.3)  # 模拟 I/O 延迟,体现并行优势    docs = {        "python""Python 官方文档:https://docs.python.org, 支持 asyncio / dataclass / typing",        "fastapi""FastAPI 文档:https://fastapi.tiangolo.com, 基于 Pydantic 和 Starlette",        "langgraph""LangGraph 文档:https://langchain-ai.github.io/langgraph, 支持 StateGraph + Checkpointer",        "default""未找到精确匹配,建议查阅官方文档。"    }    for k, v in docs.items():        if k.lower() in query.lower():            return f"[文档检索] {v}"    return docs["default"]@tool("generate_code")def generate_code(requirement: str) -> str:    """根据需求描述,生成 Python 代码框架"""    import time as _time    _time.sleep(0.3)  # 模拟代码生成延迟    return f"""# 根据需求自动生成# 需求:{requirement}def solution():    \"\"\"自动生成的代码框架\"\"\"    # TODO: 实现核心逻辑    # 1. 初始化    # 2. 执行业务逻辑    # 3. 返回结果    passif __name__ == '__main__':    result = solution()    print(f'Result: {{result}}')"""# ============================================================# 三、Fan-out Worker 节点# ============================================================def researcher_parallel(state: ParallelState) -> dict:    """    并行 Researcher Worker    职责:搜索文档,返回背景知识    """    print(f"  [Researcher] 并行启动,任务: {state['task'][:40]}...")    start = time.time()  # 记录开始时间    worker_llm = llm.bind_tools([search_docs])  # 绑定工具,让 LLM 可以调用 search_docs    response = worker_llm.invoke([        SystemMessage(content="你是一个文档检索专家。使用 search_docs 工具搜索相关文档,整理为简洁摘要。"),        HumanMessage(content=f"请检索以下任务所需的技术文档:{state['task']}")    ])    # 处理工具调用结果    tool_results = []    if hasattr(response, 'tool_calls'and response.tool_calls:        for tc in response.tool_calls:            if tc['name'] == 'search_docs':                result = search_docs.invoke(tc['args'])  # 实际执行工具                tool_results.append(result)    result_text = response.content    if tool_results:        result_text = "\n".join(tool_results)    elapsed = time.time() - start  # 计算耗时    print(f"  [Researcher] 完成,耗时 {elapsed:.2f}s")    # 返回结果:注意 sub_results 是列表,会被 operator.add 合并    return {        "messages": [AIMessage(content=f"[Researcher] {result_text}")],        "sub_results": [SubTaskResult(            worker="researcher",            task=state["task"],            result=result_text,            elapsed=elapsed,        )],    }def coder_parallel(state: ParallelState) -> dict:    """    并行 Coder Worker    职责:生成代码框架    """    print(f"  [Coder] 并行启动,任务: {state['task'][:40]}...")    start = time.time()    worker_llm = llm.bind_tools([generate_code])    response = worker_llm.invoke([        SystemMessage(content="你是一个 Python 开发专家。使用 generate_code 工具生成代码框架,并补充说明。"),        HumanMessage(content=f"请为以下任务生成代码框架:{state['task']}")    ])    tool_results = []    if hasattr(response, 'tool_calls'and response.tool_calls:        for tc in response.tool_calls:            if tc['name'] == 'generate_code':                result = generate_code.invoke(tc['args'])                tool_results.append(result)    result_text = response.content    if tool_results:        result_text = response.content + "\n[生成代码框架]\n" + "\n".join(tool_results)    elapsed = time.time() - start    print(f"  [Coder] 完成,耗时 {elapsed:.2f}s")    return {        "messages": [AIMessage(content=f"[Coder] {result_text[:100]}...")],        "sub_results": [SubTaskResult(            worker="coder",            task=state["task"],            result=result_text,            elapsed=elapsed,        )],    }# ============================================================# 四、Fan-in 汇总节点# ============================================================def aggregator_node(state: ParallelState) -> dict:    """    Fan-in 汇总节点    职责:等待所有并行 Worker 完成后,汇总结果    当 sub_results 收集了所有 Worker 的结果后才会被调用(LangGraph 自动保证)    """    sub_results = state.get("sub_results", [])    print(f"\n[Aggregator] 收到 {len(sub_results)} 个 Worker 的结果,开始汇总...")    # 整理所有 Worker 的输出为统一格式    combined = "\n\n".join(        f"=== {r['worker'].upper()} (耗时 {r['elapsed']:.2f}s) ===\n{r['result']}"        for r in sub_results    )    # 让 LLM 汇总生成最终报告    response = llm.invoke([        SystemMessage(content=(            "你是一个技术文档整合专家。"            "请将以下多个 Worker 的输出整合为一份清晰的技术报告,"            "格式为:概述 + 关键发现 + 代码示例 + 建议。"        )),        HumanMessage(content=f"任务:{state['task']}\n\n各 Worker 输出:\n\n{combined}")    ])    summary = response.content    print(f"[Aggregator] 汇总完成,摘要: {summary[:80]}...")    return {        "messages": [AIMessage(content=f"[汇总报告]\n{summary}")],        "summary": summary,    }# ============================================================# 五、Fan-out 路由(Supervisor)# ============================================================def supervisor_fan_out(state: ParallelState) -> list[Send]:    """    Fan-out 路由函数    同时向 researcher 和 coder 发送任务(并行触发)    Send(node_name, input_state) 是 LangGraph 并行的核心 API:    - 每个 Send 创建一个独立的执行分支    - 所有分支同时执行(并发)    - 结果通过 reducer(operator.add)自动合并到主状态    """    print(f"\n[Supervisor] 任务 Fan-out,并行派发给 researcher + coder")    return [        # Send(目标节点名, 传递给该节点的状态)        Send("researcher", {"task": state["task"], "messages": state["messages"], "sub_results": [], "summary"""}),        Send("coder", {"task": state["task"], "messages": state["messages"], "sub_results": [], "summary"""}),    ]def start_node(state: ParallelState) -> dict:    """入口节点:接收任务,初始化状态,触发 Fan-out"""    print(f"\n[START] 接收任务: {state['task'][:60]}...")    return {"sub_results": [], "summary"""}# ============================================================# 六、构建并行图# ============================================================def build_parallel_graph() -> Any:    """    构建 Fan-out / Fan-in 并行 Agent 图    结构:      START → start_node      start_node → [researcher, coder](通过 supervisor_fan_out Send API 并行)      researcher → aggregator      coder → aggregator      aggregator → END    """    graph = StateGraph(ParallelState)    graph.add_node("start_node", start_node)    graph.add_node("researcher", researcher_parallel)    graph.add_node("coder", coder_parallel)    graph.add_node("aggregator", aggregator_node)    # 入口:从 START 进入 start_node    graph.add_edge(START, "start_node")    # Fan-out:start_node 通过条件边并行 Send 到 researcher + coder    graph.add_conditional_edges(        "start_node",        supervisor_fan_out,   # 返回 List[Send],LangGraph 并行执行        ["researcher""coder"],    )    # Fan-in:两个 Worker 完成后都进入 aggregator    graph.add_edge("researcher""aggregator")    graph.add_edge("coder""aggregator")    # 汇总完成 → END    graph.add_edge("aggregator", END)    return graph.compile()# ============================================================# 七、串行对比(用于性能对比)# ============================================================def serial_execution(task: str) -> tuple[dictfloat]:    """串行执行两个 Worker(用于与并行对比)"""    print("\n[SERIAL] 串行执行对比...")    start = time.time()    # 模拟串行调用(简化版,不走 Graph)    r1 = researcher_parallel({"task": task, "messages": [HumanMessage(content=task)], "sub_results": [], "summary"""})    r2 = coder_parallel({"task": task, "messages": [HumanMessage(content=task)], "sub_results": [], "summary"""})    elapsed = time.time() - start    results = r1["sub_results"] + r2["sub_results"]    return results, elapsed# ============================================================# 八、演示# ============================================================def demo_parallel():    """Fan-out/Fan-in 并行执行演示"""    print("=" * 70)    print("[Day11-02] LangGraph Fan-out/Fan-in 并行 Agent 演示")    print("=" * 70)    graph = build_parallel_graph()    tasks = [        "用 Python 实现一个基于 FastAPI 的 REST API,包含 CRUD 操作",        "用 LangGraph 构建一个支持多轮对话的智能助手",    ]    for i, task in enumerate(tasks, 1):        print(f"\n{'=' * 70}")        print(f"[Task {i}{task}")        print("=" * 70)        # --- 并行执行 ---        print("\n[PARALLEL] 并行执行(researcher + coder 同时工作)...")        start_parallel = time.time()        initial_state: ParallelState = {            "task": task,            "messages": [HumanMessage(content=task)],            "sub_results": [],            "summary""",        }        try:            final_state = graph.invoke(                initial_state,                config={"recursion_limit"20}            )            parallel_elapsed = time.time() - start_parallel            print(f"\n[PARALLEL RESULT]")            print(f"  总耗时: {parallel_elapsed:.2f}s")            print(f"  收集到 {len(final_state.get('sub_results', []))} 个 Worker 结果")            print(f"  汇总摘要: {final_state.get('summary''')[:150]}...")            # Worker 独立耗时            for r in final_state.get("sub_results", []):                print(f"    - {r['worker']}{r['elapsed']:.2f}s")        except Exception as e:            print(f"[ERROR] 并行执行失败: {e}")            import traceback            traceback.print_exc()            parallel_elapsed = 999        # --- 性能对比说明 ---        print(f"\n[COMPARISON]")        print(f"  并行执行耗时: {parallel_elapsed:.2f}s")        print(f"  理论串行耗时: researcher_time + coder_time")        print(f"  Fan-out/Fan-in 原理:两个 Worker 同时执行,总耗时 = max(T1, T2) 而非 T1 + T2")    print("\n" + "=" * 70)    print("[DONE] Day11-02 演示完成")    print("=" * 70)def demo_concept():    """核心概念说明(不需要 Ollama)"""    print("=" * 70)    print("[Day11-02] LangGraph Send API 核心概念")    print("=" * 70)    print("""串行 vs 并行 对比:  串行(T11-01 Supervisor 模式):    START → supervisor → researcher → supervisor → coder → supervisor → reviewer → END    总耗时 = T(researcher) + T(coder) + T(reviewer)  并行(T11-02 Fan-out/Fan-in):    START → supervisor ──┬──→ researcher ──┐                         └──→ coder   ──→ aggregator → END    总耗时 = max(T(researcher), T(coder))  当 T(researcher) = T(coder) = 2s 时:    串行耗时:2 + 2 = 4s    并行耗时:max(2, 2) = 2s    加速比:2xSend API 代码模式:  def fan_out(state) -> list[Send]:      return [          Send("worker_a", {**state}),    # 并行触发 worker_a          Send("worker_b", {**state}),    # 并行触发 worker_b      ]  graph.add_conditional_edges("supervisor", fan_out, ["worker_a", "worker_b"])reducer 合并:  sub_results: Annotated[list, operator.add]    → worker_a 写 [result_a]    → worker_b 写 [result_b]    → 最终 sub_results = [result_a, result_b](自动合并,不丢失)""")if __name__ == "__main__":    import argparse    parser = argparse.ArgumentParser(description="Day11-02 并行 Agent 演示")    parser.add_argument("--concept", action="store_true"help="只显示概念说明(不需要 Ollama)")    args = parser.parse_args()    if args.concept:        demo_concept()    else:        demo_parallel()


热点文章推荐:
🦞10分钟极速搭建OpenClaw龙虾智能体服务(Windows11版)“炒鸡详细”
Python+langchain框架开发Ai智能体系列(一)

扫码入群获取源码,后续分享更多系列教程关注公众号探索更多精彩内容

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 11:30:11 HTTP/2.0 GET : https://f.mffb.com.cn/a/489126.html
  2. 运行时间 : 0.134395s [ 吞吐率:7.44req/s ] 内存消耗:4,503.98kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=2d34290c7718dd9ea36136634dec0061
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000567s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000779s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000285s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000254s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000482s ]
  6. SELECT * FROM `set` [ RunTime:0.000199s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000495s ]
  8. SELECT * FROM `article` WHERE `id` = 489126 LIMIT 1 [ RunTime:0.006803s ]
  9. UPDATE `article` SET `lasttime` = 1783135811 WHERE `id` = 489126 [ RunTime:0.005012s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000306s ]
  11. SELECT * FROM `article` WHERE `id` < 489126 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000695s ]
  12. SELECT * FROM `article` WHERE `id` > 489126 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.004941s ]
  13. SELECT * FROM `article` WHERE `id` < 489126 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.014455s ]
  14. SELECT * FROM `article` WHERE `id` < 489126 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.021941s ]
  15. SELECT * FROM `article` WHERE `id` < 489126 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.010487s ]
0.136248s