<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[苏辰]]></title><description><![CDATA[世上的路有很多条.]]></description><link>https://blog.chiran.top</link><image><url>https://blog.chiran.top/innei.svg</url><title>苏辰</title><link>https://blog.chiran.top</link></image><generator>Shiro (https://github.com/Innei/Shiro)</generator><lastBuildDate>Wed, 11 Nov 2026 04:00:13 GMT</lastBuildDate><atom:link href="https://blog.chiran.top/feed" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Nov 2026 04:00:13 GMT</pubDate><language><![CDATA[zh-CN]]></language><item><title><![CDATA[为了免费停车，我写了一个龙湖自动签到脚本]]></title><description><![CDATA[<link rel="preload" as="image" href="https://mx.chiran.top/api/v2/objects/icon/ejocl4bxem9dzdflqj.jpg"/><link rel="preload" as="image" href="https://mx.chiran.top/api/v2/objects/icon/8tamowfkmx7z1qvvwj.jpg"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/posts/生活日常/Longfor-Sign">https://blog.chiran.top/posts/生活日常/Longfor-Sign</a></blockquote><div><h1 id="">开端</h1><p>我……掉到了 V2，没办法再免费停车了。</p><p>26 年 1 月时的我发现了这个事，但由于本人太过懒散，又或许是受到了 xxyz30 老师的<a href="https://gitee.com/FancyCabbage/skyland-auto-sign">森空岛自动签到脚本</a>的启发，于是我有了写一个自动签到程序的念头。</p><h1 id="">发展</h1><h2 id="">第一次尝试</h2><p>我一开始的想法很简单，直接使用抓包工具查看一下发送的请求不就行了。说干就干，我原本以为安卓手机在这个方面会更加容易，但没想到把抓包软件的证书放进系统证书目录竟然需要 root 权限。没办法的我只能转而尝试 iPhone，诶，很快哦，轻而易举地就把请求抓了出来。</p><p>手机点击签到，说到底也是向服务器发送一个请求。我把这条请求里的登录 token、风控 token 和活动编号拿出来，用 Python 再发送一遍，成功了。接下来就是让程序每天向服务器发送这个请求，再把结果推送到我的手机上。</p><p>于是，从 1 月 14 日起，我以为我跑通了龙湖签到的一切。</p><h2 id="">第一次转折</h2><p>第一次转折发生在 1 月 20 日，我的手机上收到这么一条消息：</p><pre class="language-text lang-text"><code class="language-text lang-text">【龙湖天街】签到失败:
{&#x27;code&#x27;: &#x27;8040016&#x27;, &#x27;message&#x27;: &#x27;网络故障，请稍后再试&#x27;}
</code></pre>
<p>这个网络故障是什么呢？服务器的网络怎么会有问题？不信邪的我登录自己的账号，这才明白原来是被风控了：屏幕中是一个滑块验证码，需要人类将其从最左侧精确地滑到对应的位置。我的程序只是一个发送请求的机器人，当然是被这个验证滑块挡住了。</p><p>那就继续抓包，看看它是怎么验证的。但当我分析收到的图片时，又发现了不对劲的地方。为什么这个图片竟然是这样的？</p><p><img src="https://mx.chiran.top/api/v2/objects/icon/ejocl4bxem9dzdflqj.jpg" alt="抓包得到的乱序背景图" height="200" width="400"/></p><p>一张图片被切成了很多个小块，随后又被打乱组合在一起。既然小程序中显示的是完整图片，那客户端肯定有把它拼回去的办法。我开始上网搜索相关内容，最后找到了这几篇：<a href="https://www.ayuge.top/mkdocs-material/tiny/mds/验证码底图还原/#211">验证码底图还原</a>、<a href="https://juejin.cn/post/7125805674952392712">顶象滑块逆向分析——背景图还原分析</a>、<a href="https://blog.csdn.net/qq_45767189/article/details/136647680">顶象图片还原算法记录</a>。</p><p>阅读后我知道了，我需要一个记录切片顺序的数组，只要拿到它，就能将背景图还原出来。这个数组是哪来的呢？它不可能凭空冒出来吧。但是在抓到的结果中，也只能找到一个以 <code>dingxiang</code> 开头的字符串 <code>o</code>，这个会是我们要的数组吗？</p><p>还真是，只不过要先把这个字符串转换一下。</p><p>对应的代码会取 <code>o</code> 的前 32 个字符，把每个字符转成数字，再除以 32 取余数。如果得到的数字已经出现过，就加一继续算，直到得到一个没有用过的数字。这样最后就能得到一组没有重复的、从 0 到 31 的数字，也就是这 32 个切片的位置顺序。</p><p>接下来就是照着顺序裁切、重新拼图。这里我还得弄清楚，数组记录的是“从哪个位置取”，还是“放到哪个位置去”，方向弄反了，拼出来还是乱的。</p><p>终于，背景图还原出来了：</p><p><img src="https://mx.chiran.top/api/v2/objects/icon/8tamowfkmx7z1qvvwj.jpg" alt="还原后的背景图"/></p><p>那么下一步，就是识别与滑块相同形状的位置了。</p><p>这部分用的是 OpenCV。先处理滑块图的透明区域，提取滑块和背景的边缘，再拿滑块的形状去背景里匹配，找出最像的位置。为了方便检查，我还让程序把识别到的位置画回图片里，这样一眼就能看出来它到底找对了没有。</p><p>图片有了，位置也有了，应该能提交了吧？结果请求里面还有一个很长的 <code>ac</code> 参数，又得继续找。</p><h2 id="-js">继续看 JS</h2><p>顺着 <code>basic-captcha-js.js</code> 往下看，可以找到 <code>ac</code> 是从 <code>getUA()</code> 拿到的。别人的分析里又提到了 <code>greenseer.js</code>，但我抓包的时候并没有顺利找到这个文件。等把文件找来，里面又是各种看不懂的变量和拼接。</p><p>于是我一边查资料，一边把代码丢给 AI 一起看，后来找到了 <code>greenseerAST.js</code>，试着用它来反混淆。</p><p>这个脚本会把代码里的数组引用、字符串拼接和一些能直接算出来的表达式还原，让原本绕来绕去的代码稍微好读一点。处理之后，再沿着 <code>reload</code>、<code>start</code> 这些方法继续往下找，才逐渐看明白它在做什么。</p><p>原来验证时除了最后的坐标，还要带上时间、浏览器和页面信息，以及滑动过程中的轨迹。<code>ac</code> 就是这些数据经过编码后得到的结果，光把终点坐标填进去还不行。</p><p>所以又得生成滑动轨迹，对照 JS 把这些数据的编码过程补上，再和前面算出来的位置一起提交。</p><p>那天我从 6 点半一直研究到 11 点 32，终于第一次跑通了验证码的处理。验证成功后，把返回的值填进 <code>X-LF-DXRisk-Captcha-Token</code>，重新发送签到请求，终于签好了。</p><h2 id="">但是，还没完</h2><p>后面我又添加了重试功能，一次不行就再试一次，但效果不是很理想。中间断断续续签到失败了很多次，有时候能过，有时候又不行。</p><p>我把每次处理验证码的图片和识别记录都保存了下来，再下载到本地的 <code>longfor-sign-CAPTCHA</code> 文件夹里，自己一张一张看。</p><p>尤其是那些返回 <code>POSITION_MISMATCH</code>，也就是位置不匹配的记录：到底是 CV 没找到缺口，还是已经找到了，但提交的距离不对？</p><p>后来才慢慢对上，这里面的坐标不能直接拿来用。缺口在图片中的位置，和滑块从起点需要移动的距离，中间还差着偏移；识别时取的是左边缘还是中线，也得对应起来。</p><p>于是我又对着那些图，一点一点算到底还要减掉多少。现在翻以前的聊天记录，还能看到我当时写的“x 要减掉 20”。类似这样的修修改改，持续了一个多月，最终在 2 月 25 日解决了验证码的问题。</p><p>到了 3 月，我把程序迁移到了华为云函数工作流，每天让定时触发器叫它起来签到，签完就结束，再把结果推送给我。</p><p>接下来，它就这么一直跑着，直到 10 月 29 日。</p><h2 id="">第二次转折</h2><p>这天，我收到了一条新的提示：</p><pre class="language-text lang-text"><code class="language-text lang-text">【龙湖天街】签到失败:
{&#x27;code&#x27;: &#x27;801810&#x27;, &#x27;message&#x27;: &#x27;活动太火爆了，明日再来试试~&#x27;}
</code></pre>
<p>我尝试了手动签到，但是也是这个提示，感觉又被风控了。于是我先暂停了程序，没有让它继续重试，并在第二天下午成功签到。</p><p>想了想，每天都在固定时间，按差不多的节奏把这些账号签一遍，好像确实有点规律了。所以我又添加了随机时间签到的功能。</p><p>每天先生成一份随机计划，把账号安排到不同的时间，顺序也打乱。云函数每半小时起来检查一下，有账号到时间了就签到，没有就结束，等下一次再检查。当天的计划和执行结果会保存下来，下一次运行时就知道哪些已经签过了。</p><p>这样就不用每天都在同一个时间签到。原来固定触发的版本我也保留了，想用哪一个都可以。</p><h2 id="-docker-">又做了一个 Docker 版</h2><p>就在前几天，我在刷 Linux DO 的时候，发现 <a href="https://github.com/ken861222">ken861222</a> 也做了一个<a href="https://github.com/ken861222/longhu-checkin">相似的签到工具</a>。他的项目可以部署在自己的服务器上，还带有一个网页面板，这又给了我灵感。</p><p>既然有常开的服务器，那就可以把程序放在上面，每天随机出一个具体时间，到点再签到，也方便自己选择时间范围、调整账号间隔。</p><p>所以我又给自己的程序加了一个网页面板，把账号管理、签到计划、执行记录和推送设置都放了进去，再整理成 Docker 版本。这样部署的时候也不用自己一个个安装 Python 依赖，启动容器后，打开网页就能配置。</p><p>如果大家有常开的服务器，或者支持 Docker 的 NAS，也可以用这个版本。</p><p>没有的话，华为云的两个版本也都还在，固定触发和随机时间可以自己选。原来的基础脚本、GitHub Actions 工作流同样保留，不过现在不推荐使用 GitHub Actions 作为长期签到的部署方式。</p><p>代码和部署说明放在这里：<a href="https://github.com/CheerfulChen/longfor-sign">Longfor Sign</a>。</p></div><p style="text-align:right"><a href="https://blog.chiran.top/posts/生活日常/Longfor-Sign#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/posts/生活日常/Longfor-Sign</link><guid isPermaLink="true">https://blog.chiran.top/posts/生活日常/Longfor-Sign</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Sun, 08 Nov 2026 01:44:50 GMT</pubDate></item><item><title><![CDATA[十月饭记 其二]]></title><description><![CDATA[<link rel="preload" as="image" href="https://img.chiran.top/10.9%E6%99%9A%E9%A5%ADPopeyes.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.9%E6%99%9A%E9%A5%ADPopeyes1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.10%E6%99%9A%E9%A5%AD%E8%BE%A3%E5%AD%90%E9%B8%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.11%E6%99%9A%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E7%84%96%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.12%E6%99%9A%E9%A5%AD%E7%82%92%E9%B8%A1%E8%85%BF%E8%82%89.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.13%E6%97%A9%E9%A5%AD%E7%85%8E%E9%9D%A2%E5%8C%85.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.13%E6%99%9A%E9%A5%AD%E9%A5%BA%E5%AD%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.14%E6%97%A9%E9%A5%AD%E7%85%8E%E8%9B%8B%E4%B8%89%E6%96%87%E9%B1%BC%E7%99%BD%E7%B2%A5.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.14%E6%99%9A%E9%A5%AD%E8%BE%A3%E5%AD%90%E9%B8%A12.0.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.14%E6%99%9A%E9%A5%AD%E7%83%A4%E7%BE%8A%E6%8E%92.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.15%E6%99%9A%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E7%84%96%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.16%E6%99%9A%E9%A5%AD%E7%95%AA%E8%8C%84%E8%82%89%E9%85%B1%E6%84%8F%E9%9D%A2%E9%85%8D%E5%AD%9C%E7%84%B6%E7%BE%8A%E8%82%89.jpeg"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/7">https://blog.chiran.top/notes/7</a></blockquote><div><p>我来英国已经一个月啦，如果将在英国的时间当作倒计时，那么时钟已经走过了一个钟</p><p>9号晚上又在王子街吃了Popeyes，炸鸡确实好吃啊
<img src="https://img.chiran.top/10.9%E6%99%9A%E9%A5%ADPopeyes.jpeg" alt="10.9晚饭Popeyes" height="3024" width="4032"/></p><p>这个汉堡感觉也是比麦当劳好吃，肉量感觉大一些
<img src="https://img.chiran.top/10.9%E6%99%9A%E9%A5%ADPopeyes1.jpeg" alt="10.9晚饭Popeyes1"/></p><p>10号晚上自己炒了辣子鸡，辣椒有点炒糊了，而且肉感觉没什么辣味，评价给到拉
<img src="https://img.chiran.top/10.10%E6%99%9A%E9%A5%AD%E8%BE%A3%E5%AD%90%E9%B8%A1.jpeg" alt="10.10晚饭辣子鸡"/></p><p>11号晚上懒得烧饭，所以是牛肉土豆焖饭返场了，这次还加了青菜，感觉不错
<img src="https://img.chiran.top/10.11%E6%99%9A%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E7%84%96%E9%A5%AD.jpeg" alt="10.11晚饭土豆牛肉焖饭"/></p><p>12号晚上用最后剩的一点鸡腿肉炒了一下！这个是真的好吃，就是油有点多了
<img src="https://img.chiran.top/10.12%E6%99%9A%E9%A5%AD%E7%82%92%E9%B8%A1%E8%85%BF%E8%82%89.jpeg" alt="10.12晚饭炒鸡腿肉"/></p><p>13号早上吃的是面包，因为在lidl买了一大袋这个很便宜的白面包，配着牛奶蛋液煎了一下，还不错
<img src="https://img.chiran.top/10.13%E6%97%A9%E9%A5%AD%E7%85%8E%E9%9D%A2%E5%8C%85.jpeg" alt="10.13早饭煎面包"/></p><p>晚饭又懒了，那就煮一下之前包的饺子吧
<img src="https://img.chiran.top/10.13%E6%99%9A%E9%A5%AD%E9%A5%BA%E5%AD%90.jpeg" alt="10.13晚饭饺子"/></p><p>14号早饭（其实也可以说是中饭）是真的很丰盛了，又是煎蛋又是煎三文鱼
<img src="https://img.chiran.top/10.14%E6%97%A9%E9%A5%AD%E7%85%8E%E8%9B%8B%E4%B8%89%E6%96%87%E9%B1%BC%E7%99%BD%E7%B2%A5.jpeg" alt="10.14早饭煎蛋三文鱼白粥"/></p><p>因为这天去买了个新的炒锅，所以又炒了一次辣子鸡，这次的辣子鸡好吃多了！
<img src="https://img.chiran.top/10.14%E6%99%9A%E9%A5%AD%E8%BE%A3%E5%AD%90%E9%B8%A12.0.jpeg" alt="10.14晚饭辣子鸡2.0"/></p><p>感觉不太够吃的苏辰又烤了块羊排，一般般水平，有点干了
<img src="https://img.chiran.top/10.14%E6%99%9A%E9%A5%AD%E7%83%A4%E7%BE%8A%E6%8E%92.jpeg" alt="10.14晚饭烤羊排"/></p><p>15号，是的，土豆牛肉焖饭又返场了，配着啤酒吃也不错哦（这边的啤酒感觉比国内好喝啊
<img src="https://img.chiran.top/10.15%E6%99%9A%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E7%84%96%E9%A5%AD.jpeg" alt="10.15晚饭土豆牛肉焖饭"/></p><p>16号晚上炒了个孜然羊肉，加了酱油所以没有那么好看，但还是好吃的。意面有点煮多了，但味道也不错
<img src="https://img.chiran.top/10.16%E6%99%9A%E9%A5%AD%E7%95%AA%E8%8C%84%E8%82%89%E9%85%B1%E6%84%8F%E9%9D%A2%E9%85%8D%E5%AD%9C%E7%84%B6%E7%BE%8A%E8%82%89.jpeg" alt="10.16晚饭番茄肉酱意面配孜然羊肉"/></p><p>十月已经过去一半啦，但是我们还是有两门课在罢工，这个学上的好像已经从留子变成厨子了哈哈哈哈哈</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/7#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/7</link><guid isPermaLink="true">https://blog.chiran.top/notes/7</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Sat, 17 Oct 2026 13:13:18 GMT</pubDate></item><item><title><![CDATA[十月饭记 之 伦敦]]></title><description><![CDATA[<link rel="preload" as="image" href="https://img.chiran.top/10.1%E6%99%9A%E9%A4%90%E7%95%AA%E8%8C%84%E8%82%89%E9%85%B1%E9%85%8D%E6%B1%A4.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.2%E6%97%A9%E9%A4%90%E9%9D%A2%E6%9D%A1%E9%85%8D%E9%A6%99%E7%85%8E%E4%B8%89%E6%96%87%E9%B1%BC.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.2%E4%B8%AD%E9%A5%AD%E8%B6%8A%E5%8D%97%E7%B2%89.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.2%E6%99%9A%E9%A4%90%E4%BC%A6%E6%95%A6%E5%94%90%E4%BA%BA%E8%A1%972.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.2%E6%99%9A%E9%A4%90%E4%BC%A6%E6%95%A6%E5%94%90%E4%BA%BA%E8%A1%97.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI2.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI3.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI4.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI5.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.4%E4%B8%AD%E9%A5%AD%E7%83%A4%E5%85%A8%E9%B8%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.4%E6%99%9A%E9%A4%90Flat%20Iron.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.5%E4%B8%AD%E9%A5%AD%E8%82%89%E5%A4%B9%E9%A6%8D.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.5%E6%99%9A%E9%A4%90%E4%B8%89%E5%90%88%E4%B8%80.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.6%E4%B8%AD%E9%A5%AD%E9%BB%AF%E7%84%B6%E9%94%80%E9%AD%82%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.6%E6%99%9A%E9%A5%AD%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.7%E6%99%9A%E9%A5%AD%E8%BE%BE%E7%BE%8E%E4%B9%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/10.8%E6%99%9A%E9%A5%AD%E6%89%93%E6%8A%9B%E9%A5%AD.jpeg"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/6">https://blog.chiran.top/notes/6</a></blockquote><div><p>1号，这是去伦敦前的最后一顿晚餐，煮了个大杂烩汤，还挺好喝的，随便吃了口
<img src="https://img.chiran.top/10.1%E6%99%9A%E9%A4%90%E7%95%AA%E8%8C%84%E8%82%89%E9%85%B1%E9%85%8D%E6%B1%A4.jpeg" alt="10.1晚餐番茄肉酱配汤" height="4284" width="5712"/></p><p>2号早上，用昨天剩的汤煮了点面，然后配着煎三文鱼吃了。现在是四点多，要准备出发去伦敦了
<img src="https://img.chiran.top/10.2%E6%97%A9%E9%A4%90%E9%9D%A2%E6%9D%A1%E9%85%8D%E9%A6%99%E7%85%8E%E4%B8%89%E6%96%87%E9%B1%BC.jpeg" alt="10.2早餐面条配香煎三文鱼"/></p><p>中午已经抵达伦敦了，在King&#x27;s Cross附近吃了个越南粉，味道还不错
<img src="https://img.chiran.top/10.2%E4%B8%AD%E9%A5%AD%E8%B6%8A%E5%8D%97%E7%B2%89.jpeg" alt="10.2中饭越南粉"/></p><p>住的酒店就在唐人街附近，所以就去唐人街吃了口。叉烧饭挺一般的，但是水煮肉片挺好吃
<img src="https://img.chiran.top/10.2%E6%99%9A%E9%A4%90%E4%BC%A6%E6%95%A6%E5%94%90%E4%BA%BA%E8%A1%972.jpeg" alt="10.2晚餐伦敦唐人街2"/>
还送了份炸春卷，好吃
<img src="https://img.chiran.top/10.2%E6%99%9A%E9%A4%90%E4%BC%A6%E6%95%A6%E5%94%90%E4%BA%BA%E8%A1%97.jpeg" alt="10.2晚餐伦敦唐人街"/></p><p>3号白天去了白崖，就吃了点小饼干之类的，晚上吃了顿精致的法餐，这个是意大利面
<img src="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI.jpeg" alt="10.3晚餐CICCHETTI"/></p><p>低温慢煮牛肉片，我有点吃不来，但应该还可以
<img src="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI2.jpeg" alt="10.3晚餐CICCHETTI2"/></p><p>蓝纹奶酪土豆球，出乎意料的好吃！蓝纹奶酪也没有想象中的那么臭，吃着还是挺香的
<img src="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI3.jpeg" alt="10.3晚餐CICCHETTI3"/></p><p>这其实是个披萨，包起来有点像个饺子，切开里面的料也很丰富，很好吃！
<img src="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI4.jpeg" alt="10.3晚餐CICCHETTI4"/></p><p>菲力牛排，感觉就是一般水平，没有很惊艳
<img src="https://img.chiran.top/10.3%E6%99%9A%E9%A4%90CICCHETTI5.jpeg" alt="10.3晚餐CICCHETTI5"/></p>
<p>4号白天在伦敦City walk了一下，中午找了家餐馆，烤全鸡配饭其实挺香的，就是有点烤焦了
<img src="https://img.chiran.top/10.4%E4%B8%AD%E9%A5%AD%E7%83%A4%E5%85%A8%E9%B8%A1.jpeg" alt="10.4中饭烤全鸡"/></p><p>晚饭吃了Flat Iron，伦敦有很多店的平价牛排店，味道是真的不错！用的应该全是牛油，薯条带奶香味特别好吃！其实我们刚落地伦敦就想去吃了，但是要排队一小时，第二天是预约错日期了，三顾Flat Iron说是
<img src="https://img.chiran.top/10.4%E6%99%9A%E9%A4%90Flat%20Iron.jpeg" alt="10.4晚餐Flat Iron"/></p><p>5号在剑桥，中午吃了个很大的牛肉肉夹馍，特别好吃！！！香爆了！
<img src="https://img.chiran.top/10.5%E4%B8%AD%E9%A5%AD%E8%82%89%E5%A4%B9%E9%A6%8D.jpeg" alt="10.5中饭肉夹馍"/></p><p>晚饭在空中花园楼下找了个陕西面馆，价格也不贵，味道超级正宗！辣椒也是又辣又香！
<img src="https://img.chiran.top/10.5%E6%99%9A%E9%A4%90%E4%B8%89%E5%90%88%E4%B8%80.jpeg" alt="10.5晚餐三合一"/></p><p>6号是在伦敦的最后一天了，我们背着大包又开始了City walk。中午还是在唐人街附近吃了<strong>八大八小</strong>，黯然销魂饭，正常水平
<img src="https://img.chiran.top/10.6%E4%B8%AD%E9%A5%AD%E9%BB%AF%E7%84%B6%E9%94%80%E9%AD%82%E9%A5%AD.jpeg" alt="10.6中饭黯然销魂饭"/></p><p>晚上在博罗市场逛了一下，看到了一家很多人排队的炸鱼薯条。跟着风尝了一下，价格不便宜，但是鳕鱼排很大。味道很一般，因为没有像宜家的那种酱，吃着味道很单调。
<img src="https://img.chiran.top/10.6%E6%99%9A%E9%A5%AD%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg" alt="10.7晚饭达美乐"/></p><p>7号凌晨成功回到爱丁堡，感觉气温降了挺多的，风吹着还是有点冷的。晚上不想做饭，买了个<strong>达美乐</strong>的Meateor。披萨很大，但是英国人你是怎么做到让苏州人都觉得甜的。。
<img src="https://img.chiran.top/10.7%E6%99%9A%E9%A5%AD%E8%BE%BE%E7%BE%8E%E4%B9%90.jpeg" alt="10.7晚饭达美乐"/></p><p>8号去上学了，下午去Waitrose买了一些调料，回家做了个泰式牛肉打抛饭。超级超级香，我也太会烧了！
<img src="https://img.chiran.top/10.8%E6%99%9A%E9%A5%AD%E6%89%93%E6%8A%9B%E9%A5%AD.jpeg" alt="10.8晚饭打抛饭"/></p><p>我的十月就这么开始了。算算我来到英国也差不多快一个月了，这边的生活有困难的地方，但更多是欢乐与开心。最后，记得好好吃饭！</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/6#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/6</link><guid isPermaLink="true">https://blog.chiran.top/notes/6</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Fri, 09 Oct 2026 12:07:42 GMT</pubDate></item><item><title><![CDATA[9月饭记 其二]]></title><description><![CDATA[<link rel="preload" as="image" href="https://img.chiran.top/9.22%E6%99%9A%E9%A4%90%E5%9C%9F%E8%B1%86%E9%B8%A1%E8%85%BF%E8%82%89%E7%84%96%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.23%E4%B8%AD%E9%A4%90%E6%B2%99%E5%A8%81%E7%8E%9B.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.23%E6%99%9A%E9%A4%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.24%E6%99%9A%E9%A4%90%E6%84%8F%E5%A4%A7%E5%88%A9%E9%9D%A2.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.25%E6%97%A9%E9%A4%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.25%E5%96%9C%E8%8C%B6.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.25%E6%99%9A%E9%A4%90%E4%B8%AD%E7%A7%8B%E8%8A%82.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.25%E6%99%9A%E9%A4%90%E4%B8%AD%E7%A7%8B%E8%8A%822.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.26%E8%8A%9D%E5%A3%AB%E6%8A%B9%E8%8C%B6%E8%9B%8B%E7%B3%95.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.26%E5%8D%88%E9%A4%90%E6%B1%89%E5%A0%A1%E7%8E%8B.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.26%E6%99%9A%E9%A4%90%E9%87%8D%E5%BA%86%E5%B0%8F%E9%9D%A2%E9%85%8D%E4%B8%89%E6%96%87%E9%B1%BC.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.27%E6%97%A9%E9%A4%90%E8%8C%B6%E5%8F%B6%E8%9B%8B.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.27%E6%99%9A%E9%A4%90%E7%89%9B%E8%82%89%E9%85%8D%E9%9D%92%E8%8F%9C.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.28%E4%B8%AD%E9%A5%AD%E6%B4%A5%E5%AE%B4.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.28%E6%99%9A%E9%A4%90Popeyes.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.29%E6%97%A9%E9%A4%90%E9%A5%BA%E5%AD%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.29%E6%97%A9%E9%A4%90%E9%A5%BA%E5%AD%902.JPG"/><link rel="preload" as="image" href="https://img.chiran.top/9.29%E4%B8%AD%E9%A5%AD%E9%9D%A2%E6%9D%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.29%E6%99%9A%E9%A4%90%E7%82%92%E9%9D%92%E8%8F%9C%E9%85%8D%E9%A6%99%E7%85%8E%E4%B8%89%E6%96%87%E9%B1%BC.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.30%E4%B8%AD%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E5%92%96%E5%96%B1%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.30%E6%99%9A%E9%A5%AD%E5%8D%83%E5%B1%82%E9%9D%A2.jpeg"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/5">https://blog.chiran.top/notes/5</a></blockquote><div><p>接上文</p><p>22日上完课，想到家里买的鸡腿快过期了，所以烧了个土豆鸡腿肉焖饭，但是这次买的土豆出水太多了，饭煮的有点烂
<img src="https://img.chiran.top/9.22%E6%99%9A%E9%A4%90%E5%9C%9F%E8%B1%86%E9%B8%A1%E8%85%BF%E8%82%89%E7%84%96%E9%A5%AD.jpeg" alt="9.22晚餐土豆鸡腿肉焖饭" height="3024" width="4032"/></p><p>23号中午吃了学校旁边大名鼎鼎的沙威玛，确实好吃，便宜实惠
<img src="https://img.chiran.top/9.23%E4%B8%AD%E9%A4%90%E6%B2%99%E5%A8%81%E7%8E%9B.jpeg" alt="9.23中餐沙威玛"/></p><p>晚上煎了昨天没吃完的鸡腿肉，还煮了个白菜汤。鸡腿肉有点咸了，白菜汤又没啥味
<img src="https://img.chiran.top/9.23%E6%99%9A%E9%A4%90.jpeg" alt="9.23晚餐"/></p><p>24号晚上自己煮了意大利番茄肉酱面吃，味道还不错！换了种方式煎鸡腿肉，但是还是挺一般的
<img src="https://img.chiran.top/9.24%E6%99%9A%E9%A4%90%E6%84%8F%E5%A4%A7%E5%88%A9%E9%9D%A2.jpeg" alt="9.24晚餐意大利面"/></p><p>25号中秋节，早餐是粥，去盛粥的时候鸡蛋有点焦了。。
<img src="https://img.chiran.top/9.25%E6%97%A9%E9%A4%90.jpeg" alt="9.25早餐"/></p><p>下午和叶哥出门，先喝了喜茶，苹果味的果茶，一般
<img src="https://img.chiran.top/9.25%E5%96%9C%E8%8C%B6.jpeg" alt="9.25喜茶"/></p><p>然后去了<strong>乌镇酒家</strong>，难怪能开在这么繁华的地方，味道确实挺好，干锅鸡很香啊
<img src="https://img.chiran.top/9.25%E6%99%9A%E9%A4%90%E4%B8%AD%E7%A7%8B%E8%8A%82.jpeg" alt="9.25晚餐中秋节"/></p><p>还点了一道小炒黄牛肉，味道也不错。另外的麻婆豆腐忘拍了，并且也不如其他两道菜
<img src="https://img.chiran.top/9.25%E6%99%9A%E9%A4%90%E4%B8%AD%E7%A7%8B%E8%8A%822.jpeg" alt="9.25晚餐中秋节2"/></p><p>26号早上去逛集市了，买了芝士蛋糕，挺好吃的抹茶味的
<img src="https://img.chiran.top/9.26%E8%8A%9D%E5%A3%AB%E6%8A%B9%E8%8C%B6%E8%9B%8B%E7%B3%95.jpeg" alt="9.26芝士抹茶蛋糕"/></p><p>中午看完比赛去吃了汉堡王，5磅的小汉堡，性价比拉满
<img src="https://img.chiran.top/9.26%E5%8D%88%E9%A4%90%E6%B1%89%E5%A0%A1%E7%8E%8B.jpeg" alt="9.26午餐汉堡王"/></p><p>晚饭有点懒，随手煎了点三文鱼煮了个重庆小面吃了，这个三文鱼全是烟熏味，不好吃
<img src="https://img.chiran.top/9.26%E6%99%9A%E9%A4%90%E9%87%8D%E5%BA%86%E5%B0%8F%E9%9D%A2%E9%85%8D%E4%B8%89%E6%96%87%E9%B1%BC.jpeg" alt="9.26晚餐重庆小面配三文鱼"/></p><p>27早餐吃了粥和我自己煮的茶叶蛋，仙品，这茶叶蛋真好吃吧
<img src="https://img.chiran.top/9.27%E6%97%A9%E9%A4%90%E8%8C%B6%E5%8F%B6%E8%9B%8B.jpeg" alt="9.27早餐茶叶蛋"/></p><p>晚饭自己炒了两个菜，味道还可以
<img src="https://img.chiran.top/9.27%E6%99%9A%E9%A4%90%E7%89%9B%E8%82%89%E9%85%8D%E9%9D%92%E8%8F%9C.jpeg" alt="9.27晚餐牛肉配青菜"/></p><p>28号去上课了，中饭在学校旁边吃的<strong>津宴</strong>，这个也好吃，我强推
<img src="https://img.chiran.top/9.28%E4%B8%AD%E9%A5%AD%E6%B4%A5%E5%AE%B4.jpeg" alt="9.28中饭津宴"/></p><p>晚饭也在外面吃的，<strong>Popeyes</strong>，不得不说这炸鸡确实好吃
<img src="https://img.chiran.top/9.28%E6%99%9A%E9%A4%90Popeyes.jpeg" alt="9.28晚餐Popeyes"/></p><p>29号早上吃的前一天包的饺子，香菜牛肉馅的，第一次包饺子包的不太好，但是好吃就行
<img src="https://img.chiran.top/9.29%E6%97%A9%E9%A4%90%E9%A5%BA%E5%AD%90.jpeg" alt="9.29早餐饺子"/></p><p>配酱油和香油吃，不错
<img src="https://img.chiran.top/9.29%E6%97%A9%E9%A4%90%E9%A5%BA%E5%AD%902.JPG" alt="9.29早餐饺子2"/></p><p>中饭的时候又包了点饺子，芹菜牛肉馅的，多了点肉馅做了点肉圆，然后和昨天剩的面一块煮了
<img src="https://img.chiran.top/9.29%E4%B8%AD%E9%A5%AD%E9%9D%A2%E6%9D%A1.jpeg" alt="9.29中饭面条"/></p><p>晚饭是自己烧的，这次买的是冷藏三文鱼，煎了一下香爆了
<img src="https://img.chiran.top/9.29%E6%99%9A%E9%A4%90%E7%82%92%E9%9D%92%E8%8F%9C%E9%85%8D%E9%A6%99%E7%85%8E%E4%B8%89%E6%96%87%E9%B1%BC.jpeg" alt="9.29晚餐炒青菜配香煎三文鱼"/></p><p>30号中午又煮了咖喱土豆牛肉，真的很下饭
<img src="https://img.chiran.top/9.30%E4%B8%AD%E9%A5%AD%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89%E5%92%96%E5%96%B1%E9%A5%AD.jpeg" alt="9.30中饭土豆牛肉咖喱饭"/></p><p>晚上发现之前买的千层面快过期了，所以烤了一下，口感NPC，味道稍微好一点
<img src="https://img.chiran.top/9.30%E6%99%9A%E9%A5%AD%E5%8D%83%E5%B1%82%E9%9D%A2.jpeg" alt="9.30晚饭千层面"/></p><p>好啦，9月到这里就结束了，期待10月能吃什么好吃的😋</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/5#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/5</link><guid isPermaLink="true">https://blog.chiran.top/notes/5</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Thu, 01 Oct 2026 10:30:41 GMT</pubDate></item><item><title><![CDATA[9月饭记 其一]]></title><description><![CDATA[<link rel="preload" as="image" href="https://img.chiran.top/rb8a8ghjhgdy0xfeto.jpg"/><link rel="preload" as="image" href="https://img.chiran.top/vq06avvxalt2ovo2v4.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.11%E7%AC%AC%E4%BA%8C%E7%A8%8B%E5%8D%88%E9%A4%90.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.11%E7%AC%AC%E4%BA%8C%E7%A8%8B%E5%8D%88%E9%A4%902.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.12%E4%B8%AD%E5%8D%88%E6%B1%89%E5%A0%A1%E7%8E%8B.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.12%E6%99%9A%E9%A4%90%E4%B8%80%E5%8F%A3%E7%82%AD%E9%94%85.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.13%E5%AE%9C%E5%AE%B6%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.13%E6%99%9A%E9%A4%90%E5%BA%B8%E4%B9%90%E8%BD%A9.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.14%E4%B8%AD%E9%A5%AD%E5%B7%9D%E5%BA%9C%E9%98%81.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.14%E6%99%9A%E9%A5%AD%E7%95%AA%E8%8C%84%E7%89%9B%E8%82%89.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.15%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.17%E5%AE%9C%E5%AE%B6%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.17%E8%A5%BF%E7%8F%AD%E7%89%99%E6%B5%B7%E9%B2%9C%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.17%E8%A5%BF%E7%8F%AD%E7%89%99%E6%B5%B7%E9%B2%9C%E9%A5%AD2.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.18%E9%87%8D%E5%BA%86%E5%B0%8F%E9%9D%A2.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.19%E5%8D%88%E9%A4%90%E9%BA%A6%E5%BD%93%E5%8A%B3.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.19%E6%99%9A%E9%A4%90rqw.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.20%E6%97%A9%E9%A4%90.JPG"/><link rel="preload" as="image" href="https://img.chiran.top/9.20%E4%B8%AD%E9%A5%AD.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.20%E6%99%9A%E9%A4%90%E4%B8%89%E4%B8%AA%E4%BA%BA.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.21%E4%B8%8B%E5%8D%88%E8%96%AF%E6%9D%A1.jpeg"/><link rel="preload" as="image" href="https://img.chiran.top/9.21%E6%99%9A%E9%A4%90%E8%BE%A3%E5%AD%90%E9%B8%A1.jpeg"/><div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/4">https://blog.chiran.top/notes/4</a></blockquote><div><p>新开一个手记，来记录我这一年吃过的饭</p><p>11日第一乘飞机的早餐，一般
<img src="https://img.chiran.top/rb8a8ghjhgdy0xfeto.jpg" alt="9.11飞机早餐" height="1280" width="1706"/></p><p>11日第一乘的午餐，同样也是一般
<img src="https://img.chiran.top/vq06avvxalt2ovo2v4.jpeg" alt="9.11飞机午餐"/></p><p>11日第二程的午餐，这个是真好吃！粒粒分明的大米，调味也超级香！
<img src="https://img.chiran.top/9.11%E7%AC%AC%E4%BA%8C%E7%A8%8B%E5%8D%88%E9%A4%90.jpeg" alt="9.11第二程午餐"/>
<img src="https://img.chiran.top/9.11%E7%AC%AC%E4%BA%8C%E7%A8%8B%E5%8D%88%E9%A4%902.jpeg" alt="9.11第二程午餐"/></p><p>12日，算是落地吃的第一餐，汉堡王没让我失望，就是真的有点贵
<img src="https://img.chiran.top/9.12%E4%B8%AD%E5%8D%88%E6%B1%89%E5%A0%A1%E7%8E%8B.jpeg" alt="9.12中午汉堡王"/></p><p>12日晚上和朋友们去吃了<strong>一口炭锅</strong>，中规中矩吧感觉
<img src="https://img.chiran.top/9.12%E6%99%9A%E9%A4%90%E4%B8%80%E5%8F%A3%E7%82%AD%E9%94%85.jpeg" alt="9.12晚餐一口炭锅"/></p><p>13日早上去了宜家，但是到达已经12点了，所以直接吃中饭
<img src="https://img.chiran.top/9.13%E5%AE%9C%E5%AE%B6%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg" alt="9.13宜家炸鱼薯条"/></p><p>晚上和朋友去吃了斜对面的中餐馆，<strong>庸乐轩</strong>，这个是真的超级好吃
<img src="https://img.chiran.top/9.13%E6%99%9A%E9%A4%90%E5%BA%B8%E4%B9%90%E8%BD%A9.jpeg" alt="9.13晚餐庸乐轩"/></p><p>14日起的比较晚，吃的是对面的<strong>川府阁</strong>，烤鱼挺一般的，水煮肉片不错
<img src="https://img.chiran.top/9.14%E4%B8%AD%E9%A5%AD%E5%B7%9D%E5%BA%9C%E9%98%81.jpeg" alt="9.14中饭川府阁"/></p><p>14日是我搬入自己房间的第一天，晚饭也是自己烧的第一顿。吃的是番茄牛腩，就是水加的有点多
<img src="https://img.chiran.top/9.14%E6%99%9A%E9%A5%AD%E7%95%AA%E8%8C%84%E7%89%9B%E8%82%89.jpeg" alt="9.14晚饭番茄牛肉"/></p><p>15日也是自己烧的，<strong>咖喱土豆牛肉</strong>。这个是真好吃，配着饭能吃两大碗！
<img src="https://img.chiran.top/9.15%E5%9C%9F%E8%B1%86%E7%89%9B%E8%82%89.jpeg" alt="9.14晚饭番茄牛肉"/></p><p>16日忘记了没有拍照，所以直接跳到17日。中午又是宜家吃的，和上次几乎一模一样
<img src="https://img.chiran.top/9.17%E5%AE%9C%E5%AE%B6%E7%82%B8%E9%B1%BC%E8%96%AF%E6%9D%A1.jpeg" alt="9.17宜家炸鱼薯条"/></p><p>17号下午去了海边，晚饭在附近找了家西班牙餐馆。有点贵，评价中上吧
<img src="https://img.chiran.top/9.17%E8%A5%BF%E7%8F%AD%E7%89%99%E6%B5%B7%E9%B2%9C%E9%A5%AD.jpeg" alt="9.17西班牙海鲜饭"/></p><p>这个西班牙海鲜饭比两个小菜好吃一点
<img src="https://img.chiran.top/9.17%E8%A5%BF%E7%8F%AD%E7%89%99%E6%B5%B7%E9%B2%9C%E9%A5%AD2.jpeg" alt="9.17西班牙海鲜饭2"/></p><p>18号Joybuy买的重庆小面到了，所以煎了几片午餐肉，配着小面吃。评价人上人
<img src="https://img.chiran.top/9.18%E9%87%8D%E5%BA%86%E5%B0%8F%E9%9D%A2.jpeg" alt="9.18重庆小面"/></p><p>19号早上一早去宜家退货了，然后坐公交去王子街想办公交卡，但是瞬间瓢泼大雨，所以先找了个麦当劳吃中饭。巨无霸评价很一般，一点都不香啊</p><p><img src="https://img.chiran.top/9.19%E5%8D%88%E9%A4%90%E9%BA%A6%E5%BD%93%E5%8A%B3.jpeg" alt="9.19午餐麦当劳"/></p><p>然后和大学朋友去爬了帕尔顿山，逛了会街后去他家蹭饭了，赞！
<img src="https://img.chiran.top/9.19%E6%99%9A%E9%A4%90rqw.jpeg" alt="9.19晚餐rqw"/></p><p>20日早上自己烧了个粥，配了两个煎蛋。挺好吃的，就是这个粥煮的有点厚
<img src="https://img.chiran.top/9.20%E6%97%A9%E9%A4%90.JPG" alt="9.20早餐"/></p><p>中午吃的剩粥剩饭，配上Lidl买的鲭鱼罐头，味道还行
<img src="https://img.chiran.top/9.20%E4%B8%AD%E9%A5%AD.jpeg" alt="9.20中饭"/></p><p>晚饭邀请了昨天蹭饭的朋友来我家吃，我觉得我烧的真不错吧
<img src="https://img.chiran.top/9.20%E6%99%9A%E9%A4%90%E4%B8%89%E4%B8%AA%E4%BA%BA.jpeg" alt="9.20晚餐三个人"/></p><p>21号中午吃了什么不记得了，下午发现有点饿自己炸了点薯条，呃，下次还是买冷冻的吧
<img src="https://img.chiran.top/9.21%E4%B8%8B%E5%8D%88%E8%96%AF%E6%9D%A1.jpeg" alt="9.21下午薯条"/></p><p>晚上点了第一个外卖，因为外卖券快过期了，这个辣子鸡有点回潮，但是味道还是不错的
<img src="https://img.chiran.top/9.21%E6%99%9A%E9%A4%90%E8%BE%A3%E5%AD%90%E9%B8%A1.jpeg" alt="9.21晚餐辣子鸡"/></p>
<p>9月的另一半我会放在另一期里！</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/4#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/4</link><guid isPermaLink="true">https://blog.chiran.top/notes/4</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Thu, 01 Oct 2026 10:05:07 GMT</pubDate></item><item><title><![CDATA[记录 2026 年第 273 天]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/3">https://blog.chiran.top/notes/3</a></blockquote><div><p>今天是9月30日，9月的最后一天。我来到爱丁堡已经19天了，开始渐渐习惯这里的生活，并开始结交一些新的朋友。</p><p>其实中秋节那天（也就是我来到英国的第14天）我就想写一篇伤感小作文。在那之前我真的很不习惯这边的生活，尤其是晚上。太阳渐渐落下，喧闹归于平静，而我一个人做着饭，一个人吃着饭，一个人呆在异国他乡。</p><p>当国内的朋友都已睡去，难过的情绪渐上心头，这样的夜晚我不知经历了多少个。但是就在中秋节那天晚上，我的情绪发生了很大的改变。</p><p>渐渐地，我好像不那么抗拒这里的生活。虽然我仍很想念苏州，但也开始适应爱丁堡了。</p><p>爱丁堡的天是阴晴不定的，可能上一秒还是艳阳高照，下一秒就瓢泼大雨。但我并不抗拒这样的天气，尤其是有太阳的时候，蔚蓝的天空配上中世纪风格的建筑，别有一番独特的风味。我讨厌的是阴天，就是那种一天到晚一点太阳都没有的日子。至少现在夏令时的爱丁堡我还是能接受的，不知道真正进入冬季后，会不会真的几乎都是阴天。</p><p>这篇手记就到这里为止吧，今天还要去超市再买点东西。</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/3#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/3</link><guid isPermaLink="true">https://blog.chiran.top/notes/3</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Wed, 30 Sep 2026 14:18:33 GMT</pubDate></item><item><title><![CDATA[再见，苏州👋]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/2">https://blog.chiran.top/notes/2</a></blockquote><div><p>现在是9月10日，星期四，晚上十点，我躺在床上写下了这篇日记。</p><p>四个小时后，我将要动身前往浦东机场，坐上前往爱丁堡的飞机。</p><p>这好像是我第一次离开家乡上学。我时常觉得自己是不是被保护的太好，从来没走出苏州这个弹丸之地。但我已经习惯了，习惯了这个城市的一切，习惯了家中总有一盏灯为我点亮。</p><p>但这次，我真的要走了，我将飞跃8个时区，抵达英国这个熟悉而陌生的国家。</p><p>我对英国的记忆早已不是那么清晰，只记得那时当时与初中同学一起前往的为时两周的夏令营。我们上课，我们逛街，说不上开心，但也并不难过。</p><p>有时真的很怀念西浦的生活，有那么多朋友，我们可以一起学习，一起玩乐。大一刚进来的时候什么都不懂，觉得四年很长，但是现在回望又觉得是弹指一瞬。也许人就是喜欢回忆的生物吧，当时的我也迷茫过，担心过，但后面的快乐与幸福早就超过了这些负面情绪，成为本科四年的主旋律。</p><p>我真的很害怕做决定，所以我逃避，直到决定的最终期限。我总是怀疑自己是否做了错误的决定，而如今，我决定着手于当下。我将离开这个从幼儿园到本科从未失陪的苏州，前往更大的世界。</p><p>再见，苏州。</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/2#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/2</link><guid isPermaLink="true">https://blog.chiran.top/notes/2</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Thu, 10 Sep 2026 14:19:30 GMT</pubDate></item><item><title><![CDATA[晚安，东野圭吾🕯️]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/notes/1">https://blog.chiran.top/notes/1</a></blockquote><div><p>第一次读您的书还是初中，我和您的初遇，并非从脍炙人口的《解忧杂货店》开始。</p><p>不知从何时起，我深深陷入了您编织的世界中。从最初空闲时翻读，渐渐到上课也偷握着老年机，一头扎进那些悬念迭起的故事里。您陪着我走过了一天又一天。</p><p>可现在，您突然离去，却让书里那些鲜活的人，都永远停在了时光里：</p><ul><li>加贺恭一郎的脚步停在了日本桥</li><li>汤川学的粉笔落下最后一道公式</li><li>雪穗消失在白夜的尽头</li><li>石神再也不会出现在便当店门口</li><li>浪矢杂货店的卷帘门，再也不会升起</li><li>假面饭店的灯火，终是熄灭</li></ul><p>您写下的所有明暗与温柔</p>
<p>都成了我们读过的痕迹</p><p><strong>您终究为自己写就了不在场证明</strong></p><p>愿天堂有滑雪，有热爱的一切</p>
<p>我们在书里，等您</p></div><p style="text-align:right"><a href="https://blog.chiran.top/notes/1#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/notes/1</link><guid isPermaLink="true">https://blog.chiran.top/notes/1</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Mon, 27 Jul 2026 16:00:58 GMT</pubDate></item><item><title><![CDATA[中国移动宽带 DNS 劫持与 Windows msftconnecttest 自动跳转：原理、排查与解决方法]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/posts/生活日常/DNS">https://blog.chiran.top/posts/生活日常/DNS</a></blockquote><div><p>近日，国内西南地区以及江苏等地陆续有中国移动宽带用户遇到相似问题：</p><ul><li>电脑实际上可以访问互联网；</li><li>Windows 却提示“需要操作，没有 Internet”；</li><li>随后默认浏览器自动打开：</li></ul><pre class="language-text lang-text"><code class="language-text lang-text">http://www.msftconnecttest.com/redirect
</code></pre>
<ul><li>部分用户最终被重定向到陌生的博彩网站。</li></ul><p>这些现象组合在一起，指向了 Windows 网络连接状态检测与异常 DNS 解析之间的一次连锁反应。攻击者并不需要修改 Windows 注册表，也不需要直接控制浏览器；只要干预 Windows 联网检测域名的解析，就可能借助系统默认开启的主动探测功能触发恶意网页。</p><blockquote><p>本文根据用户侧现象和 Windows 官方公开的 NCSI 工作机制进行分析。截至发文时，如果运营商或有关机构尚未发布完整调查报告，具体影响范围、劫持位置和责任主体仍应以正式调查结果为准。</p></blockquote>
<h2 id="">先说结论</h2><p>遇到此问题时，建议按以下顺序处理：</p><ol start="1"><li>不要在自动打开的陌生页面中输入账号、密码、银行卡或验证码，也不要下载任何所谓的“网络修复工具”；</li><li>同时检查并修改 <strong>IPv4 DNS 和 IPv6 DNS</strong>，不能只修改 <code>114.114.114.114</code> 或 <code>8.8.8.8</code> 这样的 IPv4 地址；</li><li>尽可能启用 Windows 系统级或路由器级 <strong>DNS over HTTPS（DoH）</strong>，避免明文 DNS 被透明拦截；</li><li>清空 DNS 缓存，重新连接网络，并验证微软探测域名的解析和 HTTP 返回内容；</li><li>检查路由器、光猫、代理和 Hosts 文件；</li><li>只有在暂时无法处理底层问题时，才考虑禁用 <code>EnableActiveProbing</code> 阻止自动探测和弹窗。</li></ol><p>修改 <code>EnableActiveProbing</code> 只能关闭触发自动打开网页的功能，<strong>不能修复 DNS 劫持本身</strong>。</p><h2 id="windows--internet">Windows 为什么会提示“需要操作，没有 Internet”</h2><p>Windows 10 和 Windows 11 使用 <strong>NCSI</strong>（Network Connectivity Status Indicator，网络连接状态指示器）判断当前网络是否真正具备 Internet 访问能力。</p><p>当网卡连接、断开，网络配置、代理或路由状态发生变化时，NCSI 会进行主动探测。对于较新的 Windows，过程主要包括：</p><ol start="1"><li>解析 <code>www.msftconnecttest.com</code>；</li><li>通过明文 HTTP 请求访问：</li></ol><pre class="language-text lang-text"><code class="language-text lang-text">http://www.msftconnecttest.com/connecttest.txt
</code></pre>
<ol start="3"><li>检查 HTTP 状态和正文，正常响应应为：</li></ol><pre class="language-text lang-text"><code class="language-text lang-text">HTTP/1.1 200 OK

Microsoft Connect Test
</code></pre>
<ol start="4"><li>NCSI 还会查询 <code>dns.msftncsi.com</code>，并检查其 DNS 响应是否符合预期；</li><li>Windows 会结合主动探测和被动网络状态判断当前连接是“Internet”“仅本地网络”还是“可能需要认证”。</li></ol><p>微软文档说明，Windows 会分别进行 IPv4 和 IPv6 主动探测。如果探测未完成、超时、返回错误状态，或者收到的正文不是预期的 <code>Microsoft Connect Test</code>，Windows 就可能显示“无 Internet”或“需要操作”。</p><p>这并不一定意味着所有网络流量都已中断。它只表示 Windows 用于判断联网状态的特定探测没有通过，所以有时会出现“网页能打开，但系统仍说没有 Internet”的情况。</p><h2 id="windows--redirect">Windows 为什么会自动打开 <code>/redirect</code></h2><p>酒店、机场和校园网经常使用需要登录的认证页面，也就是 Captive Portal。为了帮助用户完成认证，当 NCSI 怀疑当前网络需要额外操作时，Windows 可能打开：</p><pre class="language-text lang-text"><code class="language-text lang-text">http://www.msftconnecttest.com/redirect
</code></pre>
<p>在正常网络中，这个地址后续可能跳转到微软的 MSN 门户，例如：</p><pre class="language-text lang-text"><code class="language-text lang-text">https://www.msn.cn/zh-cn
</code></pre>
<p>这是 Windows 和微软服务设计的正常行为。微软还会利用 MSN 页面是否成功加载，辅助判断电脑能否访问互联网。</p><p>因此必须区分两种情况：</p><table><thead><tr><th> 最终结果 </th><th> 含义 </th></tr></thead><tbody><tr><td> 跳转到 <code>msn.cn</code> 等微软页面 </td><td> 通常是 NCSI 的正常后续流程 </td></tr><tr><td> 跳转到博彩、仿冒登录、软件下载等陌生页面 </td><td> 重定向链路已遭到异常干预 </td></tr></tbody></table><p>也就是说，<strong>自动打开 <code>/redirect</code> 本身不是攻击证据，最终被导向非微软恶意网站才是关键异常。</strong></p><h2 id="dns-">DNS 劫持如何利用这套机制</h2><p>问题的关键在于，NCSI 的 Web 探测和 <code>/redirect</code> 入口都使用明文 HTTP。</p><p>如果攻击者让 <code>www.msftconnecttest.com</code> 或 IPv6 探测域名解析到错误地址，就可能控制后续响应：</p><pre class="language-text lang-text"><code class="language-text lang-text">Windows 检测到网络变化
        ↓
查询 msftconnecttest 域名
        ↓
DNS 返回攻击者指定的地址
        ↓
connecttest.txt 返回错误内容、重定向或空响应
        ↓
NCSI 认为网络需要操作
        ↓
Windows 打开 /redirect
        ↓
同一域名再次被解析到攻击者服务器
        ↓
攻击者返回 302，将浏览器导向博彩网站
</code></pre>
<p>攻击者不需要“开启”受害者电脑中的 <code>EnableActiveProbing</code>。这个选项在正常 Windows 中默认就是开启的，攻击者只是利用了系统原本会执行的联网检测流程。</p><p>严格来说，异常可能发生在多个位置：</p><ul><li>运营商递归 DNS 返回了错误结果；</li><li>路由器或光猫使用了异常的上游 DNS；</li><li>明文 UDP/TCP 53 查询被透明拦截；</li><li>路由器 DNS 缓存被污染；</li><li>终端的 Hosts、代理或恶意软件篡改了访问目标；</li><li>DNS 正常，但后续明文 HTTP 请求在传输链路上被劫持。</li></ul><p>如果要严格区分“DNS 劫持”和“HTTP 劫持”，需要保存事发时的 DNS 响应、HTTP 响应头或网络抓包。仅凭事后页面截图通常无法确定劫持发生在哪一跳。</p><h2 id="-windows-">为什么其他设备没有提示，只有 Windows 会</h2><p>不同操作系统使用不同的联网检测域名、返回内容和交互方式：</p><ul><li>Windows 使用 <code>msftconnecttest.com</code> 和 NCSI；</li><li>Android、iOS、macOS 等系统使用各自的探测地址；</li><li>有的系统只显示 Wi-Fi 认证提示；</li><li>有的系统不会主动打开完整浏览器；</li><li>同一网络中的设备还可能使用不同的 IPv4/IPv6 DNS、缓存、VPN 或加密 DNS。</li></ul><p>因此，攻击者如果只干预微软的探测域名，Windows 会最先出现明显症状，其他设备仍可能看起来正常。这并不代表其他设备的 DNS 一定安全，只是它们没有触发同样的系统行为。</p><h2 id="-114--8888">为什么已经设置 114 和 8.8.8.8，仍可能受到影响</h2><p>很多用户只在网卡中修改了 IPv4 DNS，例如：</p><pre class="language-text lang-text"><code class="language-text lang-text">114.114.114.114
8.8.8.8
</code></pre>
<p>但 Windows 的 IPv4 和 IPv6 DNS 是两套独立配置。即使 IPv4 DNS 已经手动指定，IPv6 DNS 仍可能由路由器自动下发。</p><p>可以使用以下命令查看：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Get-DnsClientServerAddress |
  Format-Table InterfaceAlias, AddressFamily, ServerAddresses -AutoSize
</code></pre>
<p>其中：</p><ul><li><code>AddressFamily 2</code> 表示 IPv4；</li><li><code>AddressFamily 23</code> 表示 IPv6。</li></ul><p>如果看到类似：</p><pre class="language-text lang-text"><code class="language-text lang-text">以太网  IPv4  {114.114.114.114, 8.8.8.8}
以太网  IPv6  {fe80::xxxx:xxxx:xxxx:xxxx}
</code></pre>
<p>说明 IPv6 DNS 仍然指向路由器。<code>fe80::/10</code> 是链路本地地址，电脑会把 DNS 查询交给局域网中的路由器，再由路由器转发到光猫或运营商上游。</p><h3 id="ipv6-">IPv6 桥接模式的影响</h3><p>如果路由器启用了 IPv6 桥接、透传或 Passthrough 模式，它可能把光猫或运营商下发的 IPv6 前缀、默认路由和 DNS 信息继续传递给局域网设备。</p><p>此时的链路可能是：</p><pre class="language-text lang-text"><code class="language-text lang-text">Windows
  ↓
路由器的 fe80:: 链路本地 DNS
  ↓
光猫或运营商下发的上游 DNS
</code></pre>
<p>因此，仅修改 IPv4 DNS 不能覆盖这条 IPv6 解析链路。</p><p>还要注意：“IPv6 DNS”指 DNS 服务器通过 IPv6 地址提供服务，它既可以回答 <code>AAAA</code> 记录，也可以回答 IPv4 使用的 <code>A</code> 记录。问题并不局限于 IPv6 网站。</p><h2 id="-dns-">普通公共 DNS 为什么仍不能完全防止劫持</h2><p>手动填写公共 DNS 可以绕开部分运营商递归 DNS 故障，但传统 DNS 通常仍通过明文 UDP/TCP 53 端口传输。</p><p>这意味着，网络中的中间设备理论上仍然可以：</p><ul><li>拦截发往 <code>8.8.8.8</code> 或其他 DNS 的请求；</li><li>伪造一个更快到达的响应；</li><li>阻断指定 DNS，迫使系统改用其他服务器；</li><li>对特定域名返回错误地址。</li></ul><p>因此，“设置了公共 DNS”不等于“DNS 查询已经加密并验证了服务器身份”。要减少透明劫持，应进一步使用 DoH 或 DoT。</p><h2 id="doh-">DoH 能否避免这种问题</h2><p><strong>如果攻击仅发生在 DNS 查询阶段，系统级 DoH 通常可以有效避免。</strong></p><p>DoH 使用 HTTPS 传输 DNS 查询，中间设备不容易直接看到和篡改具体查询内容，并且客户端会验证 DoH 服务器的 TLS 证书。</p><p>但需要注意：</p><ol start="1"><li>只在浏览器中开启 DoH，不一定覆盖 Windows NCSI。NCSI 使用 Windows 系统 DNS 客户端，而不是浏览器自己的解析器；</li><li>应使用 Windows 系统级 DoH，或者在路由器上为整个局域网部署 DoH；</li><li>如果设置允许“加密优先、失败时回退明文”，DoH 被阻断后仍可能回到普通 DNS；</li><li>DoH 只能保护 DNS 查询，无法修复 Hosts、恶意代理、被入侵的路由器或后续 HTTP 链路劫持；</li><li>如果域名被正确解析，但明文 HTTP 流量仍被中间设备篡改，DoH 也不能单独解决问题。</li></ol><p>因此更完整的防护是：</p><pre class="language-text lang-text"><code class="language-text lang-text">可信 DNS + 系统级 DoH + 正确的 IPv4/IPv6 配置 + 路由器安全检查
</code></pre>
<h2 id="-ipv4--ipv6-dns">解决方法一：同时设置 IPv4 和 IPv6 DNS</h2><p>以下为常见公共 DNS：</p><table><thead><tr><th> 服务 </th><th> IPv4 首选 </th><th> IPv4 备用 </th><th> IPv6 首选 </th><th> IPv6 备用 </th></tr></thead><tbody><tr><td> 阿里公共 DNS </td><td> <code>223.5.5.5</code> </td><td> <code>223.6.6.6</code> </td><td> <code>2400:3200::1</code> </td><td> <code>2400:3200:baba::1</code> </td></tr><tr><td> Google Public DNS </td><td> <code>8.8.8.8</code> </td><td> <code>8.8.4.4</code> </td><td> <code>2001:4860:4860::8888</code> </td><td> <code>2001:4860:4860::8844</code> </td></tr><tr><td> 114DNS </td><td> <code>114.114.114.114</code> </td><td> <code>114.114.115.115</code> </td><td> — </td><td> — </td></tr></tbody></table><p>中国大陆不同地区对各公共 DNS 的可达性和延迟可能不同。可以优先选择连接稳定且支持加密 DNS 的服务。</p><h3 id="windows-11-">Windows 11 图形界面</h3><ol start="1"><li>打开“设置”；</li><li>进入“网络和 Internet”；</li><li>打开当前使用的“以太网”或“Wi-Fi”；</li><li>找到“DNS 服务器分配”，点击“编辑”；</li><li>将“自动（DHCP）”改为“手动”；</li><li>同时打开 IPv4 和 IPv6；</li><li>填入首选与备用 DNS；</li><li>如果系统提供“DNS over HTTPS”选项，将其开启；</li><li>保存并重新连接网络。</li></ol><p>如果使用阿里公共 DNS，DoH 地址为：</p><pre class="language-text lang-text"><code class="language-text lang-text">https://dns.alidns.com/dns-query
</code></pre>
<h3 id="">使用命令设置</h3><p>以网卡名“以太网”和阿里公共 DNS 为例，以管理员身份打开 PowerShell：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">netsh interface ipv4 set dnsservers name=&quot;以太网&quot; static 223.5.5.5 primary validate=no
netsh interface ipv4 add dnsservers name=&quot;以太网&quot; address=223.6.6.6 index=2 validate=no

netsh interface ipv6 set dnsservers name=&quot;以太网&quot; static 2400:3200::1 primary validate=no
netsh interface ipv6 add dnsservers name=&quot;以太网&quot; address=2400:3200:baba::1 index=2 validate=no
</code></pre>
<p>然后清空 DNS 缓存：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">ipconfig /flushdns
</code></pre>
<p>再次检查：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Get-DnsClientServerAddress -InterfaceAlias &quot;以太网&quot;
</code></pre>
<p>如果 IPv6 DNS 仍显示路由器的 <code>fe80::...</code>，说明设置没有应用到当前网卡，或者路由器、组策略、VPN 等正在重新接管 DNS。</p><h2 id="-ipv6-dns--doh">解决方法二：在路由器中配置 IPv6 DNS 或 DoH</h2><p>如果家中多台设备都使用同一条宽带，在路由器中统一配置更方便。</p><p>进入路由器管理页面，检查：</p><ul><li>WAN 和 LAN 使用的 IPv4 DNS；</li><li>IPv6 DNS 是否为“自动获取”；</li><li>IPv6 是否处于桥接、透传或 Passthrough 模式；</li><li>是否支持自定义 IPv6 DNS；</li><li>是否支持 DoH、DoT 或加密 DNS；</li><li>是否存在陌生的静态 DNS、端口转发或远程管理配置。</li></ul><p>如果桥接模式强制继承光猫或运营商 DNS，可以选择：</p><ul><li>在每台终端上手动设置 IPv6 DNS 和系统级 DoH；</li><li>在支持的情况下，让路由器负责获取 IPv6 前缀并指定 DNS；</li><li>在路由器上部署加密 DNS 转发。</li></ul><p>不要在不了解拨号和前缀下发方式时直接修改光猫工作模式，否则可能造成 IPv4 或 IPv6 断网。</p><h2 id="-dns--ncsi-">解决方法三：验证 DNS 和 NCSI 是否恢复</h2><h3 id="-dns">检查系统 DNS</h3><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Get-DnsClientServerAddress
</code></pre>
<h3 id="-ipv4--ipv6-">分别查询 IPv4 和 IPv6 探测域名</h3><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Resolve-DnsName www.msftconnecttest.com -Type A
Resolve-DnsName ipv6.msftconnecttest.com -Type AAAA
Resolve-DnsName dns.msftncsi.com
</code></pre>
<p>不要依赖固定的 <code>msftconnecttest.com</code> IP 判断是否正常，因为微软探测服务由 CDN 承载，合法地址可能随地区和时间变化。更可靠的方法是：</p><ul><li>与可信 DoH 的结果进行比较；</li><li>检查 CNAME 是否指向微软使用的正常 CDN；</li><li>检查 HTTP 返回内容和重定向目标；</li><li>保存异常发生时的原始响应。</li></ul><h3 id="">检查探测文件</h3><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">curl.exe -4 --noproxy &quot;*&quot; -v --max-redirs 0 http://www.msftconnecttest.com/connecttest.txt
curl.exe -6 --noproxy &quot;*&quot; -v --max-redirs 0 http://ipv6.msftconnecttest.com/connecttest.txt
</code></pre>
<p>正常结果应包含：</p><pre class="language-text lang-text"><code class="language-text lang-text">HTTP/1.1 200 OK
Microsoft Connect Test
</code></pre>
<p>如果当前网络本身没有公网 IPv6，第二条命令失败并不一定代表劫持。</p><h3 id="-redirect">检查 <code>/redirect</code>，但不要自动跟随</h3><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">curl.exe -4 -sS -D - -o NUL --max-redirs 0 http://www.msftconnecttest.com/redirect
</code></pre>
<p>查看响应头中的：</p><pre class="language-text lang-text"><code class="language-text lang-text">Location: ...
</code></pre>
<p>如果目标是微软或 MSN 页面，通常属于正常行为；如果目标是博彩、仿冒登录或陌生下载站，应立即保存响应头和时间，不要在浏览器中继续访问。</p><h2 id="-dns--redirect-msn">为什么更换 DNS 后仍会访问 <code>/redirect</code>，但只跳到 MSN</h2><p>更换 DNS 只是恢复正确解析，不会关闭 Windows 的 NCSI 功能。</p><p>如果 Windows 已经因为前一次探测失败进入“需要操作”状态，或者在网络重新连接后再次评估连接，它仍可能打开：</p><pre class="language-text lang-text"><code class="language-text lang-text">http://www.msftconnecttest.com/redirect
</code></pre>
<p>区别在于：</p><ul><li>DNS 被劫持时，请求可能到达攻击者服务器并跳转到博彩网站；</li><li>DNS 恢复后，请求到达微软服务器并正常跳转到 MSN。</li></ul><p>因此，更换 DNS 后看到 MSN 通常说明恶意跳转已经停止，而不是 DNS 修改没有生效。</p><h2 id="-hosts-">是否需要检查 Hosts 文件</h2><p>需要，但它不是运营商级事件中最优先的嫌疑对象。</p><p>Windows 在向 DNS 服务器查询前会检查本地 Hosts 文件。如果其中存在相关映射，即使修改 DNS 也不会生效。</p><p>Hosts 文件路径：</p><pre class="language-text lang-text"><code class="language-text lang-text">C:\Windows\System32\drivers\etc\hosts
</code></pre>
<p>可以使用 PowerShell 检查：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Select-String `
  -Path &quot;$env:SystemRoot\System32\drivers\etc\hosts&quot; `
  -Pattern &quot;msftconnecttest|msftncsi&quot;
</code></pre>
<p>正常情况下不应存在这些域名的自定义映射。</p><p>如果同一宽带下多台设备同时异常，而切换到手机流量后恢复，问题更可能位于路由器、光猫或运营商链路；如果只有一台设备异常，则应优先检查 Hosts、代理、虚拟网卡、恶意软件和浏览器扩展。</p><p>还可以检查 WinHTTP 代理：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">netsh winhttp show proxy
</code></pre>
<h2 id="-enableactiveprobing">临时措施：禁用 EnableActiveProbing</h2><p>如果暂时无法解决底层 DNS 问题，又希望立即阻止 Windows 自动触发探测和网页，可以禁用 NCSI 主动探测。</p><p>注册表路径：</p><pre class="language-text lang-text"><code class="language-text lang-text">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet
</code></pre>
<p>将：</p><pre class="language-text lang-text"><code class="language-text lang-text">EnableActiveProbing
</code></pre>
<p>设置为：</p><pre class="language-text lang-text"><code class="language-text lang-text">0
</code></pre>
<p>也可以使用管理员 PowerShell：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Set-ItemProperty `
  -Path &quot;HKLM:\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet&quot; `
  -Name EnableActiveProbing `
  -Type DWord `
  -Value 0
</code></pre>
<p>恢复时设置为 <code>1</code>：</p><pre class="language-powershell lang-powershell"><code class="language-powershell lang-powershell">Set-ItemProperty `
  -Path &quot;HKLM:\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet&quot; `
  -Name EnableActiveProbing `
  -Type DWord `
  -Value 1
</code></pre><blockquote>
<p>修改注册表前建议备份。微软不建议把关闭 NCSI 主动探测当作长期修复方案，因为 Windows Update、Outlook 和其他应用可能依赖 NCSI 的联网状态判断。</p></blockquote>
<p>禁用后的效果是：</p><pre class="language-text lang-text"><code class="language-text lang-text">不再主动探测
  ↓
不再因为探测失败触发 /redirect
  ↓
自动弹窗消失
</code></pre>
<p>但底层问题可能仍然存在：</p><pre class="language-text lang-text"><code class="language-text lang-text">DNS 或 HTTP 链路仍不可信
  ↓
只是 Windows 不再通过 NCSI 暴露这个问题
</code></pre>
<p>所以这是一种<strong>临时止损措施</strong>，不是根治方案。</p><h2 id="">建议保留哪些证据</h2><p>如果再次遇到问题，建议在关闭页面前记录：</p><ul><li>发生时间和所在地区；</li><li>宽带运营商；</li><li>当前 IPv4 和 IPv6 DNS；</li><li><code>Resolve-DnsName</code> 的完整返回；</li><li><code>/redirect</code> 的 HTTP 状态和 <code>Location</code>；</li><li>恶意页面完整地址和截图；</li><li>同一网络下其他设备是否异常；</li><li>切换到手机流量后是否恢复。</li></ul><p>如果条件允许，可以使用 Wireshark 抓取：</p><pre class="language-text lang-text"><code class="language-text lang-text">dns || http
</code></pre>
<p>对于 IPv6 路由器通告，可使用：</p><pre class="language-text lang-text"><code class="language-text lang-text">icmpv6.type == 134
</code></pre>
<p>重点查看 Router Advertisement 中的 RDNSS 信息，它可以显示局域网设备从哪里获得 IPv6 DNS。</p><p>这些证据比事后单独的一张网页截图更有助于判断问题发生在终端、路由器、光猫还是运营商网络。</p><h2 id="">总结</h2><p>这次事件的核心不是“Windows 自己打开了博彩网站”，而是：</p><ol start="1"><li>Windows 使用 NCSI 主动检测互联网连接；</li><li>NCSI 会访问明文 HTTP 探测地址；</li><li>DNS 劫持让探测请求到达了错误服务器；</li><li>错误响应使 Windows 判断网络“需要操作”；</li><li>Windows 随后打开 <code>/redirect</code>；</li><li>被劫持的解析再次把浏览器导向恶意网站。</li></ol><p>解决问题时，应当分清三个层次：</p><ol start="1"><li><strong>同时修改 IPv4 和 IPv6 DNS，并启用系统级或路由器级 DoH，这是处理 DNS 劫持的核心；</strong></li><li><strong>检查路由器、光猫、Hosts 和代理，是排除本地篡改的必要步骤；</strong></li><li><strong>禁用 <code>EnableActiveProbing</code> 只能阻止系统自动探测和弹窗，不能修复底层劫持。</strong></li></ol><p>最后再次提醒：不要在陌生跳转页面输入任何信息，也不要下载页面推荐的软件。发现异常时，应优先断开页面、保存证据、修改 DNS，并向宽带运营商反馈。</p><h2 id="">参考资料</h2><ul><li><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/internet-explorer-edge-open-connect-corporate-public-network">Microsoft Learn：NCSI 主动探测、自动登录页与 MSN Portal</a></li><li><a href="https://learn.microsoft.com/en-us/windows-server/networking/ncsi/ncsi-overview">Microsoft Learn：Network Connectivity Status Indicator 概述</a></li><li><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/troubleshoot-ncsi-guidance">Microsoft Learn：NCSI 故障排查指南</a></li><li><a href="https://learn.microsoft.com/en-us/windows-server/networking/dns/doh-client-support">Microsoft Learn：Windows DNS over HTTPS 客户端支持</a></li><li><a href="https://learn.microsoft.com/en-us/windows-server/networking/dns/queries-lookups">Microsoft Learn：Windows DNS 查询与 Hosts 解析顺序</a></li><li><a href="https://alidns.com/">阿里公共 DNS</a></li><li><a href="https://developers.google.com/speed/public-dns">Google Public DNS</a></li></ul></div><p style="text-align:right"><a href="https://blog.chiran.top/posts/生活日常/DNS#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/posts/生活日常/DNS</link><guid isPermaLink="true">https://blog.chiran.top/posts/生活日常/DNS</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Sat, 25 Jul 2026 16:23:20 GMT</pubDate></item><item><title><![CDATA[MEC302]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://blog.chiran.top/posts/大学生涯/mec302">https://blog.chiran.top/posts/大学生涯/mec302</a></blockquote><div><h2 id="0-">0. 期末复习范围总览</h2><p>Revision 课件明确说：<strong>Lectures 1–11 all relevant</strong>。也就是说，前面所有课件都可能考。<br/>但从 L12 给的 sample questions 来看，重点大概集中在这些类型：</p><table><thead><tr><th>Lecture</th><th>主题</th><th>常见考法</th></tr></thead><tbody><tr><td>L1</td><td>Embedded Systems / CPS</td><td>定义、结构、例子</td></tr><tr><td>L2</td><td>Continuous Dynamics</td><td>建模、微分方程、线性化、系统性质</td></tr><tr><td>L3</td><td>Discrete Dynamics</td><td>FSM、Mealy/Moore machine、状态图</td></tr><tr><td>L4</td><td>Sensors &amp; Actuators</td><td>选传感器、ADC/DAC、sensor metrics</td></tr><tr><td>L5</td><td>Embedded Processors</td><td>CPU、memory、bus、address calculation</td></tr><tr><td>L6</td><td>Memory Architecture</td><td>volatile/non-volatile、memory hierarchy</td></tr><tr><td>L7</td><td>Multitasking &amp; Scheduling</td><td>threads/processes、scheduler、preemptive/non-preemptive</td></tr><tr><td>L8</td><td>LTL / Model Checking</td><td>temporal operators、formal specification</td></tr><tr><td>L9</td><td>Interfacing</td><td>power、clock、reset、boot、interrupt/polling</td></tr><tr><td>L10</td><td>Serial Communication</td><td>serial/parallel、bit/baud、simplex/duplex、differential link</td></tr><tr><td>L11</td><td>Evaluation</td><td>evaluation/validation、multi-objective optimization、WCET、dependability</td></tr></tbody></table><hr/><h1 id="1-l1-embedded-systems--cyber-physical-systems">1. L1 Embedded Systems / Cyber-Physical Systems</h1><h2 id="11-embedded-system-">1.1 Embedded System 是什么？</h2><p><strong>Embedded system</strong> 是嵌入到更大产品或系统中的计算机系统，通常用于完成某个特定功能，而不是像 PC 一样作为通用计算机使用。</p><p>可以这样写：</p><blockquote><p>An embedded system is a computer system integrated into a larger device or product to perform dedicated functions. It usually consists of hardware, software, sensors, actuators, memory, and communication interfaces.</p></blockquote>
<p>关键词：</p><ul><li>dedicated function</li><li>integrated into larger system</li><li>hardware + software</li><li>real-time / resource-constrained</li><li>interacts with physical environment</li></ul><p>例子：</p><ul><li>washing machine controller</li><li>car engine control unit</li><li>drone flight controller</li><li>smart watch</li><li>robot controller</li><li>medical device</li></ul><hr/><h2 id="12-cyber-physical-system-cps">1.2 Cyber-Physical System, CPS</h2><p>CPS 是计算和物理过程紧密结合的系统。</p><p>可以这样写：</p><blockquote><p>A cyber-physical system integrates computation, communication, and physical processes. Sensors measure the physical world, the embedded computer processes the data, and actuators affect the physical system.</p></blockquote>
<p>典型结构：</p><pre class="language-text lang-text"><code class="language-text lang-text">Physical world
   ↓ sensors
Embedded computer / controller
   ↓ actuators
Physical world changes
</code></pre>
<p>例子：</p><ul><li>self-driving car</li><li>quadrotor drone</li><li>robot arm</li><li>smart grid</li><li>industrial automation system</li></ul><hr/><h2 id="13-embedded-system-">1.3 Embedded System 的核心组成</h2><p>一般包括：</p><pre class="language-text lang-text"><code class="language-text lang-text">CPU / processor
Memory
I/O interface
Sensors
Actuators
Power source
Clock
Communication interface
Software / firmware
</code></pre>
<p>考试如果问 “structure of embedded computer system”，可以画：</p><pre class="language-text lang-text"><code class="language-text lang-text">        Sensors
           ↓
Input interface / ADC
           ↓
CPU / Microcontroller ↔ Memory
           ↓
Output interface / DAC / PWM
           ↓
        Actuators
</code></pre>
<hr/><h1 id="2-l2-continuous-dynamics">2. L2 Continuous Dynamics</h1><p>Revision 课件特别强调：</p><blockquote><p>Many embedded systems are also dynamic physical systems.</p></blockquote>
<p>也就是说，机器人、无人机、车辆、机械系统不只是计算机系统，还是有物理动态行为的系统。</p><hr/><h2 id="21-continuous-dynamics-">2.1 Continuous Dynamics 是什么？</h2><p>Continuous dynamics 用微分方程描述系统随时间连续变化的行为。</p><p>核心公式：</p><p>$\dot{x}(t)=f(x(t),u,t)$
其中：</p><ul><li>(x(t))：state，系统状态</li><li>($\dot{x}(t)$)：state derivative，状态变化率</li><li>(u)：input/control input</li><li>(t)：time</li></ul><p>可以这样写：</p><blockquote><p>Continuous dynamics describes the evolution of a physical system over continuous time using differential or integral equations. It is suitable for mechanical systems, electrical circuits, chemical processes, biological systems, etc.</p></blockquote>
<hr/><h2 id="22-dynamic-model-">2.2 Dynamic Model 的常见来源</h2><p>主要是物理定律，例如：</p><ul><li>Newton’s second law:</li></ul><p>$F = ma = m\ddot{x}$</p><ul><li>rotational dynamics:</li></ul><p>$\tau = I\alpha$</p><ul><li>electrical circuits:</li></ul><p>$V = IR$</p><p>如果题目让你 derive dynamics，一般步骤是：</p><ol start="1"><li>Draw free-body diagram.</li><li>Define coordinates and positive directions.</li><li>List all forces/torques.</li><li>Apply Newton’s law.</li><li>Rearrange into differential equations.</li><li>Define state variables if needed.</li></ol><hr/><h2 id="23-model-properties">2.3 系统性质：Model Properties</h2><p>Revision 课件说，为了设计有效控制，系统最好满足：</p><blockquote><p>Causal, Not Memoryless, Linear, Time Invariant and Stable</p></blockquote>
<p>这几个必须会解释。</p><h3 id="1-causality">1. Causality</h3><p><strong>Causal system</strong>：输出只依赖当前和过去输入，不依赖未来输入。</p><p>可以写：</p><blockquote><p>A system is causal if its output at the current time depends only on current and past inputs, not future inputs.</p></blockquote>
<p>例如真实物理系统一般都是 causal，因为未来还没发生。</p><hr/><h3 id="2-memory--memoryless">2. Memory / Memoryless</h3><p><strong>Memoryless system</strong>：输出只依赖当前输入。</p><p>例如：</p><p>$y(t)=2x(t)$</p><p>是 memoryless。</p><p><strong>Not memoryless system</strong>：输出依赖过去状态或过去输入。</p><p>例如：</p><p>$\dot{x}(t)=f(x(t),u(t))$</p><p>这类动态系统通常不是 memoryless，因为当前状态包含过去信息。</p><p>可以写：</p><blockquote><p>A dynamic physical system is usually not memoryless because its current output depends on the current state, and the state is a summary of past behavior.</p></blockquote>
<hr/><h3 id="3-linearity">3. Linearity</h3><p>线性系统满足 superposition：</p><p>$f(ax<em>1+bx</em>2)=af(x<em>1)+bf(x</em>2)$</p><p>简单写法：</p><blockquote><p>A system is linear if the output is proportional to the input and the superposition principle holds.</p></blockquote>
<p>非线性例子：</p><p>$y=x^2$</p><p>$\sin\theta$</p><hr/><h3 id="4-time-invariance">4. Time Invariance</h3><p>如果系统行为不随时间改变，则是 time-invariant。</p><p>可以写：</p><blockquote><p>A system is time-invariant if its behavior does not explicitly depend on time. The same input applied later produces the same output shifted in time.</p></blockquote>
<p>如果方程中显式出现 (t)，例如：</p><p>$\dot{x}=tx+u$</p><p>则通常是 time-varying。</p><hr/><h3 id="5-stability">5. Stability</h3><p>课件提到 BIBO stability：</p><blockquote><p>Bounded input leads to bounded output.</p></blockquote>
<p>即：</p><p>如果输入有限，输出也有限，那么系统稳定。</p><p>可以写：</p><blockquote><p>A system is stable if bounded input signals always lead to bounded output signals.</p></blockquote>
<hr/><h2 id="24-linearization-">2.4 Linearization 线性化</h2><p>Revision 课件特别强调：</p><ul><li>Jacobian linearization</li><li>small angle linearization</li><li>assignment 1 里的 cart-pole / drone / robot locomotion 都和这个思想有关</li></ul><h3 id="1-">1. 为什么要线性化？</h3><p>真实物理系统通常是 nonlinear 的，例如：</p><p>$\sin\theta,\quad \cos\theta,\quad x^2,\quad \dot{x}^2$</p><p>但很多控制方法，例如 LQR、linear controller，需要线性模型。</p><p>所以在某个 operating point 附近，把 nonlinear system 近似成 linear system。</p><hr/><h3 id="2-small-angle-approximation">2. Small angle approximation</h3><p>当 ($\theta$) 很小时：</p><p>$\sin\theta \approx \theta$</p><p>$\cos\theta \approx 1$</p><p>$\tan\theta \approx \theta$</p><p>这个在 assignment 1 cart-pole 里面很重要。</p><hr/><h3 id="3-jacobian-linearization">3. Jacobian linearization</h3><p>非线性系统：</p><p>$\dot{x}=f(x,u)$</p><p>在 equilibrium point ((x<em>0,u</em>0)) 附近线性化：</p><p>$\delta \dot{x}=A\delta x+B\delta u$</p><p>其中：</p><p>$A=\frac{\partial f}{\partial x}\bigg|<em>{x</em>0,u_0}$</p><p>$B=\frac{\partial f}{\partial u}\bigg|<em>{x</em>0,u_0}$</p><p>可以这样解释：</p><blockquote><p>Jacobian linearization approximates a nonlinear system by its first-order Taylor expansion around an operating point.</p></blockquote>
<hr/><h2 id="25-draw-fbd-and-derive-dynamics">2.5 典型题：Draw FBD and derive dynamics</h2><p>答题框架：</p><pre class="language-text lang-text"><code class="language-text lang-text">1. Define coordinates.
2. Draw all forces.
3. Apply Newton’s second law.
4. Write equations of motion.
5. Rearrange into state-space form if required.
</code></pre>
<p>如果是质量-弹簧-阻尼系统：</p><pre class="language-text lang-text"><code class="language-text lang-text">forces:
spring force = -kx
damping force = -cẋ
external force = u
</code></pre>
<p>动力学：</p><p>$m\ddot{x}=u-c\dot{x}-kx$</p><p>整理：</p><p>$m\ddot{x}+c\dot{x}+kx=u$</p><p>state 选：</p><p>$x<em>1=x,\quad x</em>2=\dot{x}$</p><p>则：</p><p>$\dot{x}<em>1=x</em>2$
$\dot{x}<em>2=\frac{1}{m}(u-cx</em>2-kx_1)$
---</p><h1 id="3-l3-discrete-dynamics">3. L3 Discrete Dynamics</h1><h2 id="31-discrete-dynamics-">3.1 Discrete Dynamics 是什么？</h2><p>Discrete dynamics 不是连续时间变化，而是状态按离散 step 或 event 改变。</p><p>可以写：</p><blockquote><p>Discrete dynamics describes systems whose states evolve through discrete transitions rather than continuously in time. Such systems are commonly modeled by finite-state machines.</p></blockquote>
<p>例子：</p><ul><li>vending machine</li><li>traffic light</li><li>elevator</li><li>digital lock</li><li>parking lot counter</li></ul><hr/><h2 id="32-state-">3.2 State 的定义</h2><p>课件里强调：</p><blockquote><p>State is a summary of the past.</p></blockquote>
<p>可以写：</p><blockquote><p>The state of a system represents its condition at a certain moment. It determines how the system reacts to future inputs and summarizes the relevant past history.</p></blockquote>
<p>例如 parking lot counter 的 state 可以是当前车位数量：</p><p>$states={0,1,2,\dots,M}$</p><h2 id="33-fsm-">3.3 FSM 五元组</h2><p>FSM 通常可以写成：</p><p>$FSM=(S,I,O,\delta,\lambda)$
其中：</p><ul><li>(S)：states</li><li>(I)：inputs</li><li>(O)：outputs</li><li>($\delta$)：transition function</li><li>($\lambda$)：output function</li></ul><p>更完整可以加 initial state：</p><p>$FSM=(S,I,O,\delta,\lambda,s_0)$</p><h2 id="34-fsm-">3.4 FSM 图中常见元素</h2><table><thead><tr><th>元素</th><th>含义</th></tr></thead><tbody><tr><td>state</td><td>系统当前状态</td></tr><tr><td>transition</td><td>状态转移</td></tr><tr><td>guard</td><td>判断转移是否发生的条件</td></tr><tr><td>action</td><td>转移时产生的输出或执行动作</td></tr><tr><td>initial state</td><td>初始状态</td></tr><tr><td>default transition</td><td>没有其他 transition enabled 时发生</td></tr></tbody></table><hr/><h2 id="35-mealy-machine-vs-moore-machine">3.5 Mealy Machine vs Moore Machine</h2><p>Revision 课件 sample question 明确说可能让你设计 Mealy machine。</p><h3 id="mealy-machine">Mealy Machine</h3><p>Mealy machine 的输出在 transition 上产生。</p><p>特点：</p><blockquote><p>Output depends on current state and input.</p></blockquote>
<p>可以写：</p><p>$output = \lambda(state,input)$
图上一般写：</p><pre class="language-text lang-text"><code class="language-text lang-text">input / output
</code></pre>
<p>例如：</p><pre class="language-text lang-text"><code class="language-text lang-text">press / light_on
</code></pre>
<hr/><h3 id="moore-machine">Moore Machine</h3><p>Moore machine 的输出由 state 决定。</p><p>特点：</p><blockquote><p>Output depends only on the current state.</p></blockquote>
<p>可以写：</p><p>$output = \lambda(state)$
图上通常在 state 里面写 output。</p><hr/><h3 id="">对比表</h3><table><thead><tr><th>项目</th><th>Mealy</th><th>Moore</th></tr></thead><tbody><tr><td>输出取决于</td><td>state + input</td><td>state only</td></tr><tr><td>输出位置</td><td>transition 上</td><td>state 内</td></tr><tr><td>响应速度</td><td>通常更快</td><td>通常慢一个状态</td></tr><tr><td>状态数</td><td>可能更少</td><td>可能更多</td></tr><tr><td>是否 strict causal</td><td>不一定</td><td>通常 strict causal</td></tr></tbody></table><p>考试如果让画 Mealy machine，要记得把 output 写在 arrow 上，不要只写在 state 里。</p><hr/><h2 id="36-hybrid-system">3.6 Hybrid System</h2><p>Hybrid system 同时有：</p><ul><li>continuous dynamics</li><li>discrete dynamics</li></ul><p>例如：</p><ul><li>thermostat：温度连续变化，但 heater on/off 是离散状态</li><li>bouncing ball：位置连续变化，碰撞是离散事件</li><li>robot：机械运动连续，任务阶段离散</li></ul><p>可以写：</p><blockquote><p>A hybrid system combines continuous dynamics with discrete state transitions. It is useful for modeling cyber-physical systems.</p></blockquote>
<hr/><h1 id="4-l8-linear-temporal-logic-and-model-checking">4. L8 Linear Temporal Logic and Model Checking</h1><p>Revision 里把 L8 放在 L3 后面，因为它和 FSM、formal specification 关系很强。</p><hr/><h2 id="41-ltl-">4.1 LTL 是什么？</h2><p>LTL = Linear Temporal Logic。</p><p>它不仅能表达普通逻辑，还能表达时间顺序上的性质。</p><p>可以写：</p><blockquote><p>Linear Temporal Logic is a formal language used to specify temporal properties of system behavior over traces. It extends propositional logic with temporal operators such as always, eventually, next, and until.</p></blockquote>
<hr/><h2 id="42-">4.2 普通逻辑连接词</h2><table><thead><tr><th>符号</th><th>含义</th></tr></thead><tbody><tr><td>(\neg p)</td><td>not p</td></tr><tr><td>(p \land q)</td><td>p and q</td></tr><tr><td>(p \lor q)</td><td>p or q</td></tr><tr><td>(p \Rightarrow q)</td><td>if p then q</td></tr></tbody></table><hr/><h2 id="43-temporal-operators">4.3 Temporal Operators</h2><p>常见 LTL temporal operators：</p><table><thead><tr><th>符号</th><th>名称</th><th>含义</th></tr></thead><tbody><tr><td>(X p)</td><td>next</td><td>下一步 p 成立</td></tr><tr><td>(F p)</td><td>eventually / finally</td><td>未来某时刻 p 成立</td></tr><tr><td>(G p)</td><td>globally / always</td><td>从现在起 p 一直成立</td></tr><tr><td>(p U q)</td><td>until</td><td>p 一直成立直到 q 成立</td></tr></tbody></table><hr/><h2 id="44--ltl">4.4 常见英文转 LTL</h2><h3 id="1-always-p">1. Always p</h3><p>“p is always true”</p><p>$G p$</p><h3 id="2-eventually-p">2. Eventually p</h3><p>“p will eventually happen”</p><p>$F p$</p><h3 id="3-whenever-p-happens-q-eventually-happens">3. Whenever p happens, q eventually happens</h3><p>“每当 p 发生，之后 q 最终会发生”</p><p>$G(p \Rightarrow Fq)$
这是非常常考的模式。</p>
<h3 id="4-p-never-happens">4. p never happens</h3><p>“p 永远不会发生”</p><p>$G(\neg p)$</p><h3 id="5-p-must-hold-until-q-happens">5. p must hold until q happens</h3><p>“p 一直成立直到 q 发生”</p><p>$p U q$</p><h3 id="6-if-p-then-q-in-next-step">6. If p, then q in next step</h3><p>$G(p \Rightarrow Xq)$</p><h2 id="45-">4.5 课件里的例子</h2><h3 id="-1">例 1</h3><blockquote><p>Whenever the door is locked, it will not open until someone unlocks it.</p></blockquote>
<p>定义：</p><ul><li>(p)：door is locked</li><li>(q)：door is open</li><li>(r)：someone unlocks it</li></ul><p>可以写成：</p><p>$G(p \Rightarrow (\neg q \ U \ r))$
意思是：只要门锁着，在解锁之前门不能开。</p>
<h3 id="-2">例 2</h3><blockquote><p>Whenever you press ctrl-C, you will get a command line prompt.</p></blockquote>
<p>定义：</p><ul><li>(p)：press ctrl-C</li><li>(q)：command line prompt appears</li></ul><p>公式：</p><p>$G(p \Rightarrow Fq)$</p><h2 id="46-safety-vs-liveness">4.6 Safety vs Liveness</h2><p>很重要。</p><h3 id="safety-property">Safety property</h3><p>意思是：“bad thing never happens”。</p><p>例如：</p><p>$G(\neg collision)$
$G(\neg(error))$
可以写：</p><blockquote><p>A safety property states that something bad should never happen.</p></blockquote>
<hr/><h3 id="liveness-property">Liveness property</h3><p>意思是：“good thing eventually happens”。</p><p>例如：</p><p>$G(request \Rightarrow F response)$
可以写：</p><blockquote><p>A liveness property states that something good will eventually happen.</p></blockquote>
<hr/><h2 id="47-model-checking">4.7 Model Checking</h2><p>Model checking 是用数学严谨方式验证系统模型是否满足 specification。</p><p>可以写：</p><blockquote><p>Model checking is a formal verification technique that checks whether a system model satisfies a given temporal logic property.</p></blockquote>
<p>基本流程：</p><pre class="language-text lang-text"><code class="language-text lang-text">System model S
+ Environment model E
= Closed model M

Check whether M satisfies property φ
</code></pre>
<p>符号：</p><p>$M \models \varphi$
表示 model (M) satisfies property (\varphi)。</p><hr/><h1 id="5-l4-sensors-and-actuators">5. L4 Sensors and Actuators</h1><h2 id="51-sensor--actuator">5.1 Sensor 和 Actuator</h2><h3 id="sensor">Sensor</h3><blockquote><p>A sensor is a device that measures a physical quantity and converts it into a signal.</p></blockquote>
<p>例子：</p><ul><li>temperature sensor</li><li>gyroscope</li><li>accelerometer</li><li>camera</li><li>LIDAR</li><li>microphone</li><li>pressure sensor</li></ul><h3 id="actuator">Actuator</h3><blockquote><p>An actuator is a device that changes or controls a physical quantity in the environment.</p></blockquote>
<p>例子：</p><ul><li>motor</li><li>servo</li><li>LED</li><li>speaker</li><li>heater</li><li>valve</li></ul><hr/><h2 id="52-signal-chain">5.2 Signal Chain</h2><p>典型 sensor chain：</p><pre class="language-text lang-text"><code class="language-text lang-text">Physical quantity
→ Sensor
→ Signal conditioning
→ ADC
→ Digital processor
</code></pre>
<p>典型 actuator chain：</p><pre class="language-text lang-text"><code class="language-text lang-text">Digital processor
→ DAC / PWM
→ Driver
→ Actuator
→ Physical action
</code></pre>
<hr/><h2 id="53-adc--dac">5.3 ADC 和 DAC</h2><h3 id="adc">ADC</h3><p>Analog-to-Digital Converter。</p><blockquote><p>ADC converts a continuous analog signal into a digital binary representation.</p></blockquote>
<p>用于 sensor input。</p><hr/><h3 id="dac">DAC</h3><p>Digital-to-Analog Converter。</p><blockquote><p>DAC converts digital values into analog signals.</p></blockquote>
<p>用于 actuator output。</p><hr/><h2 id="54-active-vs-passive-sensors">5.4 Active vs Passive Sensors</h2><h3 id="active-sensor">Active sensor</h3><p>主动产生信号。</p><p>例子：</p><ul><li>thermocouple</li><li>piezoelectric sensor</li></ul><p>可以写：</p><blockquote><p>Active sensors generate an electrical signal in response to the measured physical quantity.</p></blockquote>
<hr/><h3 id="passive-sensor">Passive sensor</h3><p>自身不产生信号，而是改变电阻、电容、电感等 passive quantity。</p><p>例子：</p><ul><li>capacitive sensor</li><li>resistive sensor</li></ul><p>可以写：</p><blockquote><p>Passive sensors produce changes in passive electrical quantities and usually require an external excitation source.</p></blockquote>
<hr/><h2 id="55-sensor-figures-of-merit">5.5 Sensor Figures of Merit</h2><p>这一部分很容易考定义。</p><table><thead><tr><th>指标</th><th>含义</th></tr></thead><tbody><tr><td>Sensitivity</td><td>输出对输入变化的斜率</td></tr><tr><td>Range</td><td>可测量的最大最小范围</td></tr><tr><td>Precision</td><td>重复测量的一致性</td></tr><tr><td>Accuracy</td><td>测量值接近真实值的程度</td></tr><tr><td>Resolution</td><td>能检测的最小输入变化</td></tr><tr><td>Offset</td><td>输入为 0 时的非零输出</td></tr><tr><td>Linearity</td><td>输入输出关系接近直线的程度</td></tr><tr><td>Hysteresis</td><td>输入增加和减少时输出路径不同</td></tr><tr><td>Response time</td><td>输出响应输入变化所需时间</td></tr></tbody></table><hr/><h2 id="56-accuracy-vs-precision">5.6 Accuracy vs Precision</h2><p>这个很容易混。</p><h3 id="accuracy">Accuracy</h3><p>接近真实值。</p><h3 id="precision">Precision</h3><p>重复测量是否集中。</p><p>可以这样写：</p><blockquote><p>Accuracy describes closeness to the true value, while precision describes repeatability of measurements.</p></blockquote>
<p>例子：</p><ul><li>高 accuracy 高 precision：测量值都接近真实值且集中</li><li>低 accuracy 高 precision：测量值很集中，但整体偏离真实值</li><li>高 accuracy 低 precision：平均值接近真实值，但数据分散</li><li>低 accuracy 低 precision：又偏又散</li></ul><hr/><h2 id="57-sensor-model">5.7 Sensor Model</h2><p>线性 sensor：</p><p>$f(x(t))=ax(t)$
仿射 sensor：</p><p>$f(x(t))=ax(t)+b$
其中：</p><ul><li>(a)：sensitivity / gain</li><li>(b)：offset</li></ul><p>现实中 sensor 可能会：</p><ul><li>saturate</li><li>have noise</li><li>have hysteresis</li><li>have nonlinear distortion</li></ul><hr/><h2 id="58-sampling-and-nyquist-rate">5.8 Sampling and Nyquist Rate</h2><p>Uniform sampling：固定时间间隔采样。</p><p>如果信号最高频率是 (f_{max})，采样频率至少需要：</p><p>$f<em>s &gt; 2f</em>{max}$
或者理论上：</p><p>$f<em>s \ge 2f</em>{max}$
这个叫 Nyquist rate。</p><p>可以写：</p><blockquote><p>To avoid aliasing, the sampling frequency must be at least twice the maximum frequency component of the signal.</p></blockquote>
<p>Aliasing：</p><blockquote><p>Aliasing occurs when a signal is sampled too slowly, causing high-frequency components to appear as lower-frequency components.</p></blockquote>
<hr/><h2 id="59-snr">5.9 SNR</h2><p>Signal-to-noise ratio：</p><p>$SNR=\frac{signal\ power}{noise\ power}$
dB 形式：</p><p>$SNR<em>{dB}=10\log</em>{10}\frac{P<em>s}{P</em>n}$
如果是 amplitude ratio：</p><p>$SNR<em>{dB}=20\log</em>{10}\frac{A<em>s}{A</em>n}$</p><h2 id="510-">5.10 传感器选择题答题框架</h2><p>如果题目问：</p><blockquote><p>Select appropriate sensors for a dynamical system.</p></blockquote>
<p>可以按这个框架答：</p><pre class="language-text lang-text"><code class="language-text lang-text">1. Identify what physical quantities need to be measured.
2. Choose sensors that can measure these quantities.
3. Consider range, accuracy, precision, resolution, response time, and noise.
4. Consider environmental conditions.
5. Consider cost, size, power consumption, and interface compatibility.
</code></pre>
<p>例子：无人机</p><table><thead><tr><th>需求</th><th>传感器</th></tr></thead><tbody><tr><td>姿态角速度</td><td>gyroscope</td></tr><tr><td>加速度</td><td>accelerometer</td></tr><tr><td>航向</td><td>magnetometer</td></tr><tr><td>高度</td><td>barometer / lidar</td></tr><tr><td>位置</td><td>GPS / camera / optical flow</td></tr><tr><td>障碍物</td><td>ultrasonic / lidar / camera</td></tr></tbody></table><hr/><h1 id="6-l5-embedded-processors">6. L5 Embedded Processors</h1><h2 id="61-microcontroller-">6.1 Microcontroller 基本组成</h2><p>课件说 minimal set of components：</p><pre class="language-text lang-text"><code class="language-text lang-text">CPU
System memory
I/O interface
</code></pre>
<p>再加 system buses：</p><pre class="language-text lang-text"><code class="language-text lang-text">Address bus
Data bus
Control bus
</code></pre>
<hr/><h2 id="62-cpu">6.2 CPU</h2><p>CPU 的作用：</p><blockquote><p>The CPU retrieves instructions from program memory, decodes them, and executes them.</p></blockquote>
<p>也就是：</p><pre class="language-text lang-text"><code class="language-text lang-text">fetch → decode → execute
</code></pre>
<p>CPU 内部常见部件：</p><ul><li>ALU</li><li>registers</li><li>control unit</li><li>program counter</li><li>instruction decoder</li></ul><hr/><h2 id="63-system-memory">6.3 System Memory</h2><p>两类：</p><h3 id="program-memory">Program memory</h3><p>存程序指令。</p><h3 id="data-memory">Data memory</h3><p>存运行时数据。</p><p>可以写：</p><blockquote><p>Program memory stores executable instructions, while data memory stores variables and intermediate data used by the CPU.</p></blockquote>
<hr/><h2 id="64-io-interface">6.4 I/O Interface</h2><p>I/O interface 允许 CPU 和外部设备通信，例如：</p><ul><li>sensors</li><li>actuators</li><li>communication modules</li><li>timers</li><li>ADC/DAC</li><li>GPIO</li></ul><p>也叫 peripheral subsystem。</p><hr/><h2 id="65-system-bus">6.5 System Bus</h2><h3 id="address-bus">Address Bus</h3><p>用于选择 memory location 或 peripheral register。</p><p>如果 address bus 有 (m) bits，则最多可访问：</p><p>$2^m$
个 memory locations。</p><p>地址范围：</p><p>$0x000...0 \quad \text{to} \quad 2^m-1$
例子：</p><p>如果 address bus 是 12 bits：</p><p>$2^{12}=4096$
地址范围：</p><p>$0x000 \text{ to } 0xFFF$
如果 address bus 是 22 bits：</p><p>$2^{22}=4194304$
因为 22 bits = 5.5 hex digits，所以通常写成 6 位 hex：</p><p>$0x000000 \text{ to } 0x3FFFFF$</p><h3 id="data-bus">Data Bus</h3><p>data bus 传输数据和指令。</p><p>如果 data bus 是 8-bit，一次最多传 1 byte。</p><p>如果要传 16-bit 数据，需要两次 8-bit transfer。</p><p>可以写：</p><blockquote><p>The width of the data bus determines the maximum amount of data transferred in one bus transaction.</p></blockquote>
<hr/><h3 id="control-bus">Control Bus</h3><p>control bus 传控制信号，例如：</p><ul><li>read/write</li><li>clock</li><li>interrupt</li><li>reset</li><li>enable</li></ul><hr/><h2 id="66-mpu-vs-mcu">6.6 MPU vs MCU</h2><h3 id="mpu-microprocessor-unit">MPU, Microprocessor Unit</h3><p>只有 CPU 核心，其他 memory、I/O 通常外接。</p><p>常见于 PC 或复杂计算系统。</p><h3 id="mcu-microcontroller-unit">MCU, Microcontroller Unit</h3><p>CPU、memory、I/O 集成在一个芯片中。</p><p>可以写：</p><blockquote><p>A microcontroller integrates CPU, memory, and I/O peripherals on a single chip, while a microprocessor usually requires external memory and peripherals.</p></blockquote>
<hr/><h2 id="67-risc-vs-cisc">6.7 RISC vs CISC</h2><h3 id="risc">RISC</h3><p>Reduced Instruction Set Computing。</p><p>特点：</p><ul><li>指令简单</li><li>指令数量少</li><li>通常 fixed length</li><li>适合 pipeline</li><li>load/store architecture</li></ul><p>例子：</p><ul><li>ARM</li><li>RISC-V</li></ul><h3 id="cisc">CISC</h3><p>Complex Instruction Set Computing。</p><p>特点：</p><ul><li>指令复杂</li><li>指令数量多</li><li>一条指令可能完成复杂操作</li><li>硬件译码复杂</li></ul><p>例子：</p><ul><li>x86</li></ul><hr/><h2 id="68-parallelism-vs-concurrency">6.8 Parallelism vs Concurrency</h2><p>Revision 课件专门提示：</p><blockquote><p>Parallelism (L5) vs concurrency (L7)</p></blockquote>
<h3 id="parallelism">Parallelism</h3><p>真的同时执行。</p><p>需要多个 core 或多个 processing units。</p><p>可以写：</p><blockquote><p>Parallelism means multiple tasks are executed at the same time, usually on multiple processors or cores.</p></blockquote>
<hr/><h3 id="concurrency">Concurrency</h3><p>多个任务逻辑上同时进行，但不一定真的同时执行。</p><p>单核 CPU 也可以通过 scheduling 实现 concurrency。</p><p>可以写：</p><blockquote><p>Concurrency means multiple tasks make progress over overlapping time periods, but they may be interleaved on a single processor.</p></blockquote>
<hr/><h1 id="7-l6-memory-architecture">7. L6 Memory Architecture</h1><h2 id="71-volatile-vs-non-volatile-memory">7.1 Volatile vs Non-volatile Memory</h2><p>Revision sample question 明确提到：</p><blockquote><p>Explain the difference between volatile and non-volatile memory.</p></blockquote>
<h3 id="volatile-memory">Volatile memory</h3><p>断电后数据丢失。</p><p>例子：</p><ul><li>RAM</li><li>SRAM</li><li>DRAM</li><li>cache</li></ul><p>可以写：</p><blockquote><p>Volatile memory loses its stored data when power is removed.</p></blockquote>
<hr/><h3 id="non-volatile-memory">Non-volatile memory</h3><p>断电后数据仍保留。</p><p>例子：</p><ul><li>ROM</li><li>Flash</li><li>EEPROM</li><li>SSD</li></ul><p>可以写：</p><blockquote><p>Non-volatile memory retains stored data even when power is removed.</p></blockquote>
<hr/><h2 id="72-ram-vs-rom">7.2 RAM vs ROM</h2><table><thead><tr><th> 类型          </th><th> 用途                           </th></tr></thead><tbody><tr><td> RAM         </td><td> 存运行时变量、stack、heap            </td></tr><tr><td> ROM / Flash </td><td> 存程序代码、firmware、constant data </td></tr></tbody></table><hr/><h2 id="73-sram-vs-dram">7.3 SRAM vs DRAM</h2><table><thead><tr><th>项目</th><th>SRAM</th><th>DRAM</th></tr></thead><tbody><tr><td>存储方式</td><td>flip-flop</td><td>capacitor</td></tr><tr><td>是否需要 refresh</td><td>不需要</td><td>需要</td></tr><tr><td>速度</td><td>快</td><td>较慢</td></tr><tr><td>成本</td><td>高</td><td>低</td></tr><tr><td>密度</td><td>低</td><td>高</td></tr><tr><td>用途</td><td>cache</td><td>main memory</td></tr></tbody></table><hr/><h2 id="74-memory-hierarchy">7.4 Memory Hierarchy</h2><p>一般从快到慢：</p><pre class="language-text lang-text"><code class="language-text lang-text">Registers
Cache
SRAM
DRAM
Flash / ROM
External storage
</code></pre>
<p>越靠近 CPU：</p><ul><li>faster</li><li>smaller</li><li>more expensive per bit</li></ul><p>越远离 CPU：</p><ul><li>slower</li><li>larger</li><li>cheaper per bit</li></ul><hr/><h2 id="75-cache">7.5 Cache</h2><p>Cache 是 CPU 和 main memory 之间的高速小容量存储器。</p><p>作用：</p><blockquote><p>Cache stores recently or frequently used data to reduce average memory access time.</p></blockquote>
<p>核心思想：</p><ul><li>temporal locality：最近访问过的数据可能很快再次访问</li><li>spatial locality：访问某地址后，附近地址也可能被访问</li></ul><hr/><h2 id="76-memory-mapped-io">7.6 Memory-mapped I/O</h2><p>在 embedded system 中，peripheral register 可以映射到 memory address。</p><p>CPU 通过读写特定地址来控制外设。</p><p>可以写：</p><blockquote><p>In memory-mapped I/O, peripheral registers are assigned addresses in the same address space as memory, so the CPU can access peripherals using normal load/store instructions.</p></blockquote>
<hr/><h1 id="8-l7-multitasking-and-scheduling">8. L7 Multitasking and Scheduling</h1><p>Revision 课件强调：</p><blockquote><p>How to schedule concurrent systems on a single core?</p></blockquote>
<hr/><h2 id="81-task--thread--process">8.1 Task / Thread / Process</h2><h3 id="task">Task</h3><p>一个需要执行的工作单元。</p><p>例如：</p><ul><li>read sensor</li><li>update controller</li><li>send communication packet</li><li>log data</li></ul><hr/><h3 id="thread">Thread</h3><p>同一 process 内的轻量执行流，共享 memory。</p><p>优点：</p><ul><li>communication easy</li><li>lower overhead</li></ul><p>缺点：</p><ul><li>shared memory causes race condition</li><li>synchronization needed</li></ul><hr/><h3 id="process">Process</h3><p>独立地址空间的执行实体。</p><p>优点：</p><ul><li>isolation</li><li>safer</li></ul><p>缺点：</p><ul><li>communication more expensive</li><li>context switch overhead larger</li></ul><hr/><h2 id="82-threads-">8.2 Threads 的挑战</h2><p>线程共享 memory，所以可能出现：</p><ul><li>race condition</li><li>deadlock</li><li>priority inversion</li><li>inconsistent data</li><li>synchronization overhead</li></ul><h3 id="race-condition">Race condition</h3><p>多个线程同时访问共享数据，结果取决于执行顺序。</p><p>解决：</p><ul><li>mutex</li><li>semaphore</li><li>lock</li><li>critical section</li></ul><hr/><h2 id="83-message-passing">8.3 Message Passing</h2><p>进程之间可以通过 message passing 通信。</p><p>优点：</p><ul><li>no shared memory race condition</li><li>modular</li><li>safer</li></ul><p>缺点：</p><ul><li>overhead higher</li><li>message delay</li><li>communication design more complex</li></ul><hr/><h2 id="84-scheduler">8.4 Scheduler</h2><p>scheduler 决定哪个 task 在什么时候运行。</p><p>常见目标：</p><ul><li>meet deadlines</li><li>minimize response time</li><li>maximize CPU utilization</li><li>ensure fairness</li><li>avoid starvation</li></ul><hr/><h2 id="85-static-vs-dynamic-scheduling">8.5 Static vs Dynamic Scheduling</h2><h3 id="fully-static-scheduler">Fully-static scheduler</h3><p>所有任务执行顺序在设计时确定。</p><p>优点：</p><ul><li>predictable</li><li>simple</li><li>suitable for periodic tasks</li></ul><p>缺点：</p><ul><li>inflexible</li><li>difficult to handle unexpected events</li></ul><hr/><h3 id="dynamic-scheduler">Dynamic scheduler</h3><p>运行时根据优先级、deadline 等决定任务顺序。</p><p>优点：</p><ul><li>flexible</li><li>can respond to events</li></ul><p>缺点：</p><ul><li>runtime overhead</li><li>harder to verify</li></ul><hr/><h2 id="86-preemptive-vs-non-preemptive">8.6 Preemptive vs Non-preemptive</h2><h3 id="non-preemptive">Non-preemptive</h3><p>一个 task 一旦开始执行，就运行到完成或主动让出 CPU。</p><p>优点：</p><ul><li>simple</li><li>lower context-switch overhead</li><li>no mid-task interruption</li></ul><p>缺点：</p><ul><li>high-priority task 可能需要等待</li><li>response time 可能较长</li></ul><hr/><h3 id="preemptive">Preemptive</h3><p>高优先级 task 到来时，可以打断低优先级 task。</p><p>优点：</p><ul><li>better response for urgent tasks</li><li>suitable for real-time systems</li></ul><p>缺点：</p><ul><li>context switch overhead</li><li>synchronization more difficult</li><li>possible race condition</li></ul><hr/><h2 id="87-priority-based-scheduling">8.7 Priority-based Scheduling</h2><p>每个 task 有 priority。</p><p>scheduler 选择最高优先级 ready task 执行。</p><p>如果是 non-preemptive priority scheduler：</p><ul><li>当前 task 不会被打断</li><li>当前 task 完成后，选择 ready queue 里 priority 最高的 task</li></ul><p>如果是 preemptive priority scheduler：</p><ul><li>高优先级 task 一 ready，就可以打断低优先级 task</li></ul><hr/><h2 id="88--scheduling-">8.8 画 Scheduling 图的方法</h2><p>如果题目给几个 task：</p><table><thead><tr><th>Task</th><th style="text-align:right">Arrival time</th><th style="text-align:right">Execution time</th><th style="text-align:right">Priority</th></tr></thead><tbody><tr><td>T1</td><td style="text-align:right">0</td><td style="text-align:right">3</td><td style="text-align:right">2</td></tr><tr><td>T2</td><td style="text-align:right">1</td><td style="text-align:right">2</td><td style="text-align:right">1</td></tr><tr><td>T3</td><td style="text-align:right">2</td><td style="text-align:right">1</td><td style="text-align:right">3</td></tr></tbody></table><p>假设 priority 数字越小优先级越高。</p><h3 id="non-preemptive">Non-preemptive</h3><pre class="language-text lang-text"><code class="language-text lang-text">t=0: T1 arrives, run T1
t=1: T2 arrives, but T1 continues
t=2: T3 arrives, but T1 continues
t=3: T1 finishes, choose highest priority ready task T2
t=5: T2 finishes, run T3
t=6: finish
</code></pre>
<p>Gantt chart：</p><pre class="language-text lang-text"><code class="language-text lang-text">0     3     5   6
| T1  | T2  |T3 |
</code></pre>
<h3 id="preemptive">Preemptive</h3><pre class="language-text lang-text"><code class="language-text lang-text">t=0: T1 runs
t=1: T2 arrives, higher priority, preempts T1
t=3: T2 finishes, T1 resumes
t=5: T1 finishes
t=5: T3 runs
</code></pre>
<p>Gantt chart：</p><pre class="language-text lang-text"><code class="language-text lang-text">0  1     3     5   6
|T1| T2  | T1  |T3 |
</code></pre>
<hr/><h1 id="9-l9-interfacing">9. L9 Interfacing</h1><p>Revision 课件明确说 MCU basic interface 有四个 fundamental elements：</p><ol start="1"><li>Power source</li><li>Clock generator</li><li>Power-on reset circuit</li><li>Booting function</li></ol><hr/><h2 id="91-basic-mcu-interface">9.1 Basic MCU Interface</h2><p>可以写：</p><blockquote><p>A microcontroller requires a basic interface to become usable, including a power source, a clock generator, a reset circuit, and a booting function.</p></blockquote>
<hr/><h2 id="92-power-source">9.2 Power Source</h2><p>常见 power source：</p><ul><li>battery</li><li>wall-connected AC power</li><li>capacitor</li><li>energy harvesting</li></ul><p>Energy harvesting 例子：</p><ul><li>photovoltaic</li><li>piezoelectric</li><li>thermoelectric generator</li><li>kinetic energy</li><li>electromagnetic radiation</li></ul><hr/><h2 id="93-voltage-and-power">9.3 Voltage and Power</h2><p>课件提到：</p><p>$P \sim V^2$
即 digital circuit 的 power consumption 和 supply voltage 平方相关。</p><p>所以降低 voltage 可以降低功耗，但也会降低最高工作频率。</p><p>可以写：</p><blockquote><p>Lower supply voltage reduces power consumption, but it also reduces the maximum operating frequency of the circuit.</p></blockquote>
<hr/><h2 id="94-battery-model">9.4 Battery Model</h2><p>Revision sample question 提到：</p><blockquote><p>Draw the water bucket model for rechargeable batteries.</p></blockquote>
<p>核心概念：</p><ul><li>available charge：可以立即使用的电荷</li><li>bound charge：暂时不容易直接使用的电荷</li><li>internal resistance：内部电阻导致损耗</li><li>leakage/self-discharge：电池慢慢损失电量</li></ul><p>可以把电池想成两个水桶：</p><pre class="language-text lang-text"><code class="language-text lang-text">Bound charge bucket  → slowly transfers → Available charge bucket
                                           ↓
                                      load consumes
</code></pre>
<p>解释：</p><blockquote><p>The available-charge well represents charge that can be immediately extracted by the load. The bound-charge well represents charge that is stored chemically but not immediately available. Charge can flow from bound to available over time, and losses occur due to internal resistance and irreversible reactions.</p></blockquote>
<hr/><h2 id="95-peukerts-law">9.5 Peukert’s Law</h2><p>课件提到 lead-acid battery lifetime：</p><p>$t=\frac{C}{I^\alpha}$
其中：</p><ul><li>(t)：discharge time</li><li>(C)：capacity</li><li>(I)：discharge current</li><li>($\alpha$)：Peukert coefficient</li></ul><p>意义：</p><blockquote><p>Higher discharge current reduces effective battery capacity and shortens battery lifetime.</p></blockquote>
<hr/><h2 id="96-clock">9.6 Clock</h2><p>Clock 用于同步系统操作。</p><p>Clock requirements：</p><ul><li><p>fixed amplitude swing</p><p>$V<em>{SW}=V</em>{OH}-V_{OL}$</p></li><li><p>fixed frequency</p><p>$f<em>{clk}=\frac{1}{T</em>{clk}}$</p></li><li><p>constant duty cycle</p><p>$DC=\frac{T<em>{high}}{T</em>{clk}}$</p></li><li><p>small rising/falling time</p><h2>$t<em>r,\ t</em>f$</h2></li></ul><h2 id="97-clock-jitter-and-drift">9.7 Clock Jitter and Drift</h2><h3 id="jitter">Jitter</h3><blockquote><p>Clock jitter is uncertainty in the periodicity of a clock signal.</p></blockquote>
<p>也就是每个周期不完全一致。</p><h3 id="drift">Drift</h3><blockquote><p>Frequency drift is a systematic change in clock frequency over time.</p></blockquote>
<p>原因可能包括：</p><ul><li>thermal noise</li><li>power supply variation</li><li>loading condition</li><li>temperature change</li></ul><hr/><h2 id="98-internal-vs-external-clock">9.8 Internal vs External Clock</h2><h3 id="internal-clock">Internal clock</h3><ul><li>RC oscillator / ring oscillator</li><li>cheaper</li><li>simpler</li><li>less stable</li><li>limited frequency choices</li></ul><h3 id="external-clock">External clock</h3><ul><li>quartz crystal / ceramic resonator</li><li>more stable</li><li>more accurate</li><li>extra components needed</li></ul><hr/><h2 id="99-reset-and-por">9.9 Reset and POR</h2><p>RESET signal 的作用：</p><blockquote><p>RESET takes the system to its initial state.</p></blockquote>
<p>RESET 可能导致：</p><ul><li>load PC with first boot instruction address</li><li>clear status register</li><li>initialize peripherals</li><li>reset FSM state</li></ul><p>Power-on reset circuit, POR：</p><blockquote><p>A POR circuit generates a reset signal when power is first applied, ensuring that the MCU starts from a known initial state.</p></blockquote>
<hr/><h2 id="910-booting">9.10 Booting</h2><p>Booting 是 CPU reset 后执行的一系列初始化指令。</p><p>包括：</p><ol start="1"><li>identifying and initializing peripherals</li><li>setting up the stack</li><li>initializing global variables</li><li>performing diagnostics</li><li>loading OS or main program</li></ol><p>可以写：</p><blockquote><p>Booting is the sequence of instructions executed after reset to initialize the system and start software execution.</p></blockquote>
<hr/><h2 id="911-polling-vs-interrupts">9.11 Polling vs Interrupts</h2><h3 id="polling">Polling</h3><p>CPU 不断检查外设状态。</p><p>优点：</p><ul><li>simple</li><li>predictable</li><li>easy to implement</li></ul><p>缺点：</p><ul><li>wastes CPU cycles</li><li>poor response if polling interval too long</li><li>higher energy consumption</li></ul><hr/><h3 id="interrupt">Interrupt</h3><p>外设需要服务时发送 IRQ。</p><p>CPU 暂停当前任务，执行 ISR。</p><p>优点：</p><ul><li>faster response</li><li>lower CPU waste</li><li>lower energy consumption</li><li>better for asynchronous events</li></ul><p>缺点：</p><ul><li>more complex</li><li>ISR must be short</li><li>possible priority issues</li><li>concurrency problems</li></ul><hr/><h1 id="10-l10-serial-communication">10. L10 Serial Communication</h1><h2 id="101-serial-vs-parallel-communication">10.1 Serial vs Parallel Communication</h2><h3 id="serial-communication">Serial communication</h3><p>一条信号链路逐 bit 传输。</p><blockquote><p>Serial communication transmits an n-bit character over one signal link sequentially.</p></blockquote>
<p>优点：</p><ul><li>fewer wires</li><li>lower cost</li><li>better for long distance</li><li>less crosstalk</li><li>suitable for high-speed communication</li></ul><hr/><h3 id="parallel-communication">Parallel communication</h3><p>n 条线同时传 n bits。</p><blockquote><p>Parallel communication transmits multiple bits simultaneously using multiple signal links.</p></blockquote>
<p>理论上快，但高速或长距离时会有：</p><ul><li>skew</li><li>crosstalk</li><li>transmission line effects</li><li>synchronization difficulty</li></ul><p>所以现代高速通信很多使用 serial link。</p><hr/><h2 id="102-bit-rate-vs-baud-rate">10.2 Bit Rate vs Baud Rate</h2><h3 id="bit-rate">Bit rate</h3><p>每秒传输 bit 数：</p><p>$bit\ rate=\frac{1}{t_{bit}}$
单位：bps。</p><h3 id="baud-rate">Baud rate</h3><p>每秒传输 symbol 数。</p><p>关系：</p><p>$bit\ rate = baud\ rate \times bits\ per\ symbol$
例子：</p><h3 id="bpsk">BPSK</h3><p>一个 symbol 表示 1 bit：</p><p>$bit\ rate=baud\ rate$</p><h3 id="qpsk">QPSK</h3><p>一个 symbol 表示 2 bits：</p><p>$bit\ rate=2 \times baud\ rate$
所以：</p><p>$baud\ rate=0.5 \times bit\ rate$</p><h2 id="103-single-ended-vs-differential-link">10.3 Single-ended vs Differential Link</h2><h3 id="single-ended">Single-ended</h3><p>信号相对于 ground reference 测量。</p><p>例子：</p><ul><li>RS-232</li></ul><p>缺点：</p><ul><li>容易受 ground noise 影响</li><li>noise immunity 较差</li></ul><hr/><h3 id="differential">Differential</h3><p>用两条线的电压差表示信号：</p><p>$V<em>{diff}=V</em>+ - V<em>-$
如果两条线同时受到相同 noise (V</em>n)：</p><p>$V<em>{diff}=(V</em>+ + V<em>n)-(V</em>- + V<em>n)=V</em>+-V_-$
noise 被抵消。</p><p>可以写：</p><blockquote><p>Differential links reject common-mode noise because the receiver measures the voltage difference between two lines, and noise common to both lines is cancelled.</p></blockquote>
<hr/><h2 id="104-simplex--half-duplex--full-duplex">10.4 Simplex / Half-duplex / Full-duplex</h2><h3 id="simplex">Simplex</h3><p>单方向通信。</p><p>例子：</p><ul><li>TV broadcast</li><li>radio broadcast</li></ul><pre class="language-text lang-text"><code class="language-text lang-text">A → B
</code></pre>
<hr/><h3 id="half-duplex">Half-duplex</h3><p>双向通信，但同一时间只能一个方向。</p><p>例子：</p><ul><li>walkie-talkie</li></ul><pre class="language-text lang-text"><code class="language-text lang-text">A ⇄ B
but not simultaneously
</code></pre>
<hr/><h3 id="full-duplex">Full-duplex</h3><p>两个方向可以同时通信。</p><p>例子：</p><ul><li>phone call</li></ul><pre class="language-text lang-text"><code class="language-text lang-text">A ↔ B
simultaneously
</code></pre>
<hr/><h2 id="105-synchronous-vs-asynchronous-serial-communication">10.5 Synchronous vs Asynchronous Serial Communication</h2><h3 id="synchronous">Synchronous</h3><p>发送端和接收端共享 clock，或者 clock embedded in signal。</p><p>优点：</p><ul><li>high speed</li><li>no start/stop bit overhead</li></ul><p>缺点：</p><ul><li>clock synchronization needed</li><li>more complex</li></ul><p>例子：</p><ul><li>SPI</li><li>I2C</li></ul><hr/><h3 id="asynchronous">Asynchronous</h3><p>没有共享 clock，通过 start bit / stop bit 同步每个 frame。</p><p>优点：</p><ul><li>simple</li><li>fewer clock wires</li></ul><p>缺点：</p><ul><li>overhead higher</li><li>clock mismatch can accumulate</li></ul><p>例子：</p><ul><li>UART</li></ul><hr/><h2 id="106-packet--datagram">10.6 Packet / Datagram</h2><p>Message 可以分成 packet。</p><p>每个 packet 包括：</p><pre class="language-text lang-text"><code class="language-text lang-text">Header + Body + Footer
</code></pre>
<h3 id="header">Header</h3><ul><li>start of packet</li><li>address</li><li>type</li><li>length</li></ul><h3 id="body">Body</h3><p>实际数据。</p><h3 id="footer">Footer</h3><ul><li>end of packet</li><li>error checking</li><li>checksum / CRC</li></ul><hr/><h1 id="11-l11-evaluation-and-validation">11. L11 Evaluation and Validation</h1><h2 id="111-evaluation-vs-validation">11.1 Evaluation vs Validation</h2><h3 id="evaluation">Evaluation</h3><blockquote><p>Evaluation is the process of computing quantitative information about key system characteristics.</p></blockquote>
<p>也就是测量性能指标，例如：</p><ul><li>execution time</li><li>energy consumption</li><li>memory usage</li><li>temperature</li><li>quality of result</li></ul><hr/><h3 id="validation">Validation</h3><blockquote><p>Validation checks whether the design satisfies requirements and design objectives.</p></blockquote>
<p>也就是判断系统是否达到需求。</p><hr/><h3 id="formal-verification">Formal Verification</h3><blockquote><p>Formal verification validates a system with mathematical rigor.</p></blockquote>
<p>例如 model checking。</p><hr/><h2 id="112-multi-objective-optimization">11.2 Multi-objective Optimization</h2><p>Revision sample question：</p><blockquote><p>Formulate a multi-objective optimization.</p></blockquote>
<p>embedded system 设计中，目标通常冲突。</p><p>Product criteria (f(x))：</p><ul><li>cost</li><li>execution time</li><li>energy consumption</li><li>durability</li><li>reliability</li><li>memory usage</li><li>accuracy</li></ul><p>Product characteristics (x)：</p><ul><li>number of processors</li><li>size of memory</li><li>bus type</li><li>clock frequency</li><li>battery capacity</li><li>sensor type</li><li>algorithm parameters</li></ul><p>可以写成：</p><p>$$
\begin{aligned}
\min<em>x \quad 
f(x) &amp;=
\begin{bmatrix}
\mathrm{cost}(x) \
\mathrm{execution\ time}(x) \
\mathrm{energy}(x)
\end{bmatrix} \
\text{subject to} \quad
\mathrm{memory}(x) &amp;\le M</em>{\max} \
\mathrm{accuracy}(x) &amp;\ge A<em>{\min} \
\mathrm{power}(x) &amp;\le P</em>{\max}
\end{aligned}
$$
---</p><h2 id="113-pareto-optimality">11.3 Pareto Optimality</h2><p>如果一个 design 在某个目标上更好，但不会让其他目标变差，则它 dominates 另一个 design。</p><p>Pareto optimal point：</p><blockquote><p>A design is Pareto optimal if no other design can improve one objective without worsening at least one other objective.</p></blockquote>
<p>考试可以写：</p><blockquote><p>In multi-objective optimization, there may not be a single best solution. Instead, designers select from Pareto-optimal solutions according to design priorities.</p></blockquote>
<hr/><h2 id="114-wcet-and-bcet">11.4 WCET and BCET</h2><h3 id="wcet">WCET</h3><p>Worst-case execution time。</p><blockquote><p>WCET is the largest execution time of a program for any feasible input and initial state.</p></blockquote>
<p>估计值：</p><p>$WCET_{EST}\ge WCET$
并且要 tight：</p><p>$WCET_{EST}-WCET \ll WCET$
意思是：估计值要安全，但不能过于保守。</p><hr/><h3 id="bcet">BCET</h3><p>Best-case execution time。</p><blockquote><p>BCET is the smallest execution time of a program for feasible inputs and initial states.</p></blockquote>
<p>估计值：</p><p>$BCET_{EST}\le BCET$
并且要 tight：</p><p>$BCET-BCET_{EST} \ll BCET$</p><h2 id="115-approximate-computing">11.5 Approximate Computing</h2><p>课件定义：</p><blockquote><p>Approximate computing allows tolerated deviation from the best possible output in exchange for reduced resource consumption.</p></blockquote>
<p>例子：</p><ul><li>mp3</li><li>jpeg</li><li>mp4</li><li>approximate image processing</li><li>approximate machine learning inference</li></ul><p>权衡：</p><pre class="language-text lang-text"><code class="language-text lang-text">less accuracy
→ lower execution time
→ lower energy
→ lower memory
</code></pre>
<hr/><h2 id="116-error-metrics">11.6 Error Metrics</h2><h3 id="mse">MSE</h3><p>$MSE=\frac{1}{N}\sum<em>{i=1}^{N}(x</em>i-y_i)^2$
特点：</p><ul><li>penalizes large errors more</li><li>unit is squared</li></ul><hr/><h3 id="rmse">RMSE</h3><p>$RMSE=\sqrt{MSE}$
特点：</p><ul><li>same unit as original data</li><li>easier to interpret than MSE</li><li>still penalizes large error</li></ul><hr/><h3 id="mae">MAE</h3><p>$MAE=\frac{1}{N}\sum<em>{i=1}^{N}|x</em>i-y_i|$
特点：</p><ul><li>average absolute distance</li><li>same unit as original data</li><li>less sensitive to outliers than MSE</li></ul><p>注意：PPT 里可能写了 “emphasizes large deviations/outliers”，但从数学上看，MSE 比 MAE 更强调大误差。考试如果按课件写，保守写法是：</p><blockquote><p>MAE measures the average absolute deviation in the same unit as the data, while MSE/RMSE penalize larger errors more strongly due to squaring.</p></blockquote>
<hr/><h3 id="psnr">PSNR</h3><p>Peak signal-to-noise ratio 常用于图像质量。</p><p>通常：</p><p>$PSNR=10\log<em>{10}\frac{MAX</em>I^2}{MSE}$
MSE 越小，PSNR 越大，图像质量越好。</p><hr/><h2 id="117-dependability">11.7 Dependability</h2><p>Dependability 包括：</p><ul><li>reliability</li><li>safety</li><li>security</li><li>availability</li><li>maintainability</li></ul><h3 id="reliability">Reliability</h3><p>系统在一定时间内正确工作的能力。</p><h3 id="safety">Safety</h3><p>系统不会造成危险或伤害。</p><h3 id="security">Security</h3><p>系统抵抗攻击和未授权访问的能力。</p><h3 id="availability">Availability</h3><p>系统在需要时可用。</p><hr/><h1 id="12-">12. 高频题型模板</h1><h2 id="121-address-bus-">12.1 Address Bus 计算题</h2><p>题目：</p><blockquote><p>Determine how many memory locations can be accessed and the address range in hex notation with an address bus of 12 bits.</p></blockquote>
<p>答：</p><p>$2^{12}=4096$
所以可以访问 4096 个 memory locations。</p><p>12 bits = 3 hex digits。</p><p>地址范围：</p><p>$0x000 \text{ to } 0xFFF$
模板：</p><pre class="language-text lang-text"><code class="language-text lang-text">An m-bit address bus can address 2^m different memory locations.
The address range is from 0 to 2^m - 1.
Then convert both limits to hexadecimal.
</code></pre>
<hr/><h2 id="122-volatile-vs-non-volatile-memory">12.2 Volatile vs Non-volatile Memory</h2><p>可直接背：</p><blockquote><p>Volatile memory loses its stored data when power is removed, such as RAM, SRAM, DRAM, and cache. Non-volatile memory retains data without power, such as ROM, Flash, and EEPROM. In embedded systems, volatile memory is usually used for runtime data, while non-volatile memory is used to store firmware and permanent data.</p></blockquote>
<hr/><h2 id="123-sensor-selection">12.3 Sensor Selection</h2><p>可直接背：</p><blockquote><p>To select sensors for a dynamical system, we first identify the physical quantities that need to be measured, such as position, velocity, acceleration, temperature, or pressure. Then suitable sensors are chosen according to range, sensitivity, accuracy, precision, resolution, response time, noise level, power consumption, cost, size, and interface compatibility. For example, a mobile robot may use encoders for wheel position, IMU for acceleration and angular velocity, LIDAR or camera for obstacle detection, and GPS for outdoor localization.</p></blockquote>
<hr/><h2 id="124-non-preemptive-priority-scheduler">12.4 Non-preemptive Priority Scheduler</h2><p>答题步骤：</p><pre class="language-text lang-text"><code class="language-text lang-text">1. Sort tasks by arrival time.
2. At each decision point, list ready tasks.
3. Select the ready task with highest priority.
4. Since it is non-preemptive, once a task starts, it runs until completion.
5. Draw Gantt chart.
</code></pre>
<p>关键句：</p><blockquote><p>In a non-preemptive priority scheduler, a running task cannot be interrupted. The scheduler only chooses the highest-priority ready task when the CPU becomes free.</p></blockquote>
<hr/><h2 id="125-differential-link-common-noise-cancellation">12.5 Differential Link Common Noise Cancellation</h2><p>可直接背：</p><blockquote><p>In a differential link, the receiver measures the voltage difference between two signal wires. If the same noise is added to both wires, it is common-mode noise. Since the receiver subtracts the two voltages, the common noise is cancelled.</p></blockquote>
<p>公式：</p><p>$V<em>{diff}=(V</em>+ + V<em>n)-(V</em>- + V<em>n)=V</em>+-V_-$</p><h2 id="126-ltl-factory-inspection-task">12.6 LTL Factory Inspection Task</h2><p>题目可能是：</p><blockquote><p>Formally specify a factory inspection task by a robot as an LTL formula.</p></blockquote>
<p>可以自己定义 propositions：</p><ul><li>(p)：robot receives inspection request</li><li>(q)：robot reaches inspection station</li><li>(r)：robot completes inspection</li><li>(s)：unsafe area is entered</li><li>(c)：collision occurs</li></ul><p>可以写：</p><ol start="1"><li>收到任务后最终到达检查点：</li></ol><p>$G(p \Rightarrow Fq)$</p><ol start="2"><li>到达检查点后最终完成检查：</li></ol><p>$G(q \Rightarrow Fr)$</p><ol start="3"><li>永远不能碰撞：</li></ol><p>$G(\neg c)$</p><ol start="4"><li>不能进入危险区域：</li></ol><p>$G(\neg s)$
综合：</p><p>$G(p \Rightarrow Fq)\land G(q \Rightarrow Fr)\land G(\neg c)\land G(\neg s)$
文字解释：</p><blockquote><p>This formula specifies that whenever an inspection request is issued, the robot must eventually reach the inspection station and complete the inspection, while always avoiding collision and unsafe areas.</p></blockquote>
<hr/><h2 id="127-multi-objective-optimization">12.7 Multi-objective Optimization</h2><p>题目：</p><blockquote><p>Formulate a multi-objective optimization.</p></blockquote>
<p>可以写：</p><p>Let (x) represent design choices, such as CPU frequency, memory size, battery capacity, and sensor type.</p><p>Objectives:</p><p>$
\min<em>x<br/>\begin{bmatrix}<br/>cost(x)\<br/>energy(x)\<br/>execution\ time(x)<br/>\end{bmatrix}<br/>$Constraints:$
accuracy(x)\ge A</em>{min}<br/>$</p><p>$memory(x)\le M<em>{max}$
$response\ time(x)\le T</em>{max}$
解释：</p><blockquote><p>The objectives conflict with each other. For example, increasing CPU frequency may reduce execution time but increase energy consumption. Therefore, the designer should consider Pareto-optimal solutions.</p></blockquote>
<hr/><h1 id="13-">13. 最后冲刺背诵版</h1><h2 id="">必背定义</h2><h3 id="embedded-system">Embedded System</h3><blockquote><p>A dedicated computer system integrated into a larger device to perform specific functions.</p></blockquote>
<h3 id="cps">CPS</h3><blockquote><p>A system integrating computation, communication, and physical processes.</p></blockquote>
<h3 id="continuous-dynamics">Continuous Dynamics</h3><blockquote><p>Describes time-continuous system behavior using differential equations.</p></blockquote>
<h3 id="discrete-dynamics">Discrete Dynamics</h3><blockquote><p>Describes systems whose states change through discrete transitions.</p></blockquote>
<h3 id="fsm">FSM</h3><blockquote><p>A mathematical model consisting of states, inputs, outputs, transitions, and output functions.</p></blockquote>
<h3 id="sensor">Sensor</h3><blockquote><p>A device that measures a physical quantity and converts it into a signal.</p></blockquote>
<h3 id="actuator">Actuator</h3><blockquote><p>A device that changes or controls a physical quantity in the environment.</p></blockquote>
<h3 id="mcu">MCU</h3><blockquote><p>A computer-on-a-chip integrating CPU, memory, and I/O peripherals.</p></blockquote>
<h3 id="volatile-memory">Volatile Memory</h3><blockquote><p>Memory that loses data when power is removed.</p></blockquote>
<h3 id="non-volatile-memory">Non-volatile Memory</h3><blockquote><p>Memory that retains data without power.</p></blockquote>
<h3 id="interrupt">Interrupt</h3><blockquote><p>A signal from a peripheral that causes the CPU to suspend its current task and execute an ISR.</p></blockquote>
<h3 id="bit-rate">Bit Rate</h3><blockquote><p>Number of bits transmitted per second.</p></blockquote>
<h3 id="baud-rate">Baud Rate</h3><blockquote><p>Number of symbols transmitted per second.</p></blockquote>
<h3 id="evaluation">Evaluation</h3><blockquote><p>Computing quantitative information about system characteristics.</p></blockquote>
<h3 id="validation">Validation</h3><blockquote><p>Checking whether a design satisfies requirements.</p></blockquote>
<hr/><h1 id="14-">14. 考试答题建议</h1><ol start="1"><li><strong>看到 “draw” 就一定画图</strong><br/> 例如 FSM、scheduler、FBD、battery bucket model、differential link。</li><li><strong>看到 “explain difference” 就写对比表</strong><br/> 例如 volatile vs non-volatile，Mealy vs Moore，polling vs interrupt，serial vs parallel。</li><li><strong>看到公式题，先写 general rule</strong><br/> 例如 address bus：<br/>$2^m$
 然后再代入。</li><li><strong>LTL 题先定义 proposition</strong><br/> 不要直接写公式。先写：
 
 <code>text
 p: request
 q: inspection completed
 c: collision
 </code>
 
 然后再写：<br/>$G(p\Rightarrow Fq)\land G(\neg c)$</li><li><strong>scheduler 题一定说明 preemptive / non-preemptive</strong><br/> 很多人错在没有说明任务能不能被打断。</li><li><strong>传感器选择题不要只写 sensor 名字</strong><br/> 还要写为什么：
 
 <code>text
 selected because it measures acceleration, has fast response, and is suitable for robot motion estimation
 </code></li><li><strong>Evaluation 题要体现 trade-off</strong><br/> embedded system 设计几乎都是 trade-off：
 
 <code>text
 speed vs energy
 cost vs performance
 accuracy vs resource consumption
 memory vs capability
 </code></li></ol><hr/><p>这份资料里最值得优先背的是：</p><pre class="language-text lang-text"><code class="language-text lang-text">L2 系统性质 + 线性化
L3 FSM / Mealy / Moore
L4 sensor metrics
L5 address bus 计算
L6 volatile vs non-volatile
L7 scheduling
L8 LTL 公式模板
L9 power / clock / reset / boot / interrupt
L10 bit rate / baud rate / differential link
L11 evaluation / validation / multi-objective optimization
</code></pre></div><p style="text-align:right"><a href="https://blog.chiran.top/posts/大学生涯/mec302#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://blog.chiran.top/posts/大学生涯/mec302</link><guid isPermaLink="true">https://blog.chiran.top/posts/大学生涯/mec302</guid><dc:creator><![CDATA[苏辰]]></dc:creator><pubDate>Mon, 08 Jun 2026 11:27:09 GMT</pubDate></item></channel></rss>