gzhu-biyesheji/paper/latex/figures/system_architecture.tex
carry 1d2583c128 docs(paper): 调整系统架构图的布局和间距
修改了LaTeX系统架构图中的元素间距和布局,移除了底部的说明文字以简化图表。主要变更包括:
1. 调整各层标题和模块的垂直间距
2. 统一各层标题的上边距为0.5cm
3. 下移业务逻辑层和数据访问层模块位置
4. 移除底部冗余的架构说明文字
2025-05-29 18:06:19 +08:00

56 lines
3.0 KiB
TeX

\begin{figure}[H]
\centering
\begin{tikzpicture}[node distance=1.5cm, auto,
block/.style={rectangle, draw, fill=white, text width=12cm, text centered, rounded corners, minimum height=1.2cm, font=\small},
layer/.style={rectangle, draw, fill=white, text width=12cm, text centered, rounded corners, minimum height=4cm, font=\small},
module/.style={rectangle, draw, fill=white, text width=3cm, text centered, rounded corners, minimum height=1cm, font=\small},
arrow/.style={thick,->,>=stealth},
title/.style={font=\bfseries\small}
]
% 定义三层架构
\node[layer, fill=blue!10, text height=5cm] (presentation) at (0,0) {};
\node[title, above=0.5cm of presentation.north west, anchor=west] {表现层};
\node[layer, fill=green!10, below=1cm of presentation] (business) {};
\node[title, above=0.5cm of business.north west, anchor=west] {业务逻辑层};
\node[layer, fill=orange!10, below=1cm of business] (data) {};
\node[title, above=0.5cm of data.north west, anchor=west] {数据访问层};
% 表现层模块
\node[module, fill=blue!20] (ui1) at (-3.5, 1.5) {模型管理};
\node[module, fill=blue!20] (ui2) at (0, 1.5) {模型推理};
\node[module, fill=blue!20] (ui3) at (3.5, 1.5) {模型微调};
\node[module, fill=blue!20] (ui4) at (-3.5, 0) {数据集生成};
\node[module, fill=blue!20] (ui5) at (0, 0) {数据集管理};
\node[module, fill=blue!20] (ui6) at (3.5, 0) {提示词模板管理};
\node[module, fill=blue!20] (ui7) at (0, -1.5) {系统设置};
% 业务逻辑层模块
\node[module, fill=green!20] (bl1) at (-3.5, -5) {模型训练模块\\(Unsloth/TRL)};
\node[module, fill=green!20] (bl2) at (0, -5) {模型推理模块\\(流式生成)};
\node[module, fill=green!20] (bl3) at (3.5, -5) {数据集生成模块\\(LangChain)};
\node[module, fill=green!20] (bl4) at (-2, -6.5) {数据处理模块};
\node[module, fill=green!20] (bl5) at (2, -6.5) {配置管理模块};
% 数据访问层模块
\node[module, fill=orange!20] (dl1) at (-3.5, -10.5) {SQLite\\(系统配置)};
\node[module, fill=orange!20] (dl2) at (0, -10.5) {TinyDB\\(数据集管理)};
\node[module, fill=orange!20] (dl3) at (3.5, -10.5) {JSON文件\\(导入/导出)};
% 层间连接
\draw[arrow] (presentation.south) -- (business.north) node[midway, right] {函数调用};
\draw[arrow] (business.south) -- (data.north) node[midway, right] {数据操作};
% 添加Gradio框架标注
\node[above=0.2cm of presentation.north east, anchor=east, font=\small\itshape] {基于Gradio框架};
% % 添加说明
% \node[below=0.2cm of data.south, text width=12cm, text centered, font=\footnotesize]
% {系统采用三层架构设计,实现了功能模块间的解耦与分层,提高了系统的可扩展性和可维护性};
\end{tikzpicture}
\caption{系统三层架构设计图}
\label{fig:system-architecture}
\end{figure}