文件
nahaichuan/tests/generate_dedicated_page_showcases.py

501 行
32 KiB
Python

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

# -*- coding: utf-8 -*-
"""
生成全站独立页面专属精美现代中式科技矢量视窗插画
规范:
- 浅色专业风:背景 #FFFFFF / #F8FAFC,主色 #2563EB,辅助 #06B6D4 与 #7C3AED,文字 #0F172A / #475569
- 严谨商务、现代中式、大留白、细线窗棂点阵、朱红宋体印章点缀、圆角 4~6px
- 严禁 emoji、卡通、霓虹、赛博朋克
"""
import os
OUTPUT_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'public/assets/addons/official/images/showcases')
os.makedirs(OUTPUT_DIR, exist_ok=True)
COMMON_DEFS = """
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FFFFFF"/>
<stop offset="100%" stop-color="#F8FAFC"/>
</linearGradient>
<linearGradient id="blueGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#2563EB"/>
<stop offset="100%" stop-color="#1D4ED8"/>
</linearGradient>
<linearGradient id="cyanGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#06B6D4"/>
<stop offset="100%" stop-color="#0284C7"/>
</linearGradient>
<linearGradient id="purpleGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#7C3AED"/>
<stop offset="100%" stop-color="#6D28D9"/>
</linearGradient>
<pattern id="lattice" width="24" height="24" patternUnits="userSpaceOnUse">
<path d="M 24 0 L 0 0 0 24" fill="none" stroke="#E2E8F0" stroke-width="0.75" stroke-dasharray="2,2"/>
</pattern>
<filter id="softShadow" x="-10%" y="-10%" width="120%" height="120%">
<feDropShadow dx="0" dy="4" stdDeviation="8" flood-color="#0F172A" flood-opacity="0.05"/>
</filter>
"""
def generate_software_hero():
svg = f"""<svg width="800" height="460" viewBox="0 0 800 460" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>{COMMON_DEFS}</defs>
<rect width="800" height="460" rx="6" fill="url(#bgGrad)"/>
<rect width="800" height="460" rx="6" fill="url(#lattice)" opacity="0.7"/>
<rect x="1" y="1" width="798" height="458" rx="5" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<!-- 视窗顶部装饰控制栏 -->
<g transform="translate(24, 20)">
<circle cx="8" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="24" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="40" cy="8" r="4" fill="#CBD5E1"/>
<text x="60" y="12" fill="#64748B" font-family="'Inter', sans-serif" font-size="12" font-weight="600">NAHAICHUAN · HIGH-AVAILABILITY MICROSERVICE ARCHITECTURE</text>
</g>
<!-- 现代中式印章 -->
<g class="nhc-seal" transform="translate(740, 20)">
<rect width="36" height="36" rx="4" fill="#FEF2F2" stroke="#DC2626" stroke-width="1.2"/>
<rect x="3" y="3" width="30" height="30" rx="2" fill="none" stroke="#DC2626" stroke-width="0.5" stroke-opacity="0.6"/>
<text x="18" y="24" fill="#DC2626" font-family="'Noto Serif SC', 'SimSun', serif" font-size="16" font-weight="700" text-anchor="middle">自研</text>
</g>
<!-- 东方天圆地方经纬轨道背景 -->
<g transform="translate(400, 240)">
<circle cx="0" cy="0" r="180" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<circle cx="0" cy="0" r="130" fill="none" stroke="#E2E8F0" stroke-width="1"/>
<line x1="-220" y1="0" x2="220" y2="0" stroke="#E2E8F0" stroke-width="0.75" stroke-dasharray="3,3"/>
<line x1="0" y1="-160" x2="0" y2="160" stroke="#E2E8F0" stroke-width="0.75" stroke-dasharray="3,3"/>
</g>
<!-- 架构主拓扑:API网关层 -> 核心微服务集群 -> 数据库主从与缓存 -->
<!-- 1. API 网关中心 -->
<g transform="translate(180, 80)" filter="url(#softShadow)">
<rect width="440" height="64" rx="6" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
<rect x="0" y="0" width="6" height="64" rx="2" fill="#2563EB"/>
<text x="24" y="28" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="15" font-weight="700">分布式统一 API 安全网关</text>
<text x="24" y="48" fill="#64748B" font-family="'Inter', sans-serif" font-size="12">流量限流熔断 · TLS 1.3 强加密 · JWT 鉴权校验 · 全流程审计</text>
<rect x="340" y="20" width="80" height="24" rx="4" fill="#EFF6FF"/>
<text x="380" y="36" fill="#2563EB" font-family="'Inter', sans-serif" font-size="11" font-weight="700" text-anchor="middle">ACTIVE</text>
</g>
<!-- 导流线 -->
<path d="M 400 144 L 400 180" stroke="#2563EB" stroke-width="1.5" stroke-dasharray="3,3"/>
<polygon points="396,180 404,180 400,186" fill="#2563EB"/>
<!-- 2. 核心业务微服务集群 -->
<g transform="translate(60, 190)">
<!-- 节点 1:会员与权益中心 -->
<g transform="translate(0, 0)" filter="url(#softShadow)">
<rect width="150" height="100" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="12" y="14" width="28" height="28" rx="4" fill="#EFF6FF"/>
<circle cx="26" cy="28" r="6" fill="#2563EB"/>
<text x="12" y="62" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">会员权益中心</text>
<text x="12" y="82" fill="#64748B" font-family="'Inter', sans-serif" font-size="11">多端等级统一</text>
</g>
<!-- 节点 2:交易与防重对账 -->
<g transform="translate(176, 0)" filter="url(#softShadow)">
<rect width="168" height="100" rx="6" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
<rect x="12" y="14" width="28" height="28" rx="4" fill="#EEF2FF"/>
<path d="M 22 28 L 30 28 M 26 24 L 26 32" stroke="#7C3AED" stroke-width="2"/>
<text x="12" y="62" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">交易对账中心</text>
<text x="12" y="82" fill="#2563EB" font-family="'Inter', sans-serif" font-size="11" font-weight="600">防重复扣款与对账</text>
</g>
<!-- 节点 3:供应链与物料调度 -->
<g transform="translate(364, 0)" filter="url(#softShadow)">
<rect width="150" height="100" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="12" y="14" width="28" height="28" rx="4" fill="#ECFEFF"/>
<rect x="22" y="24" width="8" height="8" rx="2" fill="#06B6D4"/>
<text x="12" y="62" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">供应链调度</text>
<text x="12" y="82" fill="#64748B" font-family="'Inter', sans-serif" font-size="11">多仓实时分配</text>
</g>
<!-- 节点 4:开放连接与外部ERP -->
<g transform="translate(534, 0)" filter="url(#softShadow)">
<rect width="146" height="100" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="12" y="14" width="28" height="28" rx="4" fill="#F8FAFC"/>
<circle cx="26" cy="28" r="4" stroke="#475569" stroke-width="2"/>
<text x="12" y="62" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">开放互联中心</text>
<text x="12" y="82" fill="#64748B" font-family="'Inter', sans-serif" font-size="11">金蝶/用友/第三方</text>
</g>
</g>
<!-- 3. 数据层:主从读写分离与高并发缓存集群 -->
<g transform="translate(80, 325)">
<!-- 读写分离集群 -->
<g transform="translate(0, 0)" filter="url(#softShadow)">
<rect width="300" height="95" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="16" y="16" width="36" height="36" rx="4" fill="#EFF6FF"/>
<path d="M 30 26 L 38 34 M 38 26 L 30 34" stroke="#2563EB" stroke-width="2"/>
<text x="64" y="32" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">MySQL 主从读写分离集群</text>
<text x="64" y="50" fill="#64748B" font-family="'Inter', sans-serif" font-size="11">分库分表 · 毫秒级主备延迟自动剔除</text>
<rect x="64" y="62" width="216" height="16" rx="3" fill="#F1F5F9"/>
<rect x="64" y="62" width="180" height="16" rx="3" fill="#2563EB" opacity="0.15"/>
<text x="70" y="74" fill="#2563EB" font-family="'Inter', sans-serif" font-size="10" font-weight="600">健康度 100% · QPS 15,000+</text>
</g>
<!-- Redis 分布式集群 -->
<g transform="translate(340, 0)" filter="url(#softShadow)">
<rect width="300" height="95" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="16" y="16" width="36" height="36" rx="4" fill="#ECFEFF"/>
<circle cx="34" cy="34" r="8" fill="none" stroke="#06B6D4" stroke-width="2"/>
<text x="64" y="32" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="14" font-weight="700">Redis 高可用哨兵分片缓存</text>
<text x="64" y="50" fill="#64748B" font-family="'Inter', sans-serif" font-size="11">热点商品防击穿 · 分布式分布式锁</text>
<rect x="64" y="62" width="216" height="16" rx="3" fill="#F1F5F9"/>
<rect x="64" y="62" width="200" height="16" rx="3" fill="#06B6D4" opacity="0.2"/>
<text x="70" y="74" fill="#0284C7" font-family="'Inter', sans-serif" font-size="10" font-weight="600">命中率 99.4% · 响应 &lt; 2ms</text>
</g>
</g>
</svg>"""
with open(os.path.join(OUTPUT_DIR, 'service_software_hero.svg'), 'w', encoding='utf-8') as f:
f.write(svg)
print("Generated: service_software_hero.svg")
def generate_app_hero():
svg = f"""<svg width="800" height="460" viewBox="0 0 800 460" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>{COMMON_DEFS}</defs>
<rect width="800" height="460" rx="6" fill="url(#bgGrad)"/>
<rect width="800" height="460" rx="6" fill="url(#lattice)" opacity="0.7"/>
<rect x="1" y="1" width="798" height="458" rx="5" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<!-- 视窗顶部装饰控制栏 -->
<g transform="translate(24, 20)">
<circle cx="8" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="24" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="40" cy="8" r="4" fill="#CBD5E1"/>
<text x="60" y="12" fill="#64748B" font-family="'Inter', sans-serif" font-size="12" font-weight="600">NAHAICHUAN · MULTI-PLATFORM MOBILE &amp; IOT APPS</text>
</g>
<!-- 现代中式印章 -->
<g class="nhc-seal" transform="translate(740, 20)">
<rect width="36" height="36" rx="4" fill="#FEF2F2" stroke="#DC2626" stroke-width="1.2"/>
<rect x="3" y="3" width="30" height="30" rx="2" fill="none" stroke="#DC2626" stroke-width="0.5" stroke-opacity="0.6"/>
<text x="18" y="24" fill="#DC2626" font-family="'Noto Serif SC', 'SimSun', serif" font-size="16" font-weight="700" text-anchor="middle">互联</text>
</g>
<!-- 东方天圆地方经纬轨道背景 -->
<g transform="translate(400, 240)">
<ellipse cx="0" cy="20" rx="280" ry="110" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="5,5"/>
</g>
<!-- 主视觉布局:原生 App 手机端 (左) + 微信/多端小程序视窗 (中) + 蓝牙/IoT外设直连 (右) -->
<!-- 1. 左侧:iOS / Android 原生移动端应用 -->
<g transform="translate(70, 75)" filter="url(#softShadow)">
<!-- 手机外框 -->
<rect width="180" height="340" rx="24" fill="#FFFFFF" stroke="#0F172A" stroke-width="2"/>
<rect x="10" y="10" width="160" height="320" rx="16" fill="#F8FAFC"/>
<!-- 顶部听筒与摄像头 -->
<rect x="65" y="16" width="50" height="6" rx="3" fill="#CBD5E1"/>
<!-- 屏幕顶部指标 -->
<rect x="22" y="34" width="136" height="28" rx="4" fill="#EFF6FF"/>
<text x="32" y="52" fill="#2563EB" font-family="'Noto Serif SC', 'SimSun', serif" font-size="11" font-weight="700">原生 60FPS 极速渲染</text>
<!-- 卡片内容 -->
<rect x="22" y="72" width="136" height="60" rx="4" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
<circle cx="40" cy="94" r="10" fill="#2563EB"/>
<rect x="58" y="86" width="88" height="8" rx="2" fill="#E2E8F0"/>
<rect x="58" y="100" width="60" height="6" rx="2" fill="#F1F5F9"/>
<!-- 数据列表行 -->
<rect x="22" y="142" width="136" height="36" rx="4" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
<text x="32" y="164" fill="#475569" font-family="'Inter', sans-serif" font-size="10">离线数据本地秒存</text>
<rect x="22" y="188" width="136" height="36" rx="4" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
<text x="32" y="210" fill="#475569" font-family="'Inter', sans-serif" font-size="10">弱网恢复自动同步</text>
<!-- 底部功能按钮 -->
<rect x="22" y="280" width="136" height="32" rx="6" fill="#2563EB"/>
<text x="90" y="300" fill="#FFFFFF" font-family="'Inter', sans-serif" font-size="11" font-weight="600" text-anchor="middle">iOS &amp; Android 原生</text>
</g>
<!-- 2. 中间:微信小程序与企业生态跨端看板 -->
<g transform="translate(285, 75)" filter="url(#softShadow)">
<rect width="260" height="340" rx="8" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
<!-- 顶栏 -->
<rect x="0" y="0" width="260" height="42" rx="7" fill="#EFF6FF"/>
<circle cx="20" cy="21" r="5" fill="#06B6D4"/>
<text x="34" y="26" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">微信小程序 · 跨端协同</text>
<!-- 业务模块网格 -->
<g transform="translate(18, 56)">
<rect width="106" height="74" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="24" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="700">扫码即用</text>
<text x="10" y="44" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">免下载秒开响应</text>
<text x="10" y="60" fill="#06B6D4" font-family="'Inter', sans-serif" font-size="10" font-weight="600">&lt; 0.8s 启动</text>
</g>
<g transform="translate(136, 56)">
<rect width="106" height="74" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="24" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="700">微信生态</text>
<text x="10" y="44" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">微信支付/订阅通知</text>
<text x="10" y="60" fill="#2563EB" font-family="'Inter', sans-serif" font-size="10" font-weight="600">服务号互通</text>
</g>
<!-- 跨端代码流线示意 -->
<g transform="translate(18, 145)">
<rect width="224" height="120" rx="4" fill="#F8FAFC" stroke="#CBD5E1" stroke-width="1"/>
<text x="14" y="24" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="700">一套代码 · 多端同步发布</text>
<path d="M 20 45 L 80 45 M 100 45 L 200 45" stroke="#2563EB" stroke-width="2"/>
<circle cx="90" cy="45" r="4" fill="#2563EB"/>
<text x="14" y="70" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">支持 Uni-app / Flutter 跨端技术体系</text>
<text x="14" y="90" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">无缝覆盖支付宝、抖音及百度小程序</text>
<rect x="14" y="98" width="196" height="14" rx="2" fill="#E2E8F0"/>
<rect x="14" y="98" width="160" height="14" rx="2" fill="#06B6D4" opacity="0.3"/>
</g>
<!-- 底部状态 -->
<rect x="18" y="280" width="224" height="38" rx="6" fill="#0F172A"/>
<text x="130" y="304" fill="#FFFFFF" font-family="'Inter', sans-serif" font-size="12" font-weight="600" text-anchor="middle">多平台组件库全开源交付</text>
</g>
<!-- 3. 右侧:低功耗蓝牙 BLE 与 IoT 硬件互联 -->
<g transform="translate(575, 75)" filter="url(#softShadow)">
<rect width="160" height="340" rx="8" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="0" y="0" width="160" height="36" rx="7" fill="#F8FAFC"/>
<text x="14" y="23" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="700">IoT 硬件协议互联</text>
<g transform="translate(14, 52)">
<!-- 蓝牙连接指示 -->
<circle cx="20" cy="20" r="14" fill="#EFF6FF"/>
<path d="M 17 12 L 23 18 L 19 22 L 23 26 L 17 32 M 19 12 L 19 32" stroke="#2563EB" stroke-width="1.5"/>
<text x="44" y="18" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">低功耗蓝牙</text>
<text x="44" y="32" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">BLE 5.0 毫秒直连</text>
</g>
<g transform="translate(14, 110)">
<rect width="132" height="60" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="22" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">智能条码称重秤</text>
<text x="10" y="42" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">自动取重与金额回传</text>
</g>
<g transform="translate(14, 185)">
<rect width="132" height="60" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="22" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">移动热敏打印机</text>
<text x="10" y="42" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">脱机连续高速出票</text>
</g>
<g transform="translate(14, 260)">
<rect width="132" height="60" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="22" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">扫码支付终端</text>
<text x="10" y="42" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">毫秒聚合识别通道</text>
</g>
</g>
</svg>"""
with open(os.path.join(OUTPUT_DIR, 'service_app_hero.svg'), 'w', encoding='utf-8') as f:
f.write(svg)
print("Generated: service_app_hero.svg")
def generate_agent_hero():
svg = f"""<svg width="800" height="460" viewBox="0 0 800 460" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>{COMMON_DEFS}</defs>
<rect width="800" height="460" rx="6" fill="url(#bgGrad)"/>
<rect width="800" height="460" rx="6" fill="url(#lattice)" opacity="0.7"/>
<rect x="1" y="1" width="798" height="458" rx="5" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<!-- 视窗顶部装饰控制栏 -->
<g transform="translate(24, 20)">
<circle cx="8" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="24" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="40" cy="8" r="4" fill="#CBD5E1"/>
<text x="60" y="12" fill="#64748B" font-family="'Inter', sans-serif" font-size="12" font-weight="600">NAHAICHUAN · PRIVATE ON-PREMISES AI AGENT &amp; RAG ENGINE</text>
</g>
<!-- 现代中式印章 -->
<g class="nhc-seal" transform="translate(740, 20)">
<rect width="36" height="36" rx="4" fill="#FEF2F2" stroke="#DC2626" stroke-width="1.2"/>
<rect x="3" y="3" width="30" height="30" rx="2" fill="none" stroke="#DC2626" stroke-width="0.5" stroke-opacity="0.6"/>
<text x="18" y="24" fill="#DC2626" font-family="'Noto Serif SC', 'SimSun', serif" font-size="16" font-weight="700" text-anchor="middle">安全</text>
</g>
<!-- 纯内网物理隔离标志 (拔掉外网网线) -->
<g transform="translate(28, 55)">
<rect width="300" height="32" rx="4" fill="#FEF2F2" stroke="#FCA5A5" stroke-width="1"/>
<circle cx="16" cy="16" r="5" fill="#DC2626"/>
<text x="32" y="20" fill="#991B1B" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="700">纯内网物理隔离部署 · 拔掉外网网线依然可靠运行</text>
</g>
<!-- 架构主拓扑:非结构化文档结构化 -> 向量知识库 -> 多智能体协同问答 -->
<!-- 1. 左侧:企业私域文档输入与切片 -->
<g transform="translate(28, 105)" filter="url(#softShadow)">
<rect width="220" height="325" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="0" y="0" width="220" height="36" rx="5" fill="#F8FAFC"/>
<text x="14" y="23" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">01. 企业私有知识入库</text>
<g transform="translate(14, 50)">
<rect width="192" height="48" rx="4" fill="#EFF6FF" stroke="#BFDBFE" stroke-width="1"/>
<text x="12" y="22" fill="#1E40AF" font-family="'Inter', sans-serif" font-size="11" font-weight="700">制度条例 / 政策规范 (PDF)</text>
<text x="12" y="38" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">版面分析 · 表格还原提取</text>
</g>
<g transform="translate(14, 110)">
<rect width="192" height="48" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="12" y="22" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">产品手册 / 合同文书 (Word)</text>
<text x="12" y="38" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">语义段落递归分块切片</text>
</g>
<g transform="translate(14, 170)">
<rect width="192" height="48" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="12" y="22" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">业务系统历史审核案例库</text>
<text x="12" y="38" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">专家经验正负反馈打标</text>
</g>
<g transform="translate(14, 235)">
<rect width="192" height="70" rx="4" fill="#F1F5F9"/>
<text x="12" y="24" fill="#334155" font-family="'Noto Serif SC', 'SimSun', serif" font-size="11" font-weight="700">数据安全保护底线</text>
<text x="12" y="44" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">0 外部网络调用 · 数据零外泄</text>
<text x="12" y="58" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">严格符合等保三级物理隔离规范</text>
</g>
</g>
<!-- 2. 中间:向量引擎与语义检索 RAG 核心 -->
<g transform="translate(268, 105)" filter="url(#softShadow)">
<rect width="250" height="325" rx="6" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
<rect x="0" y="0" width="250" height="36" rx="5" fill="#EFF6FF"/>
<text x="14" y="23" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">02. 混合精准语义检索 (RAG)</text>
<!-- 向量计算矩阵图示 -->
<g transform="translate(15, 52)">
<rect width="220" height="85" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="12" y="20" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">向量检索 + 关键词全文双路召回</text>
<!-- 坐标系点阵 -->
<line x1="20" y1="65" x2="200" y2="65" stroke="#CBD5E1" stroke-width="1"/>
<circle cx="50" cy="50" r="4" fill="#2563EB"/>
<circle cx="90" cy="40" r="5" fill="#06B6D4"/>
<circle cx="150" cy="55" r="4" fill="#7C3AED"/>
<line x1="50" y1="50" x2="90" y2="40" stroke="#06B6D4" stroke-width="1" stroke-dasharray="2,2"/>
<text x="100" y="44" fill="#0284C7" font-family="'Inter', sans-serif" font-size="9" font-weight="700">余弦相似度 0.94</text>
</g>
<!-- 问答置信度过滤 -->
<g transform="translate(15, 148)">
<rect width="220" height="75" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="12" y="20" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">严格依据原文回答 · 拒绝幻觉</text>
<text x="12" y="40" fill="#475569" font-family="'Inter', sans-serif" font-size="10">未命中知识库时明确回复“未查到”</text>
<rect x="12" y="50" width="196" height="14" rx="2" fill="#E2E8F0"/>
<rect x="12" y="50" width="180" height="14" rx="2" fill="#2563EB" opacity="0.3"/>
<text x="16" y="61" fill="#2563EB" font-family="'Inter', sans-serif" font-size="9" font-weight="700">准确率实测 &gt; 98.5%</text>
</g>
<!-- 底座模型 -->
<g transform="translate(15, 235)">
<rect width="220" height="80" rx="4" fill="#F8FAFC" stroke="#CBD5E1" stroke-width="1"/>
<text x="12" y="20" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">开源大模型专有量化微调</text>
<text x="12" y="38" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">DeepSeek / Qwen / Llama 适配</text>
<text x="12" y="54" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">普通单张消费级显卡即可部署推理</text>
<text x="12" y="70" fill="#059669" font-family="'Inter', sans-serif" font-size="10" font-weight="700">低算力成本 · 极高响应性价比</text>
</g>
</g>
<!-- 3. 右侧:多智能体自主协同输出视窗 -->
<g transform="translate(538, 105)" filter="url(#softShadow)">
<rect width="234" height="325" rx="6" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1.2"/>
<rect x="0" y="0" width="234" height="36" rx="5" fill="#F8FAFC"/>
<text x="14" y="23" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">03. 业务协同与带出处交付</text>
<!-- 模拟智能体对话核查窗口 -->
<g transform="translate(12, 50)">
<rect width="210" height="60" rx="4" fill="#F1F5F9"/>
<text x="10" y="20" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">企业业务人员提问:</text>
<text x="10" y="40" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="11" font-weight="700">“按2026采购标准,该标的超限吗?”</text>
</g>
<g transform="translate(12, 120)">
<rect width="210" height="110" rx="4" fill="#EFF6FF" stroke="#BFDBFE" stroke-width="1"/>
<text x="10" y="20" fill="#2563EB" font-family="'Inter', sans-serif" font-size="10" font-weight="700">专属智能体回复:</text>
<text x="10" y="40" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="11" font-weight="600">“不超限。符合第3章第12条规定。”</text>
<!-- 自动标注文档出处 -->
<rect x="10" y="55" width="190" height="44" rx="3" fill="#FFFFFF" stroke="#93C5FD" stroke-width="0.75"/>
<text x="16" y="72" fill="#1D4ED8" font-family="'Inter', sans-serif" font-size="10" font-weight="700">依据文档原文:</text>
<text x="16" y="88" fill="#475569" font-family="'Inter', sans-serif" font-size="9">《2026采购管理制度汇编.pdf》第28页</text>
</g>
<!-- 底部保障 -->
<g transform="translate(12, 245)">
<rect width="210" height="65" rx="4" fill="#F8FAFC" stroke="#E2E8F0" stroke-width="1"/>
<text x="10" y="22" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="11" font-weight="700">多 Agent 工作流自动联动</text>
<text x="10" y="40" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">初审校验 -&gt; 依据比对 -&gt; 报告生成</text>
<text x="10" y="54" fill="#059669" font-family="'Inter', sans-serif" font-size="10" font-weight="700">全流程操作日志审计留痕</text>
</g>
</g>
</svg>"""
with open(os.path.join(OUTPUT_DIR, 'service_agent_hero.svg'), 'w', encoding='utf-8') as f:
f.write(svg)
print("Generated: service_agent_hero.svg")
def generate_contact_headquarters():
svg = f"""<svg width="600" height="340" viewBox="0 0 600 340" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>{COMMON_DEFS}</defs>
<rect width="600" height="340" rx="6" fill="url(#bgGrad)"/>
<rect width="600" height="340" rx="6" fill="url(#lattice)" opacity="0.6"/>
<rect x="1" y="1" width="598" height="338" rx="5" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<!-- 视窗顶栏 -->
<g transform="translate(20, 18)">
<circle cx="8" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="24" cy="8" r="4" fill="#CBD5E1"/>
<circle cx="40" cy="8" r="4" fill="#CBD5E1"/>
<text x="60" y="12" fill="#64748B" font-family="'Inter', sans-serif" font-size="12" font-weight="600">NAHAICHUAN · GUIYANG DUAL HEADQUARTERS &amp; R&amp;D BASE</text>
</g>
<!-- 现代中式印章 -->
<g class="nhc-seal" transform="translate(545, 16)">
<rect width="36" height="36" rx="4" fill="#FEF2F2" stroke="#DC2626" stroke-width="1.2"/>
<rect x="3" y="3" width="30" height="30" rx="2" fill="none" stroke="#DC2626" stroke-width="0.5" stroke-opacity="0.6"/>
<text x="18" y="24" fill="#DC2626" font-family="'Noto Serif SC', 'SimSun', serif" font-size="16" font-weight="700" text-anchor="middle">立足</text>
</g>
<!-- 经纬线与双基地地理拓扑图 -->
<g transform="translate(300, 180)">
<!-- 坐标雷达圈 -->
<circle cx="0" cy="0" r="140" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<circle cx="0" cy="0" r="90" fill="none" stroke="#E2E8F0" stroke-width="1"/>
<line x1="-160" y1="0" x2="160" y2="0" stroke="#CBD5E1" stroke-width="0.75" stroke-dasharray="3,3"/>
<line x1="0" y1="-120" x2="0" y2="120" stroke="#CBD5E1" stroke-width="0.75" stroke-dasharray="3,3"/>
<!-- 双基地连接弧线 -->
<path d="M -110 -20 Q 0 -60 110 30" fill="none" stroke="#2563EB" stroke-width="2" stroke-dasharray="5,5"/>
</g>
<!-- 基地 1:营销中心与商务基地 (花果园中环广场) -->
<g transform="translate(40, 75)" filter="url(#softShadow)">
<rect width="240" height="150" rx="6" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
<rect x="0" y="0" width="240" height="32" rx="5" fill="#EFF6FF"/>
<circle cx="16" cy="16" r="4" fill="#2563EB"/>
<text x="28" y="21" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">商务营销中心 · 花果园</text>
<text x="16" y="55" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">贵阳花果园中环广场 2号楼26层</text>
<text x="16" y="75" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">商务洽谈 · 解决方案研讨 · 产品演示</text>
<rect x="16" y="90" width="208" height="44" rx="4" fill="#F8FAFC"/>
<text x="24" y="108" fill="#475569" font-family="'Inter', sans-serif" font-size="10">贵阳火车站 / 市中心 10分钟车程</text>
<text x="24" y="124" fill="#2563EB" font-family="'Inter', sans-serif" font-size="10" font-weight="600">西南客户当面沟通 · 随到随接</text>
</g>
<!-- 基地 2:核心研发中心 (大数据安全产业园) -->
<g transform="translate(320, 115)" filter="url(#softShadow)">
<rect width="240" height="150" rx="6" fill="#FFFFFF" stroke="#06B6D4" stroke-width="1.5"/>
<rect x="0" y="0" width="240" height="32" rx="5" fill="#ECFEFF"/>
<circle cx="16" cy="16" r="4" fill="#06B6D4"/>
<text x="28" y="21" fill="#0F172A" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700">核心研发中心 · 经开大数据</text>
<text x="16" y="55" fill="#0F172A" font-family="'Inter', sans-serif" font-size="11" font-weight="700">经开区大数据安全产业园数楼 4层</text>
<text x="16" y="75" fill="#64748B" font-family="'Inter', sans-serif" font-size="10">架构研发 · 私有AI算力调优 · 安全攻防</text>
<rect x="16" y="90" width="208" height="44" rx="4" fill="#F8FAFC"/>
<text x="24" y="108" fill="#475569" font-family="'Inter', sans-serif" font-size="10">局域网物理隔离机房 · 等保三级规范</text>
<text x="24" y="124" fill="#06B6D4" font-family="'Inter', sans-serif" font-size="10" font-weight="600">支持客户技术专家现场源码审查验收</text>
</g>
<!-- 底部 SLA 承诺栏 -->
<g transform="translate(40, 280)">
<rect width="520" height="40" rx="4" fill="#0F172A"/>
<text x="260" y="25" fill="#FFFFFF" font-family="'Noto Serif SC', 'SimSun', serif" font-size="12" font-weight="600" text-anchor="middle">
工作日 2小时内极速响应 · 24小时内免费出具初步方案与评估报告
</text>
</g>
</svg>"""
with open(os.path.join(OUTPUT_DIR, 'contact_headquarters.svg'), 'w', encoding='utf-8') as f:
f.write(svg)
print("Generated: contact_headquarters.svg")
if __name__ == '__main__':
generate_software_hero()
generate_app_hero()
generate_agent_hero()
generate_contact_headquarters()
print("All dedicated page illustration showcases generated successfully!")