惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - luckygxf

javascript构造方法 数据库连接池初始连接 分布式系统CAP理论(一) 数据库连接太多排查(一) 审批流程-节点自动审批通过 防表单重复提交 深分页问题 devops 对象存储迁移-组件上线 工作效率提升 新需求开发-重构老的逻辑 js析构赋值 框架的好处和不足 React框架Hello world 数据库表设计在哪个接口 需求实现-ddd四层架构实现 前端代码(一) 高内聚,低耦合 对象存储改造 mermaid初体验 业务逻辑优化-解决提示词问题打分不准 idea 插件envfile初体验 防盗链-防盗用链接 springboot项目启动小技巧 github托管网站 AI MCP开发 AI中 MCP 作用 mapconstruct 初体验 架构积累-解耦与防腐 表创建索引的重要性 重构注意事项(一) drawio初体验 六边形架构 架构积累-依赖注入和SOLID原则 工作总结-定时任务 工作总结-知识通关需求上线 工作总结-演练场景映射方案 工作总结-MVP 工作总结-需要学习的方向 工作总结-接口优化 python asyncio demo 工作总结-问题筛选方案 工作总结-工具分享 工作总结-提示词优化 工作总结-工作优先级 工作总结-灰度发布
工作总结-sse接口心跳
luckygxf · 2026-03-26 · via 博客园 - luckygxf

项目需要使用大模型从文件内容中提取问答对,文件内容是通过mcp工具解析出来的。大模型提取问答对,时间不固定。使用sse协议发送给前端,因为需要对每个问题加id字段,分批处理文本。时间还是不固定,长时间不返回数据给前端,导致前端请求超时。

使用python 异步执行文件提取任务,每个5秒检测任务是否完成,任务没有完成,发送一个数据给前端,表示文件还没解析完。文件附件解析完后,把解析内容,返给前端。都解析完了,解析完成字段设置为true。

1. 一个是使用sse

2. 拆分文件内容

3. 定时发送数据给前端,保活,避免超时