update: 平台工参导出接口
MemRelay-Operation: memory-save:platform-gongcan-fact-20261111-8 MemRelay-Resource: 84d426a9-a184-4d1c-b84c-6dba63f37777
This commit is contained in:
@@ -8,10 +8,10 @@ memory_type: fact
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||
status: active
|
||||
revision: 7
|
||||
request_id: nqi-agent-gongcan-20261111-1
|
||||
revision: 8
|
||||
request_id: platform-gongcan-fact-20261111-8
|
||||
created_at: '2026-11-10T13:40:51.351339+00:00'
|
||||
updated_at: '2026-11-10T16:29:37.396918+00:00'
|
||||
updated_at: '2026-11-10T18:02:43.433913+00:00'
|
||||
tags:
|
||||
- NQI
|
||||
- 工参
|
||||
@@ -23,32 +23,22 @@ tags:
|
||||
nqi-opencode.chlz 是 OpenCode 页面抓包,没有 pro-assistant-server 的实际请求。导出说明在会话 ses_e3a7adae3ffe4QxrqaKUPgGATq,对应脚本 download-file-all-async.py。nqi-agent.chlz 是 2026-11-11 00:03 到 00:16 的 OpenCode 会话,里面已经有导出后的工参文件正文。
|
||||
|
||||
## 下载请求
|
||||
- POST https://nqi.gmcc.net:20443/pro-assistant-server/smart/file/download
|
||||
- 只有请求头 Content-Type: application/json,不发 Cookie。
|
||||
- 查询参数 tickets 来自 OpenCode 运行环境的 OPENCODE_TOOL_TICKET。
|
||||
- 请求体是 {"sql": "..."},响应是流式 CSV。另有查询接口 pro-assistant-server/smart/execSql,同样读这个环境变量。
|
||||
- 2026-11-10 用账号池里 dwmoyingda 的 CASTGC 从线上服务器和本机请求,该路径均被 nginx 返回 403;同一会话访问即席查询正常。
|
||||
- POST https://nqi.gmcc.net:20443/pro-assistant-server/smart/file/download,只有 Content-Type: application/json,不发 Cookie,查询参数 tickets 来自 OpenCode 运行环境的 OPENCODE_TOOL_TICKET,请求体 {"sql": "..."},响应是流式 CSV。
|
||||
- 2026-11-10 用账号池 CASTGC 从线上服务器和本机直接请求,该路径均被 nginx 返回 403。只能经 OpenCode 会话让 AI 执行脚本。
|
||||
|
||||
## 这次抓包里的工参
|
||||
- GET /pro-opencode/dwmoyingda/file/content?path=data/2026-11-09/4G小区工参.csv,正文 40334 行、74 列。city 全部是江门。longitude 有数值 40260、空 74,没有星号脱敏。latitude 同样。curr_flag true 35747、false 4587。
|
||||
- 5G 文件 data/2026-11-09/5G小区工参.csv,23821 行、69 列。city 为江门的 23723 行。longitude 数值 23732,另有 68 个因 CSV 错列变成文字或 UUID,空 21。latitude 数值 23720。curr_flag true 12540、false 11263。有 36 行列数不足。
|
||||
- 这是 2026-11-09 的一次导出快照,不是持续更新的接口。当前清单要筛 curr_flag=true。即席查询结果表里的经纬度仍然是脱敏值。
|
||||
## OpenCode 接口(已在生产跑通,实现 app/nqi/opencode.py)
|
||||
- 开通:GET /pro-opencode/api/provision?random=&__PID=LXWXYWGZT&token=<CASTGC> 返回 307 到 /pro-opencode/<用户>/L3dvcmtzcGFjZQ/session?...,再 GET 该地址种下 oc_castgc。
|
||||
- 之后前缀 /pro-opencode/<用户>/,除 file/content 外都带 tickets=<CASTGC>,头 x-opencode-directory: %2Fworkspace。
|
||||
- 接口:session(POST/GET/DELETE)、session/<id>/prompt_async(204)、session/status、session/<id>/message、permission、question、file、file/content、global/health。模型 DeepSeek-V4-Flash-0731-w8a8。
|
||||
- OPENCODE_TOOL_TICKET 就是当前登录的 CASTGC(TGT),账号登出或 TGT 失效后一起失效。
|
||||
|
||||
## 发送指令
|
||||
nqi-agent.chlz 里发给 AI 的请求是 POST /pro-opencode/dwmoyingda/session/<会话>/prompt_async,返回 204。2026-11-11 00:04:55 的正文是导出江门 4G/5G 工参,00:14:00 的正文是清理下载数据。正文只有 messageID、agent、model、parts[].text,没有票据。
|
||||
## 表(information_schema 实查)
|
||||
- 4G:appdbv3.a_common_cfg_lte_cellant_d,天线粒度,一个 CGI 可有多行。没有 starttime;有 eff_from_date/eff_to_date(timestamp)、curr_flag、cgi、cell_name、station_name、enodeb_id/name、latitude/longitude(numeric)、network_type、area、town、state、cover_type、frequency_band、vendor、azimuth 等。
|
||||
- 5G:appdbv3.a_common_cfg_nr_cellant_d,ncgi、nrcell_name、gnodeb_id/name 等,每行 cgi == ncgi。
|
||||
- 某天的状态用 city = '江门' and eff_from_date <= make_date(...) and eff_to_date > make_date(...),不用 curr_flag。
|
||||
- 即席查询对应表:4G appdbv3.v_a_common_cfg_lte_cellant_d(cgi)、5G appdbv3.a_common_cfg_nr_cellant_d(ncgi),time_field starttime,天粒度,经纬度脱敏。
|
||||
|
||||
## 轮询
|
||||
nqi-agent.chlz 从 00:04:09 到 00:15:59,GET /pro-opencode/dwmoyingda/global/health 73 次,间隔中位数 10 秒。每次都带与 CASTGC 相同的 tickets,以及 oc_castgc、opencode_route、oc_locale、metabase.DEVICE。
|
||||
同一时段 GET /file 104 次,密集时间隔中位数 2 秒,中间有三次较长停顿。凭据与健康检查相同。
|
||||
|
||||
## 凭据
|
||||
- OPENCODE_TOOL_TICKET 就是当前登录的 CASTGC。provision 的 token、跳转地址上的 tickets、prompt_async 的 tickets 与 Cookie CASTGC 完全相同。
|
||||
- 登录抓包里 CASTGC、TGC 的 Set-Cookie 只有 Path,没有 Expires 和 Max-Age。
|
||||
|
||||
## 过期
|
||||
导出和发送指令使用的票据都是门户登录的 CASTGC。账号登出或这张 TGT 在服务器上失效后,tickets 一起失效。
|
||||
|
||||
## 表
|
||||
- 4G:appdbv3.a_common_cfg_lte_cellant_d。
|
||||
- 5G:appdbv3.a_common_cfg_nr_cellant_d。
|
||||
- 当前记录用 curr_flag = true,地市用 city = '江门'。
|
||||
## 实测规模(江门)
|
||||
- 2026-11-01:4G 40,816 行 3.35 MB(去重 38,038 个 CGI,2,731 个有多行),5G 23,814 行 2.4 MB,0 坏行。
|
||||
- 生产快照 2026-11-10:4G 37,604 + 5G 23,801 个小区,61,337 有坐标,整份 80 秒;2026-10-01:62,063 个,72 秒。
|
||||
- 一条提示词 4 条命令约 138 秒、约 22 万输入 token;读文件 0.1–0.2 秒;清理约 10 秒。
|
||||
Reference in New Issue
Block a user