s01
流水线架构
架构层五步流水线从文档到预测报告
文档→图谱→智能体→仿真→报告的完整预测链路将预测问题拆解为五个渐进式阶段,每个阶段的输出是下一阶段的输入,形成数据驱动的推演闭环
五步流水线从文档到预测报告
文档→图谱→智能体→仿真→报告的完整预测链路将预测问题拆解为五个渐进式阶段,每个阶段的输出是下一阶段的输入,形成数据驱动的推演闭环
传统预测方法依赖统计模型或专家判断,难以捕捉群体行为的涌现效应。MiroFish 设计了一条五步流水线:文档解析→知识图谱→智能体仿真→报告生成→深度交互,每一步的输出自然地成为下一步的输入,形成端到端的预测闭环。
Flask 应用工厂:三个蓝图对应流水线的三大阶段
def create_app(config_class=Config):
app = Flask(__name__)
app.config.from_object(config_class)
CORS(app, resources={r"/api/*": {"origins": "*"}})
# 注册模拟进程清理函数
from .services.simulation_runner import SimulationRunner
SimulationRunner.register_cleanup()
# 三个蓝图 = 三大阶段
from .api import graph_bp, simulation_bp, report_bp
app.register_blueprint(graph_bp, url_prefix='/api/graph')
app.register_blueprint(simulation_bp, url_prefix='/api/simulation')
app.register_blueprint(report_bp, url_prefix='/api/report')
return app前端路由:5 个页面对应流水线的 5 个步骤
const routes = [
{ path: '/', component: Home }, // 首页:上传文档
{ path: '/process/:projectId', component: MainView }, // Step1: 图谱构建
{ path: '/simulation/:simulationId', component: SimulationView }, // Step2: 环境配置
{ path: '/simulation/:simulationId/start', component: SimulationRunView }, // Step3: 仿真执行
{ path: '/report/:reportId', component: ReportView }, // Step4: 报告生成
{ path: '/interaction/:reportId', component: InteractionView } // Step5: 深度交互
]