﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-综合区</title><link>http://www.blogjava.net/general</link><description>专注于Java技术</description><language>zh-cn</language><lastBuildDate>Tue, 07 Apr 2026 06:53:27 GMT</lastBuildDate><pubDate>Tue, 07 Apr 2026 06:53:27 GMT</pubDate><ttl>60</ttl><item><title>阿迈奇3080显卡驱动</title><link>http://www.blogjava.net/paulwong/archive/2026/04/06/451766.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Sun, 05 Apr 2026 23:37:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2026/04/06/451766.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/451766.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2026/04/06/451766.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/451766.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/451766.html</trackback:ping><description><![CDATA[<a href="https://bbs.acemagic.cn/d/28-3060de-qu-dong-kuai-geng-xin-a" target="_blank">https://bbs.acemagic.cn/d/28-3060de-qu-dong-kuai-geng-xin-a</a><br /><br />第三方驱动<br /><a href="https://github.com/arutar/FrankenDriver?tab=readme-ov-file#drivers-download" target="_blank">https://github.com/arutar/FrankenDriver?tab=readme-ov-file#drivers-download</a><br /><br /><br /><a href="https://bbs.acemagic.cn/d/25-3080dao-di-chu-bu-chu-qu-dong" target="_blank">https://bbs.acemagic.cn/d/25-3080dao-di-chu-bu-chu-qu-dong</a><br /><br /><br /><a href="https://androidpctv.com/frankendriver-nvidia-driver-chinese-mini-pc/">FrankenDriver: Install NVIDIA drivers for unsupported Chinese mini PCs</a><img src ="http://www.blogjava.net/paulwong/aggbug/451766.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2026-04-06 07:37 <a href="http://www.blogjava.net/paulwong/archive/2026/04/06/451766.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Linux 查看本机软件硬件信息的命令</title><link>http://www.blogjava.net/paulwong/archive/2026/03/23/451765.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Mon, 23 Mar 2026 03:45:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2026/03/23/451765.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/451765.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2026/03/23/451765.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/451765.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/451765.html</trackback:ping><description><![CDATA[<h1><br /></h1>
  <h2>🖥️ 硬件信息</h2>
  <ul>
    <li><strong>CPU 信息</strong>
      <ul>
        <li><code>lscpu</code> &#8594; 显示 CPU 架构、核心数、线程数</li>
        <li><code>cat /proc/cpuinfo</code> &#8594; 查看详细 CPU 型号、频率</li>
      </ul>
    </li>
    <li><strong>内存信息</strong>
      <ul>
        <li><code>free -h</code> &#8594; 显示内存使用情况</li>
        <li><code>cat /proc/meminfo</code> &#8594; 查看详细内存参数</li>
      </ul>
    </li>
    <li><strong>硬盘信息</strong>
      <ul>
        <li><code>lsblk</code> &#8594; 查看磁盘分区和挂载</li>
        <li><code>df -h</code> &#8594; 查看磁盘使用情况</li>
        <li><code>fdisk -l</code> &#8594; 查看磁盘分区表</li>
      </ul>
    </li>
    <li><strong>PCI/USB 设备</strong>
      <ul>
        <li><code>lspci</code> &#8594; 列出所有 PCI 设备</li>
        <li><code>lsusb</code> &#8594; 列出所有 USB 设备</li>
      </ul>
    </li>
    <li><strong>主板/BIOS</strong>
      <ul>
        <li><code>dmidecode</code> &#8594; 显示 BIOS、主板、内存插槽等信息</li>
      </ul>
    </li>
  </ul>
  <h2>📦 软件信息</h2>
  <ul>
    <li><strong>操作系统版本</strong>
      <ul>
        <li><code>cat /etc/os-release</code> &#8594; 查看发行版信息</li>
        <li><code>uname -a</code> &#8594; 查看内核版本和架构</li>
      </ul>
    </li>
    <li><strong>已安装软件</strong>
      <ul>
        <li>Debian/Ubuntu: <code>dpkg -l</code> 或 <code>apt list --installed</code></li>
        <li>RHEL/CentOS/AlmaLinux: <code>rpm -qa</code> 或 <code>dnf list installed</code></li>
      </ul>
    </li>
    <li><strong>服务与进程</strong>
      <ul>
        <li><code>systemctl list-units --type=service</code> &#8594; 查看正在运行的服务</li>
        <li><code>ps aux</code> &#8594; 查看当前进程</li>
      </ul>
    </li>
    <li><strong>网络信息</strong>
      <ul>
        <li><code>ip addr</code> &#8594; 查看网卡和 IP 地址</li>
        <li><code>ss -tuln</code> &#8594; 查看端口监听情况</li>
      </ul>
    </li>
  </ul>
  <h2>🔍 综合工具</h2>
  <ul>
    <li><code>inxi -Fx</code> &#8594; 一次性显示完整的硬件和系统信息</li>
    <li><code>neofetch</code> &#8594; 美观地显示系统信息</li>
  </ul><img src ="http://www.blogjava.net/paulwong/aggbug/451765.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2026-03-23 11:45 <a href="http://www.blogjava.net/paulwong/archive/2026/03/23/451765.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>OPEN CLAW资源</title><link>http://www.blogjava.net/paulwong/archive/2026/03/21/451763.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Fri, 20 Mar 2026 19:42:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2026/03/21/451763.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/451763.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2026/03/21/451763.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/451763.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/451763.html</trackback:ping><description><![CDATA[<div>qclaw技能广场</div>
<div><a href="https://skillhub.tencent.com/#categories" target="_blank">https://skillhub.tencent.com/#categories</a><br />
</div>
<div><br />
</div>
<div><br />
</div>
<div><br />
</div>
<img src ="http://www.blogjava.net/paulwong/aggbug/451763.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2026-03-21 03:42 <a href="http://www.blogjava.net/paulwong/archive/2026/03/21/451763.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>网络编程入门如此简单(五)：UDP跟TCP相比，到底差了什么？</title><link>http://www.blogjava.net/jb2011/archive/2026/03/17/451762.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Tue, 17 Mar 2026 07:35:00 GMT</pubDate><guid>http://www.blogjava.net/jb2011/archive/2026/03/17/451762.html</guid><wfw:comment>http://www.blogjava.net/jb2011/comments/451762.html</wfw:comment><comments>http://www.blogjava.net/jb2011/archive/2026/03/17/451762.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jb2011/comments/commentRss/451762.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jb2011/services/trackbacks/451762.html</trackback:ping><description><![CDATA[<p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">本文由悟空聊架构分享，有修订和排版优化。</p><h1>1、引言</h1><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>本文将通俗易懂地为你类比解释UDP与TCP的核心差异，包括如何基于UDP实现TCP的可靠传输：通过模拟三次握手、添加序列号与确认机制解决顺序和丢包问题，利用滑动窗口控制流量，并引入拥塞控制算法来动态调整发送速率等。</strong></p><div img-uploading-status=""  image-package-1"="" data-index="1" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161230715-1577906690.jpg" alt="cover-opti" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /></div></div></div><h1>2、系列文章</h1><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>本文是该系列文章中的第&nbsp;<em>5</em>&nbsp;篇：</strong></p><ol style="margin-left: 2.5rem; padding-left: 0px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><li style="list-style: inherit;">《<a href="http://www.52im.net/thread-3330-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">网络编程入门如此简单(一)：假如你来设计网络，会怎么做？</a>》</li><li style="list-style: inherit;">《<a href="http://www.52im.net/thread-3339-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">网络编程入门如此简单(二)：假如你来设计TCP协议，会怎么做？</a>》</li><li style="list-style: inherit;">《<a href="http://www.52im.net/thread-3868-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">网络编程入门如此简单(三)：什么是IPv6？漫画式图文，一篇即懂！</a>》</li><li style="list-style: inherit;">《<a href="http://www.52im.net/thread-4702-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">网络编程入门如此简单(四)：一文搞懂localhost和127.0.0.1</a>》</li><li style="list-style: inherit;">《<a href="http://www.52im.net/thread-4897-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">网络编程入门如此简单(五)：UDP跟TCP相比，到底差了什么？</a>》（<span style="color: #ff6600;"><strong>* 本文</strong></span>）</li></ol><h1>3、写在前面</h1><div img-uploading-status=""  image-package-2"="" data-index="2" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161239768-68924467.jpg" alt="1、背景" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /></div></div></div><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">本题是我在面试中，技术总监问我的一道真题，当时答得不太好，所以把它揪出来总结了下。后来问了下总监，总监说这是阿里的面试题。。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">其实面试官主要是想让我说出 UDP 和 TCP 的原理上的区别，怎么给 UDP 加些功能实现 TCP。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">看好去很容易就能说出一两个 TCP 和 UDP 的区别，<strong>但如果能用女朋友都能听懂的方式该怎么说呢？</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>女朋友：</strong>我不想听课本上讲的！我听不懂呀~</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">下面我会以大白话的方式来解答上面的问题。</p><h1>4、UDP协议的主要特点</h1><div img-uploading-status=""  image-package-3"="" data-index="3" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161247440-1253798853.jpg" alt="2、UDP-的特点" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /><p style="margin-top: 10px; margin-bottom: 10px;">UDP 让我想起了刚毕业参加工作那会，一名毕业菜鸟。</p></div></div></div><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>1）沟通简单：</em></strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">领导安排的任务，直接干就完了。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，相信网络世界永远是美好的，我发送的包是很容易送到的，接收方也是很容易组装的。数据结构也很简单，不需要大量的数据结构、处理逻辑、包头字段。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>2）轻信他人：</em></strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">测试人员报的 bug 我也不会和她争论什么，永远相信测试人员是对的，测试人员说啥就是啥，我改就是。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，不会建立连接，有个端口号，谁都可以监听这个端口号往上面发数据。也可以从这个端口号传给任何人数据。反正我只管发就是。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>3）不会讨价还价：</em></strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">产品经理昨天说手机壳需要根据心情变色，测试人员说这个 bug 要把关联的两个 bug 一起修掉。那就按照他们说的做吧！</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，不懂坚持和退让。也就是根据网络情况进行拥塞控制。无论网络丢包多严重，我还是照样发~</p><h1>5、UDP协议的使用场景</h1><div img-uploading-status=""  image-package-4"="" data-index="4" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161304900-958505871.jpg" alt="3、UDP-使用场景" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /><p style="margin-top: 10px; margin-bottom: 10px;">针对像我那时候毕业菜鸟的情况，领导给我安排了三种工作环境让我选。</p></div></div></div><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>1）</em></strong>内部系统，任务简单，模块单一，不需要考虑代码的关联影响，即使失败了也没有关系。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，需要资源少，网络情况比较好的内网，或者对于丢包不敏感的应用。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>2）</em></strong>有一个强力的团队支持，都是中高级开发、测试人员，团队成员打过很多年交道，互相信任。有什么问题，吼一嗓子就可以了！</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，不需要一对一沟通来建立连接，可以广播的应用。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong><em>3）</em></strong>一个新项目，需要有激情，对于刚毕业的菜鸟，都是有很强的自主能动性的，也不会耍滑头，躲在厕所玩手机，带薪拉shi ？即使项目不忙，我也抓紧时间干。项目忙，还是一样干！</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 也是，猛着发包就是，主要应用在需要处理速度快，时延低，可以容忍少数丢包的情况。即使网络情况不佳，发包就是~</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>针对上面的三大场景，UDP 常用在实时竞技游戏，IoT 物联网，移动通信领域。</strong></p><h1>6、TCP协议的主要特点&nbsp;&nbsp;</h1><div img-uploading-status=""  image-package-5"="" data-index="5" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161311366-169133040.jpg" alt="4、TCP-的特点？" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /></div></div></div><h2>6.1 面向连接</h2><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 和 UDP 是传输层里面比较重要的两个协议。大部分面试的时候都会问到两者的区别。而大部分都会两句，比如 TCP 是面向连接的，UDP 是面向无连接。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>那什么是面向连接？</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 三次握手是我们常常念叨和背诵的。而在这三次握手成功后，就是建立连接成功。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>那什么又叫面向呢？</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">我们也常听到面向对象编程、面向切面编程、面向服务编程。那到底什么是面向？</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">在我看来 面向 就是遵循一定的协议、规范、数据结构等来做一系列事情。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">比如面向连接，就是为了在客户端和服务端维护连接，而建立一定的数据结构来维护双方交互的状态，用这样的数据来保证所谓的面向连接的特性。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">知道了 TCP 的是用三次握手来建立连接，那我们是否可以让 UDP 也发三个包来模拟 TCP 建立连接？可以是可以，但是如果只是建立，而不是面向连接，其实意义不大。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>那 TCP 面向连接做了哪些事情？</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 提供可靠交付，通过 TCP 连接传输的数据，可以无差错、不丢失、不重复、并且按序到达。而 UDP 继承了 IP 包的特性，不保证不丢失，不保证按顺序到达。</p><h2>6.2 面向字节流</h2><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 是面向字节流，所谓字节流，就是发的是一个流，没头没尾。TCP 自己维护流状态。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 基于 IP 数据报，一个一个地发，一个一个地收。</p><h3>6.3 拥塞控制</h3><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 拥有拥塞控制，如果包丢弃了或者网络环境不好了，就会根据网络情况自行控制自己的行为，看下是发快点还是发慢点。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">UDP 则没有这么智能了， 你让我发，我就发呗，反正是你让我发的，其他的一概不管~</p><h2>6.4 有状态服务</h2><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">TCP 是一个有状态的服务，有状态可以理解为：我记录了哪些发送了，哪些没有发送，哪些接收到了，哪些没接收到，应该接收哪个了，一点差错都不行。TCP 干的事情可真多！</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">而 UDP 则不是有状态的服务，我只管发，其他的就交给接收端吧，有点任性是吧？</p><h1>7、如何让UDP追上TCP的能力？</h1><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">建立连接上面已经讲到了，三次握手和四次握手，UDP 也可以模拟去做。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>那下面还有几个问题：</strong></p><ul style="margin-left: 2.5rem; padding-left: 0px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><li style="list-style: inherit;"><em>1）</em>顺序问题；</li><li style="list-style: inherit;"><em>2）</em>丢包问题；</li><li style="list-style: inherit;"><em>3）</em>流量控制；</li><li style="list-style: inherit;"><em>4）</em>拥塞控制。</li></ul><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>TCP 的数据结构长这样：</strong></p><div img-uploading-status=""  image-package-6"="" data-index="6" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161320459-1316881742.png" alt="5" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /><p style="margin-top: 10px; margin-bottom: 10px;">其实如果你能把这些结构讲清楚，就已经理解了 TCP 的核心功能。下面我还是用大白话的方式来讲解上面的四个问题。</p></div></div></div><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">顺序问题和丢包问题可以利用确认与重发的机制。假如包收到了，可以做一个确认，发送一个 ACK 给发送端，告诉他我收到了。假如有的包提前到了，就缓存着。假如有包丢失了，就可以超时重试。超时重试不宜过短，时间必须大于往返时间 RTT，否则会引起不必要的重传。也不宜过长，如果超时时间过长，访问就变慢了。那怎么确定这个时间，可以通过采样 RTT 的时间，进行加权平均。还需要根据网络状况，动态变化。可以了解下自适应重传算法。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">流量控制就是根据网络情况调整发包的速率。利用的是滑动窗口。在对于包的确认中，同时会携带一个窗口的大小，只要利用好这个窗口大小，就能很好地调整发包速率，发的报文段不要超过窗口的大小就 OK。</p><div img-uploading-status=""  image-package-7"="" data-index="7" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161325818-140795623.png" alt="6" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /><p style="margin-top: 10px; margin-bottom: 10px;">拥塞控制主要用来避免包丢失和超时重传，如果出现了这两种现象，就说明发的速率太快了。那最开始怎么知道发送速率呢？其实开始时只发送一个报文段数据，如果收到一个确认，则倍增报文段，依次类推。当发现超时重传时，就又回到只发送一个报文段的情况，这个就是慢启动，这种方式不合适。其实还有一种快速重传算法，简单来说就是拥塞窗口减半，后续线性增速。针对于算法怎么实现的，这里就不展开讲述了。</p></div></div></div><div img-uploading-status=""  image-package-8"="" data-index="8" style="font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;"><div><div><img src="https://img2024.cnblogs.com/blog/1834368/202603/1834368-20260316161331492-684083785.png" alt="7" loading="lazy" style="border: 0px; max-width: 100%; height: auto !important; cursor: zoom-in; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;" /><p style="margin-top: 10px; margin-bottom: 10px;">至此，我用大白话的方式讲解了 UDP 和 TCP 的区别，以及 UDP 缺什么功能，需要怎么去弥补才能实现 TCP 的功能。相信这样回答的思路可以让面试官觉得还是有点东西的。</p></div></div></div><h1>8、参考资料</h1><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[1]&nbsp;<a href="http://www.52im.net/topic-tcpipvol1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">TCP/IP详解</a>&nbsp;-&nbsp;<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/11/" target="_blank" style="color: #1d58d1; text-decoration-line: none;">第11章&#183;UDP：用户数据报协议</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[2]&nbsp;<a href="http://www.52im.net/topic-tcpipvol1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">TCP/IP详解</a>&nbsp;-&nbsp;<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/17/" target="_blank" style="color: #1d58d1; text-decoration-line: none;">第17章&#183;TCP：传输控制协议</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[3]&nbsp;<a href="http://www.52im.net/thread-513-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">通俗易懂-深入理解TCP协议（上）：理论基础</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[4]&nbsp;<a href="http://www.52im.net/thread-515-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">通俗易懂-深入理解TCP协议（下）：RTT、滑动窗口、拥塞处理</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[5]&nbsp;<a href="http://www.52im.net/thread-1107-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">快速理解TCP协议一篇就够</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[6]&nbsp;<a href="http://www.52im.net/thread-1160-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">快速理解TCP和UDP的差异</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[7]&nbsp;<a href="http://www.52im.net/thread-1277-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">快速理解为什么说UDP有时比TCP更有优势</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[8]&nbsp;<a href="http://www.52im.net/thread-3793-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">一泡尿的时间，快速搞懂TCP和UDP的区别</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[9]&nbsp;<a href="http://www.52im.net/thread-1729-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">跟着动画来学TCP三次握手和四次挥手</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[10]&nbsp;<a href="http://www.52im.net/thread-3330-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">假如你来设计网络，会怎么做？</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[11]&nbsp;<a href="http://www.52im.net/thread-3339-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">假如你来设计TCP协议，会怎么做？</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[12]&nbsp;<a href="http://www.52im.net/thread-1024-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">深入地理解UDP协议并用好它</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[13]&nbsp;<a href="http://www.52im.net/thread-1293-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">如何让不可靠的UDP变的可靠？</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[14]&nbsp;<a href="http://www.52im.net/thread-4724-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">UDP比TCP高效？还真不一定！</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[15]&nbsp;<a href="http://www.52im.net/thread-4868-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">可靠传输的TCP协议send成功就意味着数据一定发出去了？</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[16]&nbsp;<a href="http://www.52im.net/thread-281-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">为何基于TCP协议的移动端IM仍然需要心跳保活机制？</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">[17]&nbsp;<a href="http://www.52im.net/thread-1309-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">技术扫盲：新一代基于UDP的低延时网络传输层协议&#8212;&#8212;QUIC详解</a></p><blockquote style="background-image: none; border-top: none; border-right: none; border-bottom: none; border-left-width: 3px; border-left-color: #e2dfdf; margin-right: 0px; margin-left: 0px; background-color: #eeeeee; width: 896px; color: #555555; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;"><p style="margin-top: 10px; margin-bottom: 10px;"><strong>即时通讯技术学习：</strong></p><p style="margin-top: 10px; margin-bottom: 10px;">- 移动端IM开发入门文章：《<a href="http://www.52im.net/thread-464-1-1.html" rel="noopener nofollow" target="_blank" style="color: #1d58d1; text-decoration-line: none;">新手入门一篇就够：从零开发移动端IM</a>》</p><p style="margin-top: 10px; margin-bottom: 10px;">- 开源IM框架源码：<a href="https://github.com/JackJiang2011/MobileIMSDK" rel="noopener nofollow" target="_blank" style="color: #1d58d1; text-decoration-line: none;">https://github.com/JackJiang2011/MobileIMSDK</a>（<a href="https://gitee.com/jackjiang/MobileIMSDK" rel="noopener nofollow" target="_blank" style="color: #1d58d1; text-decoration-line: none;">备用地址点此</a>）</p></blockquote><p style="margin-top: 10px; margin-bottom: 10px; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: #ffffff;">（<strong>本文已同步发布于：</strong><a href="http://www.52im.net/thread-4897-1-1.html" target="_blank" style="color: #1d58d1; text-decoration-line: none;">http://www.52im.net/thread-4897-1-1.html</a>）</p><img src ="http://www.blogjava.net/jb2011/aggbug/451762.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jb2011/" target="_blank">Jack Jiang</a> 2026-03-17 15:35 <a href="http://www.blogjava.net/jb2011/archive/2026/03/17/451762.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>语义缓存 - 使用Higress</title><link>http://www.blogjava.net/paulwong/archive/2026/03/11/451755.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Wed, 11 Mar 2026 10:07:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2026/03/11/451755.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/451755.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2026/03/11/451755.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/451755.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/451755.html</trackback:ping><description><![CDATA[与大模型的对话，如果之后其他人非当前用户的问题如果与之前的用户问的问题类似，可迅速从缓存中取出，无需再走LLM。<br /><br />使用ai网关Higress，此动作在服务端Higress中完成，客户端无需任何代码。<br /><br />在milvus的vector db中新加collection，名称：<span style="font-size: 13px; background-color: #eeeeee;">ai_higress_cache，和以下字段：<br /></span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->Field,&nbsp;Type,&nbsp;Index&nbsp;Name,&nbsp;Index&nbsp;Type,&nbsp;Index&nbsp;Parameters<br />id,auto&nbsp;id,&nbsp;Int64<br />vector,&nbsp;FloatVector(4096),&nbsp;vector,&nbsp;metric_type:COSINE<br />question,&nbsp;VarChar(5000)<br />answer,&nbsp;VarChar(5000)<br />#这三个字段vector,&nbsp;question,&nbsp;answer是必需的，且名字不能改</div><br />前期需要配置做embedding的服务，VECTOR DB的服务，均可在服务来源中完成。<br /><br />在&#8220;ai路由管理&#8221;中，点击某个路由的策略，点击配置，输入以下yaml配置<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all">embedding:<br />&nbsp;&nbsp;apiKey:&nbsp;"sk-xxxxxxx"<br />&nbsp;&nbsp;model:&nbsp;"nvidia/llama-embed-nemotron-8b"<br />&nbsp;&nbsp;path:&nbsp;"/v1/embeddings"<br />&nbsp;&nbsp;serviceName:&nbsp;"llm-vllm-nvidia--llama-embed-nemotron-8b.internal.static"<br />&nbsp;&nbsp;servicePort:&nbsp;80<br />&nbsp;&nbsp;type:&nbsp;"openai"<br />vector:<br />&nbsp;&nbsp;apiKey:&nbsp;"empty-key"<br />&nbsp;&nbsp;collectionID:&nbsp;"ai_higress_cache"<br />&nbsp;&nbsp;serviceName:&nbsp;"my-milvus.static"<br />&nbsp;&nbsp;servicePort:&nbsp;80<br />&nbsp;&nbsp;type:&nbsp;"milvus"<br />cacheKeyFrom:&nbsp;"messages.@reverse.0.content"<br />cacheKeyPrefix:&nbsp;"openai_gpt_oss_20b_"<br />cacheStreamValueFrom:&nbsp;"choices.0.delta.content"<br />cacheValueFrom:&nbsp;"choices.0.message.content"<br />returnResponseTemplate:&nbsp;|<br />&nbsp;&nbsp;{"id":"from-cache","choices":<span style="color: #800000; font-weight: bold; ">[</span><span style="color: #800000; ">{"index":0,"message":{"role":"assistant","content":"%s"},"finish_reason":"stop"}</span><span style="color: #800000; font-weight: bold; ">]</span>,"model":"gpt-4o","object":"chat.completion","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}<br />returnStreamResponseTemplate:&nbsp;|-<br />&nbsp;&nbsp;data:{"id":"from-cache","choices":<span style="color: #800000; font-weight: bold; ">[</span><span style="color: #800000; ">{"index":0,"delta":{"role":"assistant","content":"%s"},"finish_reason":"stop"}</span><span style="color: #800000; font-weight: bold; ">]</span>,"model":"gpt-4o","object":"chat.completion","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}<br />&nbsp;&nbsp;data:<span style="color: #800000; font-weight: bold; ">[</span><span style="color: #800000; ">DONE</span><span style="color: #800000; font-weight: bold; ">]</span></div><br />参照：<br /><a href="https://higress.ai/docs/latest/user/plugins/ai/api-provider/ai-cache/" target="_blank">https://higress.ai/docs/latest/user/plugins/ai/api-provider/ai-cache/</a><br /><br /><img src ="http://www.blogjava.net/paulwong/aggbug/451755.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2026-03-11 18:07 <a href="http://www.blogjava.net/paulwong/archive/2026/03/11/451755.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装uv</title><link>http://www.blogjava.net/paulwong/archive/2026/03/08/451753.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Sun, 08 Mar 2026 09:32:00 GMT</pubDate><guid>http://www.blogjava.net/paulwong/archive/2026/03/08/451753.html</guid><wfw:comment>http://www.blogjava.net/paulwong/comments/451753.html</wfw:comment><comments>http://www.blogjava.net/paulwong/archive/2026/03/08/451753.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/paulwong/comments/commentRss/451753.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/paulwong/services/trackbacks/451753.html</trackback:ping><description><![CDATA[<div>安装命令</div>
<div>
<div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; border-image: none; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
-->curl&nbsp;-LsSf&nbsp;https://astral.sh/uv/install.sh&nbsp;|&nbsp;sh</div>
</div>
<div><br />
</div>
<div>同步项目环境，并指定python版本</div>
<div>
<div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; border-image: none; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
-->uv&nbsp;sync&nbsp;--python&nbsp;3.12</div>
</div>
<div><br />
</div>
<div><br />
</div>
<img src ="http://www.blogjava.net/paulwong/aggbug/451753.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/paulwong/" target="_blank">paulwong</a> 2026-03-08 17:32 <a href="http://www.blogjava.net/paulwong/archive/2026/03/08/451753.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>