【AI】让deepseek_r1 671b输出draw.io可导入的xml图表数据

  1. 画一张基于Spring Cloud的通用技术架构图,部署环境仍然腾讯云

  2. 请提供可导入到draw.io的xml数据格式

  3. value内的值必须做htmlencode操作,比如value="嘻嘻嘻<div>(fds)</div><div>犯得上发射点</div>";

  4. mxGeometry 必须带有as="geometry"属性,否则导入报错。

  5. 关于value中的回车,应该采用 
 而不是 <div>

输出的xml

复制代码
<mxfile host="app.diagrams.net">
    <diagram name="Spring Cloud架构-腾讯云" id="6mJhpWX3ja7n-3-5J0y3">
        <mxGraphModel dx="1642" dy="882" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
            <root>
                <mxCell id="0"/>
                <mxCell id="1" parent="0"/>
                
                <!-- 客户端层 -->
                <mxCell id="client" value="客户端&#xa;(Web/App)" style="shape=cloud;fontSize=12;fillColor=#ffffff;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="80" y="200" width="120" height="80"/>
                </mxCell>
                
                <!-- 腾讯云CLB -->
                <mxCell id="clb" value="腾讯云CLB&#xa;(HTTPS/WebSocket)" style="swimlane;fontSize=12;fillColor=#DAE8FC;strokeColor=#6C8EBF;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="280" y="180" width="160" height="100"/>
                </mxCell>
                
                <!-- Spring Cloud Gateway -->
                <mxCell id="gateway" value="Spring Cloud Gateway&#xa;(API网关集群)" style="rounded=1;whiteSpace=wrap;fontSize=12;fillColor=#FFF2CC;strokeColor=#D6B656;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="500" y="100" width="150" height="80"/>
                </mxCell>
                
                <!-- 微服务层 -->
                <mxCell id="service1" value="用户服务&#xa;(Spring Boot)" style="shape=cylinder;whiteSpace=wrap;fontSize=12;fillColor=#D5E8D4;strokeColor=#82B366;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="720" y="40" width="120" height="60"/>
                </mxCell>
                <mxCell id="service2" value="订单服务&#xa;(Spring Boot)" style="shape=cylinder;whiteSpace=wrap;fontSize=12;fillColor=#D5E8D4;strokeColor=#82B366;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="720" y="140" width="120" height="60"/>
                </mxCell>
                
                <!-- 中间件层 -->
                <mxCell id="nacos" value="Nacos集群&#xa;(服务注册中心)" style="shape=parallelogram;whiteSpace=wrap;fontSize=12;fillColor=#E1D5E7;strokeColor=#9673A6;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="500" y="240" width="150" height="60"/>
                </mxCell>
                <mxCell id="redis" value="TencentDB for Redis&#xa;(缓存/分布式锁)" style="shape=cylinder3;whiteSpace=wrap;fontSize=12;fillColor=#FFE6CC;strokeColor=#D79B01;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="900" y="40" width="140" height="80"/>
                </mxCell>
                <mxCell id="mysql" value="TencentDB for MySQL&#xa;(主从架构)" style="shape=cylinder3;whiteSpace=wrap;fontSize=12;fillColor=#D5E8D4;strokeColor=#82B366;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="900" y="160" width="140" height="80"/>
                </mxCell>
                
                <!-- 监控层 -->
                <mxCell id="monitor" value="监控告警体系&#xa;(Prometheus+Grafana)" style="shape=document;whiteSpace=wrap;fontSize=12;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
                    <mxGeometry as="geometry" x="500" y="340" width="150" height="60"/>
                </mxCell>
                
                <!-- 连接线 -->
                <mxCell id="e1" value="" style="endArrow=classic;html=1;" edge="1" parent="1" source="client" target="clb">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e2" value="负载均衡" style="endArrow=classic;html=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="clb" target="gateway">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e3" value="服务发现" style="endArrow=classic;html=1;dashed=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="nacos">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e4" value="API路由" style="endArrow=classic;html=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="service1">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e5" value="" style="endArrow=classic;html=1;" edge="1" parent="1" source="gateway" target="service2">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e6" value="数据访问" style="endArrow=classic;html=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="service1" target="mysql">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e7" value="缓存读写" style="endArrow=classic;html=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="service2" target="redis">
                    <mxGeometry as="geometry"/>
                </mxCell>
                <mxCell id="e8" value="指标采集" style="endArrow=classic;html=1;dashed=1;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="service1" target="monitor">
                    <mxGeometry as="geometry"/>
                </mxCell>
            </mxGraphModel>
        </diagram>
    </mxfile>

导入到draw.io

相关推荐
遇码6 小时前
给 Rust 桌面应用做双击安装包:Windows NSIS setup.exe + macOS DMG 的完整做法
人工智能·windows·ai·rust·大模型
玫瑰互动GEO8 小时前
M4推理成本信号:架构优化改写GEO竞争逻辑
大数据·数据库·人工智能·ai·架构·m4·geo优化
头茬韭菜8 小时前
Weftrix 项目深度分析与技术博文系列计划
ai·架构·harness
灵析表格8 小时前
灵析表格函数精讲|xml转json:供应商配置转换
xml·json·excel·办公自动化·wps·效率工具·ai办公
wflynn8 小时前
Qwen4 35B A3B 发布,57B 参数仅激活 3B 实现多模态输入
ai·技术
imbackneverdie10 小时前
2027国自然申报倒计时:多校12月启动校内初审
人工智能·ai·信息可视化·aigc·科研·国自然·课题申报
阿洛学长11 小时前
16 个开源 AI 渗透测试项目:从自主 Agent 到 MCP 工具桥
网络安全·ai
极客编程玩家13 小时前
SpringAI 对接大模型聊天接口实战 Demo
ai·ai实
极客先躯13 小时前
智能体开发高级面试每日一题|2026-06-01|Agent 系统中 LLM 扮演什么角色?除了 LLM 还需要哪些非 LLM 组件?
ai·面试·llm·agent·每日一题·高级面试题·智能体开发
极客先躯14 小时前
智能体开发高级面试每日一题|2026-05-30|什么是 Agentic Workflow?它和纯 Agent 有什么区别?
人工智能·ai·agent·每日一题·高级面试·智能体开发·agenticworkflow