POD 趋势感知 Agent:缓存热点模式 + 三图合成 + 热点去重/风格去重 + review 兜底

- 缓存热点批量流程(有采集缓存不触发 Google)
- 简报不足直接从采集缓存生成(轻量补齐)
- 三图合成(模特/印花/底图)+ 底图压缩 <2MB
- 热点去重→风格去重自动切换 + 不适合类目 review 兜底
- 透明背景(background=transparent)+ 提示词清洗(敏感词/背景描述)
- 任务前 basemap 校验 + 模板国家校验 + 模特任务级分配
This commit is contained in:
2026-08-22 14:14:01 +08:00
commit f493bde8a9
98 changed files with 10280 additions and 0 deletions
+97
View File
@@ -0,0 +1,97 @@
# -*- coding: utf-8 -*-
import sqlite3
db_path = r"C:\Users\Admin\Desktop\test模版\design_agent\pod_trend_agent\db\spu_sku.db"
conn = sqlite3.connect(db_path)
cur = conn.cursor()
# 若表已存在则先删除(重建表结构)
cur.execute("DROP TABLE IF EXISTS SKU")
cur.execute("DROP TABLE IF EXISTS SPU")
# ---------- SPU 表 ----------
cur.execute("""
CREATE TABLE SPU (
id INTEGER PRIMARY KEY AUTOINCREMENT,
code TEXT,
material TEXT,
component_1 TEXT,
component_2 TEXT,
component_3 TEXT,
component_proportion_1 TEXT,
component_proportion_2 TEXT,
component_proportion_3 TEXT,
pattern TEXT,
details TEXT,
collar_style TEXT,
style TEXT,
care_Instructions TEXT,
fabric TEXT,
target_audience TEXT,
season TEXT,
is_transparent TEXT,
layout TEXT,
weaving_method TEXT,
printing_type TEXT,
fabric_texture_1 TEXT,
fabric_weight_1 TEXT,
fabric_weight_unit_1 TEXT,
lining_texture TEXT,
country TEXT,
mark TEXT
)
""")
# ---------- SKU 表 ----------
cur.execute("""
CREATE TABLE SKU (
id INTEGER PRIMARY KEY AUTOINCREMENT,
spu_id INTEGER NOT NULL,
code TEXT,
price REAL,
color TEXT,
size TEXT,
size_group TEXT,
size_type TEXT,
shoulder_width TEXT,
bust TEXT,
clothing_length TEXT,
sleeve_length TEXT,
longest_side TEXT,
secondary_long_side TEXT,
shortest_side TEXT,
package_weight TEXT,
img_url_2 TEXT,
img_url_3 TEXT,
img_url_4 TEXT,
img_url_5 TEXT,
FOREIGN KEY (spu_id) REFERENCES SPU(id)
)
""")
# 索引:SKU 按 spu_id 快速查询
cur.execute("CREATE INDEX idx_sku_spu_id ON SKU(spu_id)")
conn.commit()
# ---------- 验证 ----------
cur.execute("SELECT name FROM sqlite_master WHERE type='table'")
tables = cur.fetchall()
print("数据库文件:", db_path)
print("表列表:", [t[0] for t in tables])
cur.execute("PRAGMA table_info(SPU)")
spu_cols = cur.fetchall()
print("\nSPU 字段 ({}个):".format(len(spu_cols)))
for row in spu_cols:
print(" ", row[1], "|", row[2], "| 主键" if row[5] else "")
cur.execute("PRAGMA table_info(SKU)")
sku_cols = cur.fetchall()
print("\nSKU 字段 ({}个):".format(len(sku_cols)))
for row in sku_cols:
print(" ", row[1], "|", row[2], "| 主键" if row[5] else "")
conn.close()
print("\n创建完成")