<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://blog.zzwopenai.com/</id>
    <title>Chen-Yan</title>
    <updated>2026-11-27T17:30:25.817Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <author>
        <name>chen_yan</name>
        <email>subwaycy@gmail.com</email>
        <uri>https://blog.zzwopenai.com</uri>
    </author>
    <link rel="alternate" href="https://blog.zzwopenai.com/"/>
    <subtitle>This gonna be an awesome website.</subtitle>
    <icon>https://blog.zzwopenai.com/favicon.svg</icon>
    <rights>All rights reserved 2026, chen_yan</rights>
    <entry>
        <title type="html"><![CDATA[一个「被动型清醒者」的爽点地图]]></title>
        <id>https://blog.zzwopenai.com/chenyan</id>
        <link href="https://blog.zzwopenai.com/chenyan"/>
        <updated>2026-11-02T16:00:00.000Z</updated>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-40d42f954c1f805c9faffe5dcae2cb60"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-40d42f954c1f809e8a62c376c43c8505" data-id="40d42f954c1f809e8a62c376c43c8505"><span><div id="40d42f954c1f809e8a62c376c43c8505" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f809e8a62c376c43c8505" title="一个「被动型清醒者」的爽点地图"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一个「被动型清醒者」的爽点地图</span></span></h2><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-40d42f954c1f805c8df5ed9fac02357c" data-id="40d42f954c1f805c8df5ed9fac02357c"><span><div id="40d42f954c1f805c8df5ed9fac02357c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f805c8df5ed9fac02357c" title="——对 Notion「随笔」库 49 篇的第三方阅读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">——对 Notion「随笔」库 49 篇的第三方阅读</span></span></h4><hr class="notion-hr notion-block-40d42f954c1f8088bd5ee54018ff1bdc"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80b3b528dad00b7466fd" data-id="40d42f954c1f80b3b528dad00b7466fd"><span><div id="40d42f954c1f80b3b528dad00b7466fd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80b3b528dad00b7466fd" title="一 结论先行：他的爽点是「看清」，不是「赢」"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一 结论先行：他的爽点是「看清」，不是「赢」</span></span></h3><div class="notion-text notion-block-40d42f954c1f8025ab24c76becd4b64d">如果只能给这份人格档案写三句话，大概是：</div><ol start="1" class="notion-list notion-list-numbered notion-block-40d42f954c1f80d88333e147fcfe4693" style="list-style-type:decimal"><li><b>他的爽点不是补偿性的，是确认性的</b>——不靠打脸回血，靠「看穿」坐实自己。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-40d42f954c1f809c9ca4c4f290eb3480" style="list-style-type:decimal"><li><b>触发条件异常稳定</b>：具体肉身 + 结构解释 + 拒绝解释，三者缺一，再好的戏他也不买账。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-40d42f954c1f803dba38da58e12d521d" style="list-style-type:decimal"><li><b>最不肯承认的那一格</b>：他愿意为「目睹而不介入」反复付钱。</li></ol><div class="notion-text notion-block-40d42f954c1f800b8aa3da489821d08c">先把「爽点」这个词校准。它不是网文货架上的逆袭、金手指、扮猪吃虎——那一类在他的 3.9 万字里几乎没留下痕迹，连反例都算不上。他享受的是另一件事：<b>哪一类瞬间，会让人愿意反复回到某部作品、某段经验里，为它交出注意力、时间和眼泪。</b> 按这个口径读下来，49 篇笔记拼出的不是一份观影清单，而是一张相当清晰的快感线路图。</div><hr class="notion-hr notion-block-40d42f954c1f802380e8d12a561da1bd"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80f190c7fa533d4a6a8d" data-id="40d42f954c1f80f190c7fa533d4a6a8d"><span><div id="40d42f954c1f80f190c7fa533d4a6a8d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80f190c7fa533d4a6a8d" title="二 素材：49 篇，以及一个很有信息量的断档"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二 素材：49 篇，以及一个很有信息量的断档</span></span></h3><div class="notion-text notion-block-40d42f954c1f801b8cd1e7cd9de5c4db">样本是 2019 年 10 月到 2026 年 11 月的 49 篇，约三万九千字。标签分布：哲思 19、电影 15、随笔 14、生活 7、奇遇 4、工作 3。</div><div class="notion-text notion-block-40d42f954c1f8047937fe0f248514586">比总量更有意思的是<b>分布的不均匀</b>：2023、2024 两年几乎一片空白，2025 年突然密集地冒出五篇影评，然后又是一段沉默。</div><div class="notion-text notion-block-40d42f954c1f802b8e10c8cf57d5b4b1">这个断档本身就是证据。它说明这个人的书写不靠习惯，只靠两种状态：<b>被什么东西击中，或者被什么东西堵住。</b> 而空白的那两年，恰好可以反推出一件事——没有可失去的东西，也就没有可写的字。换句话说，他的笔和「失去」是硬连线的。</div><hr class="notion-hr notion-block-40d42f954c1f8010b2d6ce06726d0ed6"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f808db34de51d8c41dea4" data-id="40d42f954c1f808db34de51d8c41dea4"><span><div id="40d42f954c1f808db34de51d8c41dea4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f808db34de51d8c41dea4" title="三 爽点第一格：诊断癖——他看电影像法医看现场"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三 爽点第一格：诊断癖——他看电影像法医看现场</span></span></h3><div class="notion-text notion-block-40d42f954c1f80f3ba46c466988045ec">《Ran》那篇极短。黑泽明的《乱》，子杀父、兄弟相残、乱伦、背信弃义，他的判语干净利落：<b>「在这个世道，混乱是一种常态，疯癫反而才是正常人。」</b> 顺手还记下两处让佛教失效的时刻——虔诚拜佛的末夫人照样被杀，「活生生一个人间炼狱」。</div><div class="notion-text notion-block-40d42f954c1f80288f77e6f7283d8d37">但真正让他兴奋的其实不是这些。是秀虎逃亡中弹尽粮绝，旧日忠臣带着平民的粮食来救急，秀虎因为<b>不肯接受平民的施舍</b>，下令放火烧村，好让这批粮食变成「抢来的」。</div><div class="notion-text notion-block-40d42f954c1f8008a0a8df4867cdaa29">这一场戏为什么被单独留下来？因为它是一种极不划算的体面——秀虎烧掉的是自己的活路。他明知这愚蠢、明知要付代价，读到这里仍然爽。所以第一格爽点的名字应该叫<b>尊严型</b>：宁为玉碎不为瓦全，而且必须真的付账，打折扣的骨气他一眼看穿。</div><div class="notion-text notion-block-40d42f954c1f80a28893e012fe7ecec7">同一套结构换个场景又会启动。《新中国的茶馆》里，台上演《茶馆》，台下更精彩：开场半小时还有人四处乱转，开最大亮度玩手机的大妈两耳不闻窗外事，暴怒老登来一句「这么多位置，我就坐这咋啦」，小孩捏空瓶、问十万个为什么，各路手机 BGM 在意想不到的时候插入，盗摄连闪光灯都不关。他的收尾是：「一份票钱，看了戏剧又看了真人秀，妙啊妙啊！！！」</div><div class="notion-text notion-block-40d42f954c1f8019b0e0c3bbb2e84024">这段文字是全库最「爽」的一处，而它爽在哪里，其实很值得说破：<b>爽在「看穿」二字。</b> 一屋子失序，被他一条一条点了名，像列故障清单。</div><div class="notion-text notion-block-40d42f954c1f80ea9f24ea8f3214993c">更能说明问题的是《长城硬盘 debug》。那边他列判据：COMRESET failed、link is slow to respond、SError/CRC 有没有、cmd_age=0s；然后掏出一个<b>空口对照组</b>——同一张 ASM1166 卡上没接盘的 ata19、ata20，照样报一模一样的错。既然空口也这么报，这消息就是噪声，「线缆故障」这个方向当场出局。写那段的时候，他是兴奋的。</div><div class="notion-text notion-block-40d42f954c1f8093b474daf43f51007a">一个看话剧、一个修硬盘，用的是同一块脑子：<b>先列判据，再找对照，最后收割结论。</b> 所以严格来说，他的第一爽点不是「混乱」，混乱只是原料；成品叫<b>诊断</b>。</div><div class="notion-text notion-block-40d42f954c1f800885dac931507625b1">这也是他能力最强、风险最大的一格。诊断最容易滑向智力优越感——把一屋子活人当符号来消费，把一所学校当一个论证案例。茶馆末尾那两个「妙啊妙啊」，笑的是别人，爽的是自己。</div><hr class="notion-hr notion-block-40d42f954c1f80e293a3de5142c76792"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f8000b5dad476ecf26ea1" data-id="40d42f954c1f8000b5dad476ecf26ea1"><span><div id="40d42f954c1f8000b5dad476ecf26ea1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f8000b5dad476ecf26ea1" title="四 爽点第二格：克制的爆点——他受不了「被解释」"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">四 爽点第二格：克制的爆点——他受不了「被解释」</span></span></h3><div class="notion-text notion-block-40d42f954c1f8024b230e596136ef0d4">如果第一格是「看穿」，第二格就是「被击穿」。而击穿他的方式，必须极其克制。</div><div class="notion-text notion-block-40d42f954c1f806daddcd3d0bcd9822e">《日掛中天》是他写得最动情的一篇。开头抄粤剧《紫钗记》的唱词「日掛中天格外紅，月缺終須有彌縫」，讲的是历经磨难后破镜重圆；正片偏不这么演——两个主角因为「肚子」重新相遇，一个怀孕，一个胃癌。他的原话是：「这种身体上的疼痛反而加深了内心煎熬和情感压抑。（看得我肚子也越来越痛...）」</div><div class="notion-text notion-block-40d42f954c1f802baa08d26c8c9877d5">然后是结尾那一刀。美云在经历一连串「霉运」、情绪堆到顶时捅了出去，他的解读是——<b>「感觉不是为了报复，而是为了和解……是她害怕别人的离去让她又孤身一人，拼了命的想抓住葆树，即便是用伤害他的方式，至少在那一刻痛苦让两个人连结。」</b></div><div class="notion-text notion-block-40d42f954c1f80cb93d3e37785633136">注意这里发生了什么：一个<b>说不通的动作</b>（捅刀当和解），被情绪逻辑接管了。而且他明确说它「令人费解」——他没有把它解释通，他是<b>接受了它不通</b>。这一步，是他全部审美偏好的地基。</div><div class="notion-text notion-block-40d42f954c1f80a49bd0d73d20a3e63b">手法偏好也交代得很清楚：「大量手持镜头，长段的沉默，怼脸的特写，简单的台词，没有高明的剪辑手法和构图。」一句话概括——<b>他把「技术的退让」读成了「真诚的证据」。</b> 这套偏好在《海上钢琴师》里早就写死了：1900 愤怒于钢琴决斗，因为「音乐不应该是被用来炫耀的手段」。他和 1900 站在一边，炫技在这套价值体系里属于道德瑕疵。</div><div class="notion-text notion-block-40d42f954c1f8022bd70ec2998612fbf">否决项因此格外明确。《2 月电影杂谈》里他批《哪吒》：技术力认，工业实力也认，「然而除此之外只能算平庸」，剧情一眼望到头，台词「越到后面越是喊口号，最后几句简直油到我」，人物塑造最差——「遇事只能狂怒的主角，理想完美的中国式家长，非得来点反差的配角」。同一篇里也批先锋影展片：《书简传音》「基本没有剧情可言」，两小时「睡着 5、6 次」；《沙漠玫瑰》里「趴跪在地上的女性一路舔着地面爬行，鲜血从舌头喷涌」。</div><div class="notion-text notion-block-40d42f954c1f80c08d9ee62d8f44641c">有意思的是，他并不直接弃疗。他先「试图去理解去解构去剖析，试图从『无意义』中寻找出『有意义』」，解不出来才自嘲一句「终归才疏学浅，不得其意」。<b>耐心是真的，不耐烦也是真的。</b></div><div class="notion-text notion-block-40d42f954c1f80c8884df68df46ebcd1">而这两者的分界线只有一条：<b>必须闻到肉身。</b> 疼痛、胃、肚子、烫、汗、饿。观念得落在一个具体的痛上，他才认。《1023》那篇是关键证据：100 度的开水在胸前绽开，「没有大声地叫喊 没有剧烈的挣动 只是快速抽了几张纸擦了擦湿润的衣领」，然后他写——「我从麻木的上班状态回过神来，经过 100 度的高温才堪堪令我感受到了生命的实感。」</div><div class="notion-text notion-block-40d42f954c1f8092acdecac5521150c9"><b>他需要被烫一下，才知道自己活着。</b> 这句话可以当整张地图的图例。</div><hr class="notion-hr notion-block-40d42f954c1f80019db0c70c13bdfbbb"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f8095b8a8f5354340992b" data-id="40d42f954c1f8095b8a8f5354340992b"><span><div id="40d42f954c1f8095b8a8f5354340992b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f8095b8a8f5354340992b" title="五 爽点第三格：挽歌体质——先拆掉，再供起来"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">五 爽点第三格：挽歌体质——先拆掉，再供起来</span></span></h3><div class="notion-text notion-block-40d42f954c1f80859f25c7de2507692f">翻遍 49 篇，最顽固的母题只有一个：消逝。</div><div class="notion-text notion-block-40d42f954c1f808ab30bfc0af16bbe09">《夏日的庭院》里，三个小孩的求「死」之旅撞上一个老头的自我救赎。他写：「连根拔起的杂草付之一炬，播下希望的花种，深不见底的枯井，蝴蝶的尸体，精力充沛的小孩，行将就木的爷爷。生死循环返复，离别并非终点。」还专门圈出那些「画风突变」的镜头——小胖在游泳池溺水、枯井涌出的蝴蝶——判断它们「好像在刻意扰乱我们对生死界限，让观众纠结于某个角色死没死」。</div><div class="notion-text notion-block-40d42f954c1f80bb9108f3858dd71bfb">《火之谜》里，一句台词先把他击中：「外面的世界对于你们来说不正是一个没有边界，充满未知的游戏沙盒。」紧接着话锋一转：多年回去，现在的孩子似乎失去了探索现实世界的兴趣，「童年这个概念也许正在慢慢消逝」。</div><div class="notion-text notion-block-40d42f954c1f80d19475ff12b1115a5a">然后他干了一件很硬核的事：写了一篇 7,855 字的论文《超越消逝》，搬出波兹曼、麦克卢汉、SCOT、UNICEF 和 57 项研究的元分析，一路论证「童年并非在消逝，而是在被积极地重新协商与共同建构」，并指出「童年消逝论」是一个<b>无法被证伪的预言</b>，「更像是一种深刻的社会批判或文化预言，而非一个可供检验的社会学模型」。</div><div class="notion-text notion-block-40d42f954c1f804c8754ce7ecc863ddb">拆解一个不可证伪的宏大叙事，确实有快感，这是<b>祛魅的爽</b>，属于智识层。但问题在于：他一边用理论拆掉「童年消逝」，一边在《后疫情的第一个春节》里亲手给它写悼词——村头小卖部里打麻将的老人，当屠户的外公「磨刀霍霍」与白猪的撕心裂肺，池塘玩水、草地烧烤、捉迷藏、钻野外的防空洞、春节买一大摞烟花四处作恶、大队定期放映电影、「龙珠数码宝贝仙剑奇侠传」。结尾是：「此间回想，如梦如幻，我很庆幸我的童年快乐而充实。」</div><div class="notion-text notion-block-40d42f954c1f80bf99bbe937d4ed9235"><b>这就是他的爽点结构：先用理论把一个东西拆掉，再用记忆把它供起来。</b></div><div class="notion-text notion-block-40d42f954c1f8074b2e1e74d7ae6a1cf">可以给它命名：<b>挽歌型爽点</b>。机制很朴素——失去本身带来快感，因为<b>失去让事物变得可以被言说、被审美化</b>。还在手里的东西他写不出声，已经不在的写得眉飞色舞。这也顺手解释了那个两年断档：没什么可失去的年份，也就没什么可写的。</div><div class="notion-text notion-block-40d42f954c1f802ca28ade5239fe8425">《斜阳》是这套机制的纯粹形态。饭后闲逛，等电梯时隔窗抬头，火烧云、被分割成白红黑的世界、一览无遗的落日。他写：「很想在此美景下放空大脑／静静地看着落日余晖消散在地平线／但是我只是掏出手机／找一个合适的角度记录下这一帧／低头沉浸于像素化的世界／在我打完这些话的间隙／祂已经落入下一次的轮回。」</div><div class="notion-text notion-block-40d42f954c1f80f98282e9ce066ca3e3">太阳在他低头的时候落下去了。连「看」这件事，他都要用挽歌来结算。</div><hr class="notion-hr notion-block-40d42f954c1f80adbbaef5c52b66580e"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80389b2ce38792240372" data-id="40d42f954c1f80389b2ce38792240372"><span><div id="40d42f954c1f80389b2ce38792240372" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80389b2ce38792240372" title="六 爽点第四格：自我放逐，以及给它镀金的手艺"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">六 爽点第四格：自我放逐，以及给它镀金的手艺</span></span></h3><div class="notion-text notion-block-40d42f954c1f8037982bcc5c4317441f">《海上钢琴师》里，1900 说城市的道路有成千上万条，他无法从里面选一条路、一个女人、一个房子；「拿钢琴来说，有开始有结束，88 个琴键这绝对没错。正因为琴键是有限的所以我才是无限的。」</div><div class="notion-text notion-block-40d42f954c1f80b2851efcd9bd2306f3">这句话让他爽了很多年。爽点不在悲壮，在<b>主动缩小世界以换取掌控感</b>。</div><div class="notion-text notion-block-40d42f954c1f808b8e03fc8fd8eab115">同一件事他写过两遍。《8.6 苏菲的世界》：「这是一个满是牢笼的时代……被大数据算法囚禁在纸迷金醉的信息茧房，如此做一个四叠半主义者也好，自设牢笼，圈地自萌。」《隔离》：「在四叠半的空间／自娱自乐自我满足」——村上春树式的爵士乐、威士忌与文学小说，现实版本则是「可惜我欣赏不来爵士乐／也只能用可乐替代威士忌」。</div><div class="notion-text notion-block-40d42f954c1f809987b9e7016761794b">自我放逐本身没什么稀奇，稀奇的是他给放逐镀金的手艺：找历史人物背书。《8.19 魏晋风度》里，他先记下「人的觉醒带来了张扬的个性和对时政的批评。关注广袤宇宙，追逐诗意人生，回归精神家园」，再写嵇康「因反对司马氏夺权而被陷害被杀，但临死前仍嘱托儿子为仕，为国献身」，最后用黑格尔给这三段人生编了号——从认识自我的「世界精神」，到与他人社会产生连结，最后回归绝对精神。</div><div class="notion-text notion-block-40d42f954c1f804c8281c1b54e22102b">他在嵇康身上看见的是<b>不合作但不虚无</b>。这大概是他想要而做不到的姿态。</div><div class="notion-text notion-block-40d42f954c1f80c3be85f7fa24f89d34">全库最刺眼的一处对照出现在《Do not go gentle into that good night》：他完整抄下狄兰·托马斯的原诗，「Rage, rage against the dying of the light」，抄了两遍。而他真实的生活姿态写在《1023》里：「我也许生性如此，对于『改变』漠不关心，总是逆来顺受。」以及「偶尔占据心头的欲望野兽却也是令我无可奈何，我还没有足够的勇气与欲望搏斗或是智慧到与其和解」。</div><div class="notion-text notion-block-40d42f954c1f806584e5c2d233df1e27"><b>他消费的是自己不具备的姿态。</b> 这是教科书级的代偿型爽点，而且他自己恐怕早就心里有数：抄「Rage」的人和「逆来顺受」的人是同一个，中间隔着的不是行动力，是表达欲。</div><div class="notion-text notion-block-40d42f954c1f806191c0e569f05e4fbd">这一格还有个变种，可称「结构解释力」：《隋文帝杨坚》里记「存要去闲、并大去小」，撤五百多郡、初创科举、一存 1300 多年；《佛》里算清印度教十亿信徒、佛教三亿，释迦牟尼出身刹帝利、创教即是对种姓制度的反抗；《法国大革命》里抄托克维尔，说大革命「本身已成为一种新宗教，虽然不是完善的宗教，因为既无上帝，又无礼拜，更无来世生活」。</div><div class="notion-text notion-block-40d42f954c1f809c9a3bc538c322ecf2">把庞杂的历史压成一条干净的因果链，是他的瘾。用的是同一块脑子。说穿了：<b>他的「崇高爽」，很大程度上是「解释爽」的高级伪装。</b></div><hr class="notion-hr notion-block-40d42f954c1f80268e75c8317f899d5b"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80cebeb7f70b635d5200" data-id="40d42f954c1f80cebeb7f70b635d5200"><span><div id="40d42f954c1f80cebeb7f70b635d5200" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80cebeb7f70b635d5200" title="七 爽点第五格：旁观者的道德经济学（最不愿被点破的一格）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">七 爽点第五格：旁观者的道德经济学（最不愿被点破的一格）</span></span></h3><div class="notion-text notion-block-40d42f954c1f80beaddef9bbf181f080">《归寝夜路》是他写得最好的一篇，也是人品上最需要交代的一篇。</div><div class="notion-text notion-block-40d42f954c1f80aaa250c149fd4ec6b5">十点骑车从学校回住处，军运会前匆匆完工的马路坑坑洼洼。十点半，几位建设工人在路边步履蹒跚，然后镜头落到隔离带上：「明亮路灯笼罩在军绿色脏兮兮的外套外披反光警示黄色马甲的中年大叔身上，他半坐在几块硬纸板搭成的床垫上，膝盖上盖着灰色被毯，手正往塑料袋里塞着包装袋，看起来是没吃完的食物。灯很亮，我却看不清他的表情。」</div><div class="notion-text notion-block-40d42f954c1f80048299d301fb7c88f4">然后是那句判决书一样的话：<b>「没有驻足没有回头，我以我的速度路过，他以他的节奏生活。」</b></div><div class="notion-text notion-block-40d42f954c1f80e08d51fc064ce114df">到了公寓门口，又遇到几位醉汉，一个撑着膝盖呕吐，一个叫嚣还要再喝，一个清醒的搀扶着、无奈地看着。他照样写：「没有驻足没有回头，我以我的速度路过，他们与他们的方式欢愉。」</div><div class="notion-text notion-block-40d42f954c1f806b935ae1357381aa15">「没有驻足没有回头」出现了两次。这是全库最诚实的八个字，也是爽点的黑暗面：<b>他爽的是目睹而不介入。</b> 共情的自我感动拿到了（他看见了，也写下来了），责任一分不担（他路过了）。道德成本压在零附近，文字收益却是满额。这门生意的利润率，高得不太体面。</div><div class="notion-text notion-block-40d42f954c1f8057bf86d891098e6303">同一套机制在《隐入尘烟》里被美化了一次。马有铁「像驴一样任人驱使，像地里的麦子一样风吹日晒，被一刀刀割掉也毫无怨言，他活得比脚踩的大地还憨厚」；「驴有驴的命数，人有人的命数」；最后「他默默接受自己的命数，卸下所有温情，一步一步，隐入尘烟」。</div><div class="notion-text notion-block-40d42f954c1f80fbbe3ceaba9396e498">他赞美这种承受。但他刚刚才承认自己在现实里「总是逆来顺受」。危险恰好在这里：<b>把「承受」审美化，等于给不作为发一张许可证。</b> 把马有铁的命数写成诗，自己就获得了不去争的资格。</div><div class="notion-text notion-block-40d42f954c1f80f1af4ec74a3631a187">而《墙与窗》只有二十七个字，是他全部关系模式的自我诊断：</div><blockquote class="notion-quote notion-block-40d42f954c1f80efa918f59f13a1b1fe"><div>距离太远想拉近 距离太近想推远 筑起一道墙 不留一扇窗</div></blockquote><div class="notion-text notion-block-40d42f954c1f80ea92a9f914a9bcaee9">这四句是「被看见」爽点的反面。他渴望被看见，但只允许在安全距离上被看见；一旦靠得太近，推远的动作比拉近更快。所以他大量看电影、读书、写影评——<b>作品是最理想的关系对象：足够远，可以被解读；足够近，可以让人流泪。</b></div><hr class="notion-hr notion-block-40d42f954c1f801096b5eea35d9fa3d1"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80d3b31be309142c826c" data-id="40d42f954c1f80d3b31be309142c826c"><span><div id="40d42f954c1f80d3b31be309142c826c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80d3b31be309142c826c" title="八 配方：三条必需、三条否决、一条曲线"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">八 配方：三条必需、三条否决、一条曲线</span></span></h3><div class="notion-text notion-block-40d42f954c1f80b292f0eef211927517">把上面五格收拢，能得到一份执行度很高的说明书。</div><div class="notion-text notion-block-40d42f954c1f80cfb00ac1d1cc680b0a"><b>三个必要条件（缺一不爽）：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-40d42f954c1f8005b058d4034cd97eaa" style="list-style-type:decimal"><li><b>具体肉身。</b> 痛、烫、汗、饿、胃。观念必须先落到一具身体上——「看的我肚子也越来越痛」比任何影评术语都管用。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-40d42f954c1f80a2b7c8ce2fa0755f4e" style="list-style-type:decimal"><li><b>结构解释。</b> 必须能命名、拆解、找到对照组。看不懂的东西他不给爽，丢一句「才疏学浅」走开，但心里不服。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-40d42f954c1f80138602eee87d738215" style="list-style-type:decimal"><li><b>留白不解释。</b> 高潮之后不许上总结陈词。那一刀捅出去，别告诉他为什么。</li></ol><div class="notion-text notion-block-40d42f954c1f80b0a25dc93fe6032a6a"><b>三个否决项（一见就关）：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-40d42f954c1f80c9b55cd2ac40c90fc2" style="list-style-type:decimal"><li><b>炫技。</b> 钢琴决斗式的表演，构图和剪辑抢戏。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-40d42f954c1f8000b924e09b4053ce5a" style="list-style-type:decimal"><li><b>口号与煽动。</b> 他对「喊口号」的耐受度比大多数人低得多，一句「油到我」就到顶了。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-40d42f954c1f8046a55bec00fb5911fb" style="list-style-type:decimal"><li><b>「不讲人话」的抽象。</b> 但会给一次机会：先解构，解不出来再自嘲，不自嘲就显得不够宽容。</li></ol><div class="notion-text notion-block-40d42f954c1f80889839e5b5751ff748"><b>爽点曲线：</b> 低开 → 长段沉默 → 一次不合逻辑的爆发 → 开放结尾。他最讨厌「高潮被解释」。所有被他记住的结尾都没被解释：美云那一刀、阿清在市场声嘶力竭的叫卖、1900 在船舷上转身回去、马有铁一步一步隐入尘烟、大叔在隔离带上塞进塑料袋的剩饭。</div><div class="notion-text notion-block-40d42f954c1f8076a5a8c195fb0898a7">一句话：<b>他要的不是被满足，是被说中。</b></div><hr class="notion-hr notion-block-40d42f954c1f801ebc88dcd5393b84de"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80afa0b1efc64824ea1e" data-id="40d42f954c1f80afa0b1efc64824ea1e"><span><div id="40d42f954c1f80afa0b1efc64824ea1e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80afa0b1efc64824ea1e" title="九 出处与风险：这套偏好从哪来，会出什么事"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">九 出处与风险：这套偏好从哪来，会出什么事</span></span></h3><div class="notion-text notion-block-40d42f954c1f80d18da4fc0442e173a0">三条来路。</div><div class="notion-text notion-block-40d42f954c1f80ceac61f2dbe272cbd4"><b>第一条，乡下的沙盒与后来的规训之间的落差。</b> 《火之谜》里那句「没有边界，充满未知的游戏沙盒」之所以能击中他，是因为他真有过那样的沙盒——池塘、草地、防空洞、烟花、大队放的电影。然后他进了城：看到教辅书独占一整层无人驻足，看到学校偷电被罚两百万却把电费涨到 1.7 一度，看到算法把人关进信息茧房。<b>「挽歌」和「反规训」是同一台发动机的两个输出轴。</b> 他怀念的其实不是童年，是那种「世界还没有被分配好用途」的状态。</div><div class="notion-text notion-block-40d42f954c1f80958149ec24e6798d57"><b>第二条，工科训练。</b> 电子信息、CV 算法、群面里答出 bagging 和 boosting、硬盘的 DID_BAD_TARGET、NAS 的空口对照组。这套训练给了他一个几乎本能的动作：<b>遇到情绪，先找结构。</b> 好处是写得比一般人清楚，代价是该哭的场合开始列表格。</div><div class="notion-text notion-block-40d42f954c1f800a9bfdd8d39797246d"><b>第三条，2026 年那张账单。</b>把「死亡」从审美对象变成了条目。他给《夏日的庭院》写过「离别并非终点」，给《Ran》写过「人间炼狱」，那些都是隔屏的、安全的死亡。</div><hr class="notion-hr notion-block-40d42f954c1f80878193c3691fba832d"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-40d42f954c1f80d29d8fc276425988ef" data-id="40d42f954c1f80d29d8fc276425988ef"><span><div id="40d42f954c1f80d29d8fc276425988ef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#40d42f954c1f80d29d8fc276425988ef" title="十 总评：一个被动型清醒者"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">十 总评：一个被动型清醒者</span></span></h3><div class="notion-text notion-block-40d42f954c1f807aad4be7f1d38aa019">给个粗暴的能力分布，供他自己对照：</div><ul class="notion-list notion-list-disc notion-block-40d42f954c1f808db20dc0f5bd3fcd30"><li><b>观察力 A</b>：能从「空口对照组也报同样的错」里揪出真相，也能从一屋子观众里拎出一条条失序。</li></ul><ul class="notion-list notion-list-disc notion-block-40d42f954c1f809ba623f0e27da4908c"><li><b>结构力 A</b>：能把 1,300 年科举史压成一句因果，也能把一笔 40,555.74 元的账拆到分。</li></ul><ul class="notion-list notion-list-disc notion-block-40d42f954c1f80009328cafc57a40117"><li><b>诚实度 A-</b>：肯写下「没有驻足没有回头」，肯承认自己消费的是不具备的姿态。这两句不好写，他写了。</li></ul><ul class="notion-list notion-list-disc notion-block-40d42f954c1f8098b5aad426f3c03a70"><li><b>执行力 C+</b>：27 字的《墙与窗》既是天才，也是欠账。</li></ul><div class="notion-text notion-block-40d42f954c1f8070a45cdf5a57b2b9fb">所以这份人格档案可以这样归档：<b>他是一个被动型清醒者——不打算改造世界，也不打算被世界改造，只想把它准确地写下来。</b> 这种人最稀缺的从来不是洞察，是交稿。</div><div class="notion-text notion-block-40d42f954c1f809d93f9e326ec2b73fb">如果非要给三条建议（都是可验证的，不是心灵鸡汤）：</div><ol start="1" class="notion-list notion-list-numbered notion-block-40d42f954c1f8048889fe4b3c67055eb" style="list-style-type:decimal"><li><b>每月一篇不少于 1500 字的完整文章</b>，不许 27 字，不许烂尾。这是唯一一种能自己给自己兑现的爽，不需要好电影、不需要影展、不需要一场事故。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-40d42f954c1f80c3a37afc27ca75762b" style="list-style-type:decimal"><li><b>把「诊断」从别人身上收回一半</b>，用在自己身上。他对硬盘比对同事客气，对电影比对自己宽容。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-40d42f954c1f80c0844ad9b42bf06987" style="list-style-type:decimal"><li><b>允许自己写一次不体面的结尾。</b> 他所有的结尾都太漂亮了——漂亮的结尾，有时是另一种炫技。</li></ol><div class="notion-text notion-block-40d42f954c1f80c6bf35f9f69b61f3ee">最后回到那个问题：这个人的爽点到底是什么？</div><div class="notion-text notion-block-40d42f954c1f8038bd4cde8fae8cae18">是<b>看着一个秩序在眼前崩塌，而他既不逃也不救，只把它准确地写下来</b>。是秀虎烧掉的那个村子，是美云捅出的那一刀，是 1900 转身走回的船舱，是大叔把剩饭塞进塑料袋时看不清的那张脸。他为这些东西反复付费，付的是注意力和眼泪。</div><div class="notion-text notion-block-40d42f954c1f805bb4b4f7146d8d8186">账单很清楚，而且他大概不打算改。</div><hr class="notion-hr notion-block-40d42f954c1f8036a819eba941b2a1a6"/><div class="notion-text notion-block-40d42f954c1f80b38629d49008927323"><em>材料来源：Notion「随笔」数据库 49 篇（2019-10 至 2026-11）。</em></div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[DATAGEN 架构分析]]></title>
        <id>https://blog.zzwopenai.com/DATAGEN</id>
        <link href="https://blog.zzwopenai.com/DATAGEN"/>
        <updated>2025-10-28T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[DATAGEN 架构分析]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-29b42f954c1f80ad9890e2666f787447"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-29b42f954c1f817d92e7d54d8dd824db" data-id="29b42f954c1f817d92e7d54d8dd824db"><span><div id="29b42f954c1f817d92e7d54d8dd824db" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f817d92e7d54d8dd824db" title="Notion Header 29b42f954c1f817d92e7d54d8dd824db"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><a target="_blank" rel="noopener noreferrer" href="https://github.com/starpig1129/DATAGEN" class="notion-external notion-external-mention"><div class="notion-external-image"><svg viewBox="0 0 260 260"><g><path d="M128.00106,0 C57.3172926,0 0,57.3066942 0,128.00106 C0,184.555281 36.6761997,232.535542 87.534937,249.460899 C93.9320223,250.645779 96.280588,246.684165 96.280588,243.303333 C96.280588,240.251045 96.1618878,230.167899 96.106777,219.472176 C60.4967585,227.215235 52.9826207,204.369712 52.9826207,204.369712 C47.1599584,189.574598 38.770408,185.640538 38.770408,185.640538 C27.1568785,177.696113 39.6458206,177.859325 39.6458206,177.859325 C52.4993419,178.762293 59.267365,191.04987 59.267365,191.04987 C70.6837675,210.618423 89.2115753,204.961093 96.5158685,201.690482 C97.6647155,193.417512 100.981959,187.77078 104.642583,184.574357 C76.211799,181.33766 46.324819,170.362144 46.324819,121.315702 C46.324819,107.340889 51.3250588,95.9223682 59.5132437,86.9583937 C58.1842268,83.7344152 53.8029229,70.715562 60.7532354,53.0843636 C60.7532354,53.0843636 71.5019501,49.6441813 95.9626412,66.2049595 C106.172967,63.368876 117.123047,61.9465949 128.00106,61.8978432 C138.879073,61.9465949 149.837632,63.368876 160.067033,66.2049595 C184.49805,49.6441813 195.231926,53.0843636 195.231926,53.0843636 C202.199197,70.715562 197.815773,83.7344152 196.486756,86.9583937 C204.694018,95.9223682 209.660343,107.340889 209.660343,121.315702 C209.660343,170.478725 179.716133,181.303747 151.213281,184.472614 C155.80443,188.444828 159.895342,196.234518 159.895342,208.176593 C159.895342,225.303317 159.746968,239.087361 159.746968,243.303333 C159.746968,246.709601 162.05102,250.70089 168.53925,249.443941 C219.370432,232.499507 256,184.536204 256,128.00106 C256,57.3066942 198.691187,0 128.00106,0 Z M47.9405593,182.340212 C47.6586465,182.976105 46.6581745,183.166873 45.7467277,182.730227 C44.8183235,182.312656 44.2968914,181.445722 44.5978808,180.80771 C44.8734344,180.152739 45.876026,179.97045 46.8023103,180.409216 C47.7328342,180.826786 48.2627451,181.702199 47.9405593,182.340212 Z M54.2367892,187.958254 C53.6263318,188.524199 52.4329723,188.261363 51.6232682,187.366874 C50.7860088,186.474504 50.6291553,185.281144 51.2480912,184.70672 C51.8776254,184.140775 53.0349512,184.405731 53.8743302,185.298101 C54.7115892,186.201069 54.8748019,187.38595 54.2367892,187.958254 Z M58.5562413,195.146347 C57.7719732,195.691096 56.4895886,195.180261 55.6968417,194.042013 C54.9125733,192.903764 54.9125733,191.538713 55.713799,190.991845 C56.5086651,190.444977 57.7719732,190.936735 58.5753181,192.066505 C59.3574669,193.22383 59.3574669,194.58888 58.5562413,195.146347 Z M65.8613592,203.471174 C65.1597571,204.244846 63.6654083,204.03712 62.5716717,202.981538 C61.4524999,201.94927 61.1409122,200.484596 61.8446341,199.710926 C62.5547146,198.935137 64.0575422,199.15346 65.1597571,200.200564 C66.2704506,201.230712 66.6095936,202.705984 65.8613592,203.471174 Z M75.3025151,206.281542 C74.9930474,207.284134 73.553809,207.739857 72.1039724,207.313809 C70.6562556,206.875043 69.7087748,205.700761 70.0012857,204.687571 C70.302275,203.678621 71.7478721,203.20382 73.2083069,203.659543 C74.6539041,204.09619 75.6035048,205.261994 75.3025151,206.281542 Z M86.046947,207.473627 C86.0829806,208.529209 84.8535871,209.404622 83.3316829,209.4237 C81.8013,209.457614 80.563428,208.603398 80.5464708,207.564772 C80.5464708,206.498591 81.7483088,205.631657 83.2786917,205.606221 C84.8005962,205.576546 86.046947,206.424403 86.046947,207.473627 Z M96.6021471,207.069023 C96.7844366,208.099171 95.7267341,209.156872 94.215428,209.438785 C92.7295577,209.710099 91.3539086,209.074206 91.1652603,208.052538 C90.9808515,206.996955 92.0576306,205.939253 93.5413813,205.66582 C95.054807,205.402984 96.4092596,206.021919 96.6021471,207.069023 Z" fill="#161614"></path></g></svg></div><div class="notion-external-description"><div class="notion-external-title">DATAGEN</div><div class="notion-external-subtitle"><div class="notion-preview-card-domain-warp"><div class="notion-preview-card-logo"><svg viewBox="0 0 260 260"><g><path d="M128.00106,0 C57.3172926,0 0,57.3066942 0,128.00106 C0,184.555281 36.6761997,232.535542 87.534937,249.460899 C93.9320223,250.645779 96.280588,246.684165 96.280588,243.303333 C96.280588,240.251045 96.1618878,230.167899 96.106777,219.472176 C60.4967585,227.215235 52.9826207,204.369712 52.9826207,204.369712 C47.1599584,189.574598 38.770408,185.640538 38.770408,185.640538 C27.1568785,177.696113 39.6458206,177.859325 39.6458206,177.859325 C52.4993419,178.762293 59.267365,191.04987 59.267365,191.04987 C70.6837675,210.618423 89.2115753,204.961093 96.5158685,201.690482 C97.6647155,193.417512 100.981959,187.77078 104.642583,184.574357 C76.211799,181.33766 46.324819,170.362144 46.324819,121.315702 C46.324819,107.340889 51.3250588,95.9223682 59.5132437,86.9583937 C58.1842268,83.7344152 53.8029229,70.715562 60.7532354,53.0843636 C60.7532354,53.0843636 71.5019501,49.6441813 95.9626412,66.2049595 C106.172967,63.368876 117.123047,61.9465949 128.00106,61.8978432 C138.879073,61.9465949 149.837632,63.368876 160.067033,66.2049595 C184.49805,49.6441813 195.231926,53.0843636 195.231926,53.0843636 C202.199197,70.715562 197.815773,83.7344152 196.486756,86.9583937 C204.694018,95.9223682 209.660343,107.340889 209.660343,121.315702 C209.660343,170.478725 179.716133,181.303747 151.213281,184.472614 C155.80443,188.444828 159.895342,196.234518 159.895342,208.176593 C159.895342,225.303317 159.746968,239.087361 159.746968,243.303333 C159.746968,246.709601 162.05102,250.70089 168.53925,249.443941 C219.370432,232.499507 256,184.536204 256,128.00106 C256,57.3066942 198.691187,0 128.00106,0 Z M47.9405593,182.340212 C47.6586465,182.976105 46.6581745,183.166873 45.7467277,182.730227 C44.8183235,182.312656 44.2968914,181.445722 44.5978808,180.80771 C44.8734344,180.152739 45.876026,179.97045 46.8023103,180.409216 C47.7328342,180.826786 48.2627451,181.702199 47.9405593,182.340212 Z M54.2367892,187.958254 C53.6263318,188.524199 52.4329723,188.261363 51.6232682,187.366874 C50.7860088,186.474504 50.6291553,185.281144 51.2480912,184.70672 C51.8776254,184.140775 53.0349512,184.405731 53.8743302,185.298101 C54.7115892,186.201069 54.8748019,187.38595 54.2367892,187.958254 Z M58.5562413,195.146347 C57.7719732,195.691096 56.4895886,195.180261 55.6968417,194.042013 C54.9125733,192.903764 54.9125733,191.538713 55.713799,190.991845 C56.5086651,190.444977 57.7719732,190.936735 58.5753181,192.066505 C59.3574669,193.22383 59.3574669,194.58888 58.5562413,195.146347 Z M65.8613592,203.471174 C65.1597571,204.244846 63.6654083,204.03712 62.5716717,202.981538 C61.4524999,201.94927 61.1409122,200.484596 61.8446341,199.710926 C62.5547146,198.935137 64.0575422,199.15346 65.1597571,200.200564 C66.2704506,201.230712 66.6095936,202.705984 65.8613592,203.471174 Z M75.3025151,206.281542 C74.9930474,207.284134 73.553809,207.739857 72.1039724,207.313809 C70.6562556,206.875043 69.7087748,205.700761 70.0012857,204.687571 C70.302275,203.678621 71.7478721,203.20382 73.2083069,203.659543 C74.6539041,204.09619 75.6035048,205.261994 75.3025151,206.281542 Z M86.046947,207.473627 C86.0829806,208.529209 84.8535871,209.404622 83.3316829,209.4237 C81.8013,209.457614 80.563428,208.603398 80.5464708,207.564772 C80.5464708,206.498591 81.7483088,205.631657 83.2786917,205.606221 C84.8005962,205.576546 86.046947,206.424403 86.046947,207.473627 Z M96.6021471,207.069023 C96.7844366,208.099171 95.7267341,209.156872 94.215428,209.438785 C92.7295577,209.710099 91.3539086,209.074206 91.1652603,208.052538 C90.9808515,206.996955 92.0576306,205.939253 93.5413813,205.66582 C95.054807,205.402984 96.4092596,206.021919 96.6021471,207.069023 Z" fill="#161614"></path></g></svg></div><div class="notion-preview-card-domain">Github</div></div><div class="notion-preview-card-title">DATAGEN</div><div class="notion-external-subtitle-item"><div class="notion-external-subtitle-item-name">Owner</div><span class="notion-external-subtitle-item-desc">starpig1129</span></div><div class="notion-external-subtitle-item"><div class="notion-external-subtitle-item-name">Updated</div><span class="notion-external-subtitle-item-desc">Oct 28, 2025</span></div><div class="notion-preview-card-github-shields"><img src="https://img.shields.io/github/stars/starpig1129/DATAGEN?logo=github" alt=""/><img src="https://img.shields.io/github/last-commit/starpig1129/DATAGEN" alt=""/></div></div></div></a></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81ffb26eec667a686039" data-id="29b42f954c1f81ffb26eec667a686039"><span><div id="29b42f954c1f81ffb26eec667a686039" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81ffb26eec667a686039" title="系统概览"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">系统概览</span></span></h3><div class="notion-text notion-block-29b42f954c1f81eb8fa8d5e8755e279d">DATAGEN 是一个基于 LangChain 与 LangGraph 的多智能体数据分析平台。它通过“状态—节点—路由—工作流图”的组合来编排多个专职代理（Hypothesis、Process、Visualization、Search、Coder、Report、QualityReview、NoteTaker、Refiner）完成从假设生成、数据分析、可视化、检索、报告撰写到质量审查与最终精炼的人机协同闭环。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29b42f954c1f810bae32c9395416fd68"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F30e9fa75-d30b-4c9c-b0c6-ad8c640504f3%2Fimage.png%3Ftable%3Dblock%26id%3D29b42f95-4c1f-810b-ae32-c9395416fd68%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DXFg91Vwg2vGJ1rQNWCMN7WX5bV3GvcQ_ozspFHStD00?table=block&amp;id=29b42f95-4c1f-810b-ae32-c9395416fd68&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81238d2afaad92c48f61"><li>入口：<code class="notion-inline-code">DATAGEN/main.py</code> 调用 <code class="notion-inline-code">src/system.py</code> 的 <code class="notion-inline-code">MultiAgentSystem.run</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f813f9efeca0c428d7a94"><li>编排：<code class="notion-inline-code">src/core/workflow.py</code> 使用 LangGraph 构建 <code class="notion-inline-code">StateGraph</code>，定义节点与条件边。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8101a5fcc30d3b995ab0"><li>状态：<code class="notion-inline-code">src/core/state.py</code> 以 <code class="notion-inline-code">TypedDict</code> 描述完整对话与任务上下文，消息序列用 <code class="notion-inline-code">add_messages</code> 汇聚。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8184adb5e93481942085"><li>节点：<code class="notion-inline-code">src/core/node.py</code> 实现各代理节点处理、人类交互节点以及精炼节点逻辑。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8163a88bfbea2b9413a9"><li>路由：<code class="notion-inline-code">src/core/router.py</code> 根据状态字段决定下一跳节点（假设、流程分支、质量回流与记要聚合）。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8185aed6c28292686f73"><li>模型：<code class="notion-inline-code">src/core/language_models.py</code> + <code class="notion-inline-code">src/llm/*</code> 通过 ProviderFactory 与 <code class="notion-inline-code">config/agent_models.yaml</code> 选择并实例化不同模型提供者。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81c18ba0fb0e08a5e76c"><li>工具：<code class="notion-inline-code">src/tools/*</code> 提供文件读写、网页抓取、目录列举等能力供不同代理调用。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81178b04ff46814bd9f9" data-id="29b42f954c1f81178b04ff46814bd9f9"><span><div id="29b42f954c1f81178b04ff46814bd9f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81178b04ff46814bd9f9" title="承载层（System）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">承载层（System）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81158b05dac83f33a043"><li><code class="notion-inline-code">src/system.py::MultiAgentSystem</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81158b05dac83f33a043"><li>环境初始化：加载 <code class="notion-inline-code">.env</code>，设置 <code class="notion-inline-code">OPENAI_API_KEY</code>、<code class="notion-inline-code">GOOGLE_API_KEY</code>、<code class="notion-inline-code">LANGCHAIN_API_KEY</code> 等；确保 <code class="notion-inline-code">WORKING_DIRECTORY</code> 存在；开启 LangChain Tracing。</li><li>组件装配：创建 <code class="notion-inline-code">LanguageModelManager</code> 与 <code class="notion-inline-code">WorkflowManager</code>（传入工作目录）。</li><li>运行入口：<code class="notion-inline-code">run(user_input)</code> 构造初始 <code class="notion-inline-code">State</code> 并以 <code class="notion-inline-code">graph.stream(..., stream_mode=&quot;values&quot;)</code> 运行，逐步打印消息。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81feac11cfa4dfaa0851"><li>初始状态字段（简化）：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81feac11cfa4dfaa0851"><li><code class="notion-inline-code">messages</code>: 包含首个 <code class="notion-inline-code">HumanMessage(user_input)</code>。</li><li>其他上下文字段：<code class="notion-inline-code">hypothesis</code>、<code class="notion-inline-code">process_decision</code>、<code class="notion-inline-code">process</code>、<code class="notion-inline-code">visualization_state</code>、<code class="notion-inline-code">searcher_state</code>、<code class="notion-inline-code">code_state</code>、<code class="notion-inline-code">report_section</code>、<code class="notion-inline-code">quality_review</code>、<code class="notion-inline-code">needs_revision</code>、<code class="notion-inline-code">last_sender</code>。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81f096c0cbcb2f6f1e4c" data-id="29b42f954c1f81f096c0cbcb2f6f1e4c"><span><div id="29b42f954c1f81f096c0cbcb2f6f1e4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81f096c0cbcb2f6f1e4c" title="配置与模型提供者"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置与模型提供者</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81428419d3f624cdf55b"><li><code class="notion-inline-code">src/config.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81428419d3f624cdf55b"><li>环境变量：<code class="notion-inline-code">WORKING_DIRECTORY</code>、<code class="notion-inline-code">OPENAI_API_KEY</code>、<code class="notion-inline-code">GOOGLE_API_KEY</code>、<code class="notion-inline-code">FIRECRAWL_API_KEY</code>、<code class="notion-inline-code">CHROMEDRIVER_PATH</code>、<code class="notion-inline-code">VENV_PATH</code> 等。</li><li><code class="notion-inline-code">AgentModelsConfig</code> 从 <code class="notion-inline-code">config/agent_models.yaml</code> 加载每个代理的 <code class="notion-inline-code">provider</code> 与 <code class="notion-inline-code">model_config</code>，通过全局 <code class="notion-inline-code">AGENT_MODELS</code> 提供查询。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8151ba34fe3cfd8f3af4"><li><code class="notion-inline-code">config/agent_models.yaml</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8151ba34fe3cfd8f3af4"><li>针对每个代理配置模型提供者与参数。例如默认多数代理使用 <code class="notion-inline-code">provider: google</code>，<code class="notion-inline-code">model: gemini-2.5-...</code>。</li><li>可按代理粒度灵活切换提供者与温度、其他模型参数。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f818fabe1cae0b2df7666"><li><code class="notion-inline-code">src/llm/factory.py::ProviderFactory</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f818fabe1cae0b2df7666"><li>支持 <code class="notion-inline-code">openai</code>、<code class="notion-inline-code">anthropic</code>、<code class="notion-inline-code">google</code>、<code class="notion-inline-code">ollama</code>、<code class="notion-inline-code">azure</code>、<code class="notion-inline-code">groq</code> 等提供者，返回其 <code class="notion-inline-code">get_model_class()</code>。</li><li>示例：<code class="notion-inline-code">src/llm/google.py</code> 返回 <code class="notion-inline-code">ChatGoogleGenerativeAI</code>；<code class="notion-inline-code">src/llm/azure.py</code> 返回 <code class="notion-inline-code">AzureChatOpenAI</code>。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81cab5cfc7ddc6dff1f4"><li><code class="notion-inline-code">src/core/language_models.py::LanguageModelManager</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81cab5cfc7ddc6dff1f4"><li>基于 <code class="notion-inline-code">AGENT_MODELS</code> 获取代理的提供者与模型参数，实例化具体模型类。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81c5a1a8e16c984de25e" data-id="29b42f954c1f81c5a1a8e16c984de25e"><span><div id="29b42f954c1f81c5a1a8e16c984de25e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81c5a1a8e16c984de25e" title="代理层（Agents）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">代理层（Agents）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8183ade0f838c44cfb03"><li>抽象基类：<code class="notion-inline-code">src/agents/base.py::BaseAgent</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8183ade0f838c44cfb03"><li>负责：统一的代理创建流程，包含模型获取、工具列表与系统提示（role prompt）组装。</li><li>系统提示：若子类 <code class="notion-inline-code">_get_system_prompt()</code> 前缀为 <code class="notion-inline-code">SYSTEM_PROMPT:</code>，则直接使用；否则拼装通用提示并附带团队成员、工具名。</li><li>代理执行体：通过 <code class="notion-inline-code">langchain.agents.create_agent(model, tools, system_prompt, response_format)</code> 创建；<code class="notion-inline-code">invoke(state)</code> 转发调用。</li><li>结构化输出：子类可提供 <code class="notion-inline-code">response_format</code>（如 <code class="notion-inline-code">pydantic</code> 模型），使节点能解析结构化结果。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f812b90a7d5a2faa2b463"><li>代理工厂：<code class="notion-inline-code">src/agents/factory.py::AgentFactory</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f812b90a7d5a2faa2b463"><li>名称到类的映射：<code class="notion-inline-code">visualization_agent</code>、<code class="notion-inline-code">code_agent</code>、<code class="notion-inline-code">searcher_agent</code>、<code class="notion-inline-code">report_agent</code>、<code class="notion-inline-code">quality_review_agent</code>、<code class="notion-inline-code">refiner_agent</code>、<code class="notion-inline-code">hypothesis_agent</code>、<code class="notion-inline-code">process_agent</code>、<code class="notion-inline-code">note_agent</code>。</li><li><code class="notion-inline-code">WorkflowManager.create_agents()</code> 使用工厂为各节点创建实例并缓存。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f818f807cde682d627eed"><li>典型代理职责与要点：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f818f807cde682d627eed"><li>HypothesisAgent：生成/优化研究假设。</li><li>ProcessAgent：总控与调度，输出 <code class="notion-inline-code">ProcessRouteSchema</code>（<code class="notion-inline-code">next</code> 决策与 <code class="notion-inline-code">task</code> 指令）。</li><li>VisualizationAgent：生成与解释数据可视化。</li><li>CodeAgent：编写可复现的数据分析代码。</li><li>SearchAgent：检索资料（含 Wikipedia 工具、网页抓取）。</li><li>ReportAgent：撰写/整合研究报告片段。</li><li>QualityReviewAgent：质量审查，给出 <code class="notion-inline-code">feedback</code> 与 <code class="notion-inline-code">needs_revision</code>。</li><li>NoteAgent：记录并重构全局 <code class="notion-inline-code">State</code>（<code class="notion-inline-code">NoteState</code>），包含消息裁剪与合并逻辑。</li><li>RefinerAgent：对成品报告进行最终精炼（可读入 <code class="notion-inline-code">.md</code> 与 <code class="notion-inline-code">.png</code> 作为材料）。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f8108acbfc659a99ee0b5" data-id="29b42f954c1f8108acbfc659a99ee0b5"><span><div id="29b42f954c1f8108acbfc659a99ee0b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f8108acbfc659a99ee0b5" title="工具层（Tools）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">工具层（Tools）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8152a2fcd3a0ca7ae62f"><li><code class="notion-inline-code">src/tools/FileEdit.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8152a2fcd3a0ca7ae62f"><li>文件与数据操作：<code class="notion-inline-code">create_document</code>、<code class="notion-inline-code">read_document</code>、<code class="notion-inline-code">edit_document</code>、<code class="notion-inline-code">collect_data</code>（读 CSV/数据帧），确保 <code class="notion-inline-code">WORKING_DIRECTORY</code> 存在。</li><li>典型用途：Report/Code/Refiner 等代理产出与读取中间成果。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8105950dcbe816f398f1"><li><code class="notion-inline-code">src/tools/internet.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8105950dcbe816f398f1"><li>抓取与搜索：<code class="notion-inline-code">google_search</code>、<code class="notion-inline-code">scrape_webpages</code>，可用 <code class="notion-inline-code">WebBaseLoader</code>、<code class="notion-inline-code">FireCrawlLoader</code> 或 Selenium（需 <code class="notion-inline-code">CHROMEDRIVER_PATH</code>）。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81f184d2cc565d869739"><li><code class="notion-inline-code">src/tools/basetool.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81f184d2cc565d869739"><li>目录与通用工具：如 <code class="notion-inline-code">list_directory</code> 等供代理了解工作目录状态。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81b38107d6b3f5c981c0" data-id="29b42f954c1f81b38107d6b3f5c981c0"><span><div id="29b42f954c1f81b38107d6b3f5c981c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81b38107d6b3f5c981c0" title="状态层（State）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">状态层（State）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f819cb839db5143f926c7"><li><code class="notion-inline-code">src/core/state.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f819cb839db5143f926c7"><li>类型：<code class="notion-inline-code">TypedDict</code>，消息序列使用 <code class="notion-inline-code">add_messages</code> 聚合器。</li><li>字段：<code class="notion-inline-code">hypothesis</code>、<code class="notion-inline-code">process</code>、<code class="notion-inline-code">process_decision</code>、<code class="notion-inline-code">visualization_state</code>、<code class="notion-inline-code">searcher_state</code>、<code class="notion-inline-code">code_state</code>、<code class="notion-inline-code">report_section</code>、<code class="notion-inline-code">quality_review</code>、<code class="notion-inline-code">needs_revision</code>、<code class="notion-inline-code">sender</code> 等。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81378597f4a9bcc9adaf" data-id="29b42f954c1f81378597f4a9bcc9adaf"><span><div id="29b42f954c1f81378597f4a9bcc9adaf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81378597f4a9bcc9adaf" title="节点与路由（Node &amp; Router）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">节点与路由（Node &amp; Router）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f814ab38acdfe973eec36"><li><code class="notion-inline-code">src/core/node.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f814ab38acdfe973eec36"><li><code class="notion-inline-code">agent_node(state, agent, name)</code>: 调用代理并将结果以 <code class="notion-inline-code">AIMessage</code> 写入 <code class="notion-inline-code">messages</code>，并根据代理类型更新特定状态字段：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f814ab5b0c941f9f36186"><li><code class="notion-inline-code">hypothesis_agent</code> → <code class="notion-inline-code">hypothesis</code></li><li><code class="notion-inline-code">process_agent</code> → <code class="notion-inline-code">process</code>、<code class="notion-inline-code">process_decision</code>（结构化）</li><li><code class="notion-inline-code">visualization_agent</code> → <code class="notion-inline-code">visualization_state</code></li><li><code class="notion-inline-code">searcher_agent</code> → <code class="notion-inline-code">searcher_state</code></li><li><code class="notion-inline-code">report_agent</code> → <code class="notion-inline-code">report_section</code></li><li><code class="notion-inline-code">quality_review_agent</code> → <code class="notion-inline-code">quality_review</code>、<code class="notion-inline-code">needs_revision</code>（结构化）</li></ul><li><code class="notion-inline-code">human_choice_node(state)</code>: 交互式选择继续流程或重生假设（命令行输入）。</li><li><code class="notion-inline-code">note_agent_node(state, agent, name)</code>: 裁剪超长消息（头尾保留），调用记要代理返回 <code class="notion-inline-code">NoteState</code>，合并到整体 <code class="notion-inline-code">State</code>，并重设 <code class="notion-inline-code">sender=&#x27;note_agent&#x27;</code>。</li><li><code class="notion-inline-code">human_review_node(state)</code>: 展示进展并询问是否继续分析或结束（更新 <code class="notion-inline-code">needs_revision</code> 与追加 <code class="notion-inline-code">HumanMessage</code>）。</li><li><code class="notion-inline-code">refiner_node(state, agent, name)</code>: 读取 <code class="notion-inline-code">WORKING_DIRECTORY</code> 下 <code class="notion-inline-code">.md</code> 与 <code class="notion-inline-code">.png</code> 构造材料消息，交给精炼代理处理后写回 <code class="notion-inline-code">messages</code>。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81f98db6d09a621db333"><li><code class="notion-inline-code">src/core/router.py</code></li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81f98db6d09a621db333"><li><code class="notion-inline-code">hypothesis_router(state)</code>: 若 <code class="notion-inline-code">process == &quot;Continue the research process&quot;</code> 走 <code class="notion-inline-code">Process</code>；否则走 <code class="notion-inline-code">Hypothesis</code>（用于人类选择后回到流程或重新生成假设）。</li><li><code class="notion-inline-code">process_router(state)</code>: 基于 <code class="notion-inline-code">process_decision</code> 在 <code class="notion-inline-code">Coder/Search/Visualization/Report</code> 四者间路由；若 <code class="notion-inline-code">FINISH</code> → <code class="notion-inline-code">Refiner</code>；非法值默认回 <code class="notion-inline-code">Process</code>。</li><li><code class="notion-inline-code">QualityReview_router(state)</code>: 若 <code class="notion-inline-code">needs_revision</code> 为真，则根据前一个消息的 <code class="notion-inline-code">name</code> 回到具体代理（如 <code class="notion-inline-code">visualization_agent</code> → <code class="notion-inline-code">Visualization</code>）；否则走 <code class="notion-inline-code">NoteTaker</code>。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f8135b063e51737629218" data-id="29b42f954c1f8135b063e51737629218"><span><div id="29b42f954c1f8135b063e51737629218" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f8135b063e51737629218" title="工作流图（Workflow）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">工作流图（Workflow）</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81beb721d36a685abf64"><li><code class="notion-inline-code">src/core/workflow.py</code> 中节点与边：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81beb721d36a685abf64"><li>节点：<code class="notion-inline-code">Hypothesis</code>、<code class="notion-inline-code">Process</code>、<code class="notion-inline-code">Visualization</code>、<code class="notion-inline-code">Search</code>、<code class="notion-inline-code">Coder</code>、<code class="notion-inline-code">Report</code>、<code class="notion-inline-code">QualityReview</code>、<code class="notion-inline-code">NoteTaker</code>、<code class="notion-inline-code">HumanChoice</code>、<code class="notion-inline-code">HumanReview</code>、<code class="notion-inline-code">Refiner</code>。</li><li>边与条件：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8133b912feb8db351f5a"><li><code class="notion-inline-code">START → Hypothesis → HumanChoice</code></li><li><code class="notion-inline-code">HumanChoice</code> 条件：<code class="notion-inline-code">Hypothesis</code> 或 <code class="notion-inline-code">Process</code></li><li><code class="notion-inline-code">Process</code> 条件：<code class="notion-inline-code">Coder | Search | Visualization | Report | Process | Refiner</code></li><li><code class="notion-inline-code">Visualization/Search/Coder/Report → QualityReview</code></li><li><code class="notion-inline-code">QualityReview</code> 条件：<code class="notion-inline-code">Visualization | Search | Coder | Report | NoteTaker</code></li><li><code class="notion-inline-code">NoteTaker → Process</code></li><li><code class="notion-inline-code">Refiner → HumanReview</code></li><li><code class="notion-inline-code">HumanReview</code> 条件：<code class="notion-inline-code">Process</code>（若 <code class="notion-inline-code">needs_revision=True</code>）或 <code class="notion-inline-code">END</code></li></ul><li>编译：使用 <code class="notion-inline-code">MemorySaver</code> 持久化检查点；<code class="notion-inline-code">self.graph = self.workflow.compile()</code>。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f816a8ff9e9e237e3a1f2"><li>ASCII 流程示意：</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f815fb77ffaecfb27f776" data-id="29b42f954c1f815fb77ffaecfb27f776"><span><div id="29b42f954c1f815fb77ffaecfb27f776" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f815fb77ffaecfb27f776" title="数据流与控制流"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">数据流与控制流</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f812fb6d1ec1f80a119c9"><li>消息流：各代理在 <code class="notion-inline-code">agent_node</code> 产生 <code class="notion-inline-code">AIMessage</code> 并追加到 <code class="notion-inline-code">messages</code>；人类交互节点产生 <code class="notion-inline-code">HumanMessage</code> 注入请求或选择。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81a8a385c9cc460508d6"><li>状态流：代理按职责更新相应字段；<code class="notion-inline-code">NoteAgent</code> 汇总与重构全局状态；路由器根据状态字段决定下一节点。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81bbaecdcb27706539ed"><li>终止条件：<code class="notion-inline-code">ProcessAgent</code> 输出 <code class="notion-inline-code">next=&quot;FINISH&quot;</code> 进入 <code class="notion-inline-code">Refiner</code>，<code class="notion-inline-code">HumanReview</code> 若无需继续（<code class="notion-inline-code">needs_revision=False</code>）则走 <code class="notion-inline-code">END</code>。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81229af1dfb4181ee334" data-id="29b42f954c1f81229af1dfb4181ee334"><span><div id="29b42f954c1f81229af1dfb4181ee334" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81229af1dfb4181ee334" title="扩展与自定义"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">扩展与自定义</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8198ada5d43793a55f9b"><li>新增代理：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8198ada5d43793a55f9b"><li>新建子类实现 <code class="notion-inline-code">_get_system_prompt()</code> 与 <code class="notion-inline-code">_get_tools()</code>；必要时定义 <code class="notion-inline-code">response_format</code>。</li><li>在 <code class="notion-inline-code">AgentFactory</code> 映射中加入代理名称；在 <code class="notion-inline-code">WorkflowManager.setup_workflow()</code> 中添加节点与边；在 <code class="notion-inline-code">router.py</code> 中补充路由逻辑。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81d3b054d4ce075f65a1"><li>切换/微调模型：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81d3b054d4ce075f65a1"><li>编辑 <code class="notion-inline-code">config/agent_models.yaml</code>，为目标代理选择 <code class="notion-inline-code">provider</code> 与 <code class="notion-inline-code">model_config</code>（如 <code class="notion-inline-code">temperature</code>、<code class="notion-inline-code">model</code>）。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81528bddc1b935f45156"><li>工具扩展：</li><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81528bddc1b935f45156"><li>在 <code class="notion-inline-code">src/tools/</code> 添加新工具并在对应代理的 <code class="notion-inline-code">_get_tools()</code> 返回；确保工具具备清晰的 <code class="notion-inline-code">name</code> 与输入/输出约定。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f8118b033d104e3c5239c" data-id="29b42f954c1f8118b033d104e3c5239c"><span><div id="29b42f954c1f8118b033d104e3c5239c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f8118b033d104e3c5239c" title="健壮性与限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">健壮性与限制</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f819a83afd842cd7cb4ce"><li>人类交互：<code class="notion-inline-code">human_choice_node</code> 与 <code class="notion-inline-code">human_review_node</code> 需要命令行输入，自动化运行时需替换或注入默认策略。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81a0b12af963f64c6257"><li>状态增长：长对话可能导致消息膨胀，<code class="notion-inline-code">note_agent_node</code> 采取头尾保留与中段裁剪以控制 token。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8168842bd714e6ab7d7d"><li>错误处理：<code class="notion-inline-code">agent_node</code> 与其他节点异常时会记录日志并将错误写入 <code class="notion-inline-code">messages</code>；<code class="notion-inline-code">system.py</code> 对缺失 API Key 进行提示。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81c68689c0dd8c6b0412"><li>模型依赖：默认配置使用 Google 提供者，需 <code class="notion-inline-code">GOOGLE_API_KEY</code>；其他提供者需相应凭据。</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f8157bd8cc8f2b196d8f1"><li>递归限制：<code class="notion-inline-code">run()</code> 使用 <code class="notion-inline-code">recursion_limit=3000</code>，注意在复杂循环下的性能与成本。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81cbbc4cd025697f674c" data-id="29b42f954c1f81cbbc4cd025697f674c"><span><div id="29b42f954c1f81cbbc4cd025697f674c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81cbbc4cd025697f674c" title="运行示例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">运行示例</span></span></h3><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81728858c5915cc11789"><li>在 <code class="notion-inline-code">DATAGEN/main.py</code> 中示例：</li></ul><ul class="notion-list notion-list-disc notion-block-29b42f954c1f81fead3afd35a1d57c46"><li>启动：在项目根目录执行 <code class="notion-inline-code">python DATAGEN/main.py</code>（确保虚拟环境与 API Key 就绪）。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29b42f954c1f81bf854fda2f00e1b481" data-id="29b42f954c1f81bf854fda2f00e1b481"><span><div id="29b42f954c1f81bf854fda2f00e1b481" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b42f954c1f81bf854fda2f00e1b481" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h3><div class="notion-text notion-block-29b42f954c1f81ffba4bc8d0ba85a2b1">DATAGEN 通过 LangGraph 的显式状态机与多代理协作，将数据分析流程拆解为可编排、可回路修正的模块化步骤。其清晰的配置—提供者—代理—工具—工作流分层使得扩展与替换变得简单，同时保留了人类在关键节点上的掌控力与质量闭环能力。</div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[LLM推理加速与投机解码]]></title>
        <id>https://blog.zzwopenai.com/LLM-SD</id>
        <link href="https://blog.zzwopenai.com/LLM-SD"/>
        <updated>2025-09-24T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[LLM推理加速与投机解码]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-27942f954c1f8023ba00f98ea568bfda"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-codepen notion-block-27942f954c1f80a0b0c1c30a18c98a0d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:1344px;max-width:100%;flex-direction:column;height:930px"><iframe class="notion-asset-object-fit" src="https://codepen.io/subway-chenyan/embed/preview/ByjorPB?default-tabs=html%2Cresult&amp;height=300&amp;host=https%3A%2F%2Fcodepen.io&amp;slug-hash=ByjorPB" title="iframe codepen" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure><div class="notion-blank notion-block-27942f954c1f80c3933cf1a3068dea37"> </div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[人格（下头）测试网站搭建记录]]></title>
        <id>https://blog.zzwopenai.com/xiatou</id>
        <link href="https://blog.zzwopenai.com/xiatou"/>
        <updated>2025-01-19T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[森罗万象专属下头测试网站搭建记录]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-18142f954c1f8088b232ddab5e964f43"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-18142f954c1f80a98feaf8934ff27045"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-e6a75e855a444d8994a27bd838ecf477"><b>森罗万象专属下头测试网站搭建记录！</b>
搭建流程主要如下几步：<b>测试题目格式化、网站搭建、UI优化、数值调整、项目部署、域名绑定、自动化推送
</b>使用工具：<b>Copilot（数据处理脚本编写）、Python（数据处理）、bolt（前端代码）、Vercel（部署）、cloudflare（域名绑定）</b>
除了修改部分参数，基本没有写代码，不得不感慨AI写代码的能力越来越强。</div></div></div><div class="notion-blank notion-block-18142f954c1f808eb510e7fd9c2dee71"> </div><blockquote class="notion-quote notion-block-18142f954c1f803d9841fcc1969771ef"><div><b>功能需求：</b></div><div class="notion-text notion-block-18142f954c1f800d84ace007ee25660f">1.题目分缺德/道德，行动/旁观两个维度。</div><hr class="notion-hr notion-block-18142f954c1f806cad70e96036f22438"/><div class="notion-text notion-block-18142f954c1f80ccacd2c5121619ffdb">2.共36道选择题题，其中缺德/道德共18题，理论题9道，情景题9道。行动/旁观共18题，理论题9到，情景题9道</div><hr class="notion-hr notion-block-18142f954c1f80219952fe786d424810"/><div class="notion-text notion-block-18142f954c1f800e8e86f34f6480ea29">3.理论题5个选项，得分-2 ~ +2分（-2，-1, 0 , 1 , 2 ），情景题3个选项得分-2 ~ +2分（-2, 0 , 2）分</div><hr class="notion-hr notion-block-18142f954c1f80679482f4d3a97a50b9"/><div class="notion-text notion-block-18142f954c1f80e090ffced3a88d82c6">4.道德-15到20，行动-10到10为正常人</div><hr class="notion-hr notion-block-18142f954c1f809bbd3afa50fec4d64e"/><div class="notion-text notion-block-18142f954c1f80b380bbd4f62ee3f40c">5.题目完成后填写基本信息，部分称号会根据信息而改变（下头男/下头女）</div><hr class="notion-hr notion-block-18142f954c1f8089b16ce8a4db4a44cb"/></blockquote><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80228554d26bd0479163"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:579.96875px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Feab95ec5-7c15-4fb9-9da8-90de504ce45e%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-8022-8554-d26bd0479163%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DuamcKIGdOgCXZJuQHW88EMMjqyyt7sxSZoPGys4H7hs?table=block&amp;id=18142f95-4c1f-8022-8554-d26bd0479163&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-18142f954c1f801399a2c2d368c1bed2" data-id="18142f954c1f801399a2c2d368c1bed2"><span><div id="18142f954c1f801399a2c2d368c1bed2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#18142f954c1f801399a2c2d368c1bed2" title="测试题目格式化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>测试题目格式化</b></span></span></h2><div class="notion-text notion-block-18142f954c1f80f0a197d7ce78bcc2d0">使用github的AI代码工具<b>Copilot</b>编写题目格式化代码，主要是将表格数据转为前端框架能直接使用的json格式；</div><div class="notion-text notion-block-18142f954c1f8099a2f2ffa9f6256d76">原始表格数据如下：</div><div class="notion-blank notion-block-18142f954c1f8005a44ec47cc97aba30"> </div><table class="notion-simple-table notion-block-18142f954c1f8079b450d8b47d5f9cf3"><tbody><tr class="notion-simple-table-row notion-block-18142f954c1f809e92bdfd4567a44052"><td class="" style="width:47px"><div class="notion-simple-table-cell"><b>序号</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>问题</b></div></td><td class="" style="width:101px"><div class="notion-simple-table-cell"><b>缺德—道德</b></div></td><td class="" style="width:98px"><div class="notion-simple-table-cell"><b>旁观—行动</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>选项（-2）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>-1</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>选项（0）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>1</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>选项（2）</b></div></td></tr><tr class="notion-simple-table-row notion-block-18142f954c1f80e09a7bc486762f1aff"><td class="" style="width:47px"><div class="notion-simple-table-cell">1</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">是否因为某件事，让关系还可以的朋友忽然渐行渐远</div></td><td class="" style="width:101px"><div class="notion-simple-table-cell">-5，-3，0，5，2</div></td><td class="" style="width:98px"><div class="notion-simple-table-cell">-2，-2，-1，2，0</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">发生过，知道自己的问题，不会道歉</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">感觉是误会，但就这样吧</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">知道错了，想过挽回，但差个契机</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">主动和别人道歉！</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">没干过这种事</div></td></tr></tbody></table><div class="notion-text notion-block-18142f954c1f809bb573da390aca78cf"><b>转换为json后</b></div><div class="notion-blank notion-block-18142f954c1f80b4bd93efa31ba8e628"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-18142f954c1f802588dcd0dfd0b9b827" data-id="18142f954c1f802588dcd0dfd0b9b827"><span><div id="18142f954c1f802588dcd0dfd0b9b827" class="notion-header-anchor"></div><a class="notion-hash-link" href="#18142f954c1f802588dcd0dfd0b9b827" title="网站搭建/UI优化/数值调整"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>网站搭建/UI优化/数值调整</b></span></span></h2><div class="notion-text notion-block-18142f954c1f809493edf05200968520">前端搭建/UI优化用bolt完全足够，这个工具应该是2024年给我冲击最大的AI工具了，一键生成完整的前后端框架，还带实时预览和项目部署。对于我这个前端知识基本为0的新手来说只需要给出明确的需求就能快速完成demo，个人工作量只在修改简单的逻辑bug和数值调整；</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80c49206ca4e333f42b2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fe405eaad-dbd3-4dac-8682-8c898fa8fa02%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-80c4-9206-ca4e333f42b2%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3D56MV503Id7BmCNNfa3LeBQZW0NRsTgIcVi-la_tihHQ?table=block&amp;id=18142f95-4c1f-80c4-9206-ca4e333f42b2&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80b1b168d8a3e8197ce1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Ffb4f6e56-feef-4256-9316-a13076caf90c%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-80b1-b168-d8a3e8197ce1%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DO_GeC4rAOPCN3yx86n9KWj--4jNluB4b3hLlWSfM-ro?table=block&amp;id=18142f95-4c1f-80b1-b168-d8a3e8197ce1&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-18142f954c1f80e4bea1fcc5b2dbf3be"> </div><div class="notion-blank notion-block-18142f954c1f8071a271f9848867d706"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-18142f954c1f80cc9a99ff4c053446c0" data-id="18142f954c1f80cc9a99ff4c053446c0"><span><div id="18142f954c1f80cc9a99ff4c053446c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#18142f954c1f80cc9a99ff4c053446c0" title="项目部署/自动化推送"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>项目部署/自动化推送</b></span></span></h2><div class="notion-text notion-block-18142f954c1f803890fddc339497a627">一开始部署是直接将代码包放进Vercel进行部署，后来因为有零零散散地修改，每次手动打包推送过于麻烦，于是采用github管理代码，vercel拉github仓库的形式进行部署，每当github接受到新的推送，vercel端可以检测改动重新拉代码进行部署；</div><div class="notion-text notion-block-18142f954c1f80848a6de0114f7e3f41"><b>自动部署参考链接：</b></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-18142f954c1f805f8d7ee3b26b89c9d4" href="https://blog.csdn.net/zhq426/article/details/143969104"><div><div class="notion-bookmark-title">Vercel 设置自动部署 GitHub 项目_vercel部署github-CSDN博客</div><div class="notion-bookmark-description">文章浏览阅读753次，点赞5次，收藏12次。通过配置 Vercel Deploy Hooks 和 GitHub Webhooks，可在免费计划下实现代码推送后自动触发部署。_vercel部署github</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fg.csdnimg.cn%2Fstatic%2Flogo%2Ffavicon32.ico?table=block&amp;id=18142f95-4c1f-805f-8d7e-e3b26b89c9d4&amp;cache=v2" alt="Vercel 设置自动部署 GitHub 项目_vercel部署github-CSDN博客" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://blog.csdn.net/zhq426/article/details/143969104</div></div></div></a></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80c6879cc4e2fe89f80b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fe72aa046-43a4-4f8c-b14c-2ecb2a5c0c8c%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-80c6-879c-c4e2fe89f80b%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DvNQWUfJGiD-VdpTdGK6Jj0oEj0n-5AcypkbwF6xd2jc?table=block&amp;id=18142f95-4c1f-80c6-879c-c4e2fe89f80b&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80e3ad0ae745ff1aaefa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fd5e784e6-1204-4c2f-a7ac-5c92b860f0f6%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-80e3-ad0a-e745ff1aaefa%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DG4b_TkAh2TdUAqt4QA5D1dzyJAEKxxtiOHgbIE_lE1s?table=block&amp;id=18142f95-4c1f-80e3-ad0a-e745ff1aaefa&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-18142f954c1f803ab07cc86f0be03ea7"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-18142f954c1f8030a21cf33ac8838a34" data-id="18142f954c1f8030a21cf33ac8838a34"><span><div id="18142f954c1f8030a21cf33ac8838a34" class="notion-header-anchor"></div><a class="notion-hash-link" href="#18142f954c1f8030a21cf33ac8838a34" title="域名绑定"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>域名绑定</b></span></span></h2><div class="notion-text notion-block-18142f954c1f80f6b65bd5e3e4b096e3">vercel部署的域名国内访问可能受限，对不能翻墙的朋友不太友好，于是绑了之前搭lobechat的域名，域名托管在cloudflare上，在vercel和cloudflare上分别设置下子域名和DNS记录就完工勒！</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80469392c2ca31a31a76"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Faa941c18-7141-49fa-a951-7b7a5329597a%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-8046-9392-c2ca31a31a76%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DhnpBs37L8XzI9MAhzeGGuwItPzKiRtRSTRdKmjqkSmY?table=block&amp;id=18142f95-4c1f-8046-9392-c2ca31a31a76&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-18142f954c1f80dd982ce3f7d7f6b791"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fffbd4089-8e97-48c0-842a-fb6251470a39%2Fimage.png%3Ftable%3Dblock%26id%3D18142f95-4c1f-80dd-982c-e3f7d7f6b791%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DuP3sFZoEJO05mrUsgJTsFHAGaolikRq-9hv9DA8u4T8?table=block&amp;id=18142f95-4c1f-80dd-982c-e3f7d7f6b791&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-18142f954c1f80e8a174fdaa480a20b6"> </div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[Searxng折腾记录]]></title>
        <id>https://blog.zzwopenai.com/searxng</id>
        <link href="https://blog.zzwopenai.com/searxng"/>
        <updated>2024-11-11T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[AI联网搜索插件Searxng搭建记录]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-13c42f954c1f80af8d87ee78f973a764"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-13c42f954c1f80a18619efbc3100c28b"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2bea702a31ba4cdeb44f54ddf49ffd26">尝试给AI bot接入联网搜索功能，基于Searxng进行集合搜索；
网上教程不多，在设置代理方面遇到很多坑，折腾一整天最后发现是linux系统下clash的allow_lan没开…
但是解决的过程中也是学到不少知识点，在此整理一下；</div></div></div><div class="notion-blank notion-block-13c42f954c1f80f6ab25d684bc9ceff1"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-13c42f954c1f80329036f8a68744d982" data-id="13c42f954c1f80329036f8a68744d982"><span><div id="13c42f954c1f80329036f8a68744d982" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80329036f8a68744d982" title="Searxng介绍"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Searxng介绍</span></span></h2><div class="notion-text notion-block-13c42f954c1f80a8ad1fe5f1d2475eb9">SearXNG 是一个免费开源的互联网元搜索引擎，它汇总了来自 Google、Bing、Yahoo等70 多个搜索服务的结果，用户既不被跟踪也不被分析。</div><div class="notion-text notion-block-13c42f954c1f800994a4d2d204ae53d7">因为是汇总了很多国外引擎的搜索结果，所以说要有科学的网络环境才能有优质的体验。</div><div class="notion-text notion-block-13c42f954c1f805dab6aedac0558dffb">官方Demo：</div><div class="notion-text notion-block-13c42f954c1f80a5a83ac7e90b58bf18"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://searx.space/">https://searx.space/</a></div><div class="notion-text notion-block-13c42f954c1f80b68fdad071d12a9f8f">GitHub地址：</div><div class="notion-text notion-block-13c42f954c1f804eb208cc016f50034f"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/searxng/searxng">https://github.com/searxng/searxng</a></div><div class="notion-text notion-block-13c42f954c1f80bdb4ddfc715483f7b4">Docker仓库地址：</div><div class="notion-text notion-block-13c42f954c1f80f89e74f172ea8209ea"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/searxng/searxng-docker">https://github.com/searxng/searxng-docker</a></div><div class="notion-text notion-block-13c42f954c1f80ec93ebdf47d163c9ae">官方文档地址：</div><div class="notion-text notion-block-13c42f954c1f80908e03c114cd0c5ec0"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://docs.searxng.org/">https://docs.searxng.org/</a></div><div class="notion-blank notion-block-13c42f954c1f8011aec1dfa4340c8e8b"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-13c42f954c1f80449f74cf2751f0bff6" data-id="13c42f954c1f80449f74cf2751f0bff6"><span><div id="13c42f954c1f80449f74cf2751f0bff6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80449f74cf2751f0bff6" title="部署"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">部署</span></span></h2><div class="notion-text notion-block-13c42f954c1f80e998f7dd85e240c9f9">因为是作为AI BOT插件使用，部署的是bot官方推荐的阉割修改版，部署流程如下：</div><div class="notion-text notion-block-13c42f954c1f800bbe12d88f9905437b">Linux 部署 SearXNG：</div><div class="notion-blank notion-block-13c42f954c1f80159871db39e2edaba4"> </div><div class="notion-callout notion-gray_background_co notion-block-13c42f954c1f80818247e2e4fc193c61"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-1a6bf156f8d34ff8aeb08ea9dfbc5bc8"><span class="notion-red"><b>这里遇到第一个坑！</b></span></div><div class="notion-text notion-block-13c42f954c1f805e8bb4d31946aef7b8">容器启动时会创建uwsgi.ini，但是会没有权限创建，导致启动过程一直restarting</div><div class="notion-text notion-block-13c42f954c1f8075ab82da0e52fe7386">可以通过查询容器的logs定位错误：<code class="notion-inline-code">docker logs searxng</code></div><div class="notion-text notion-block-13c42f954c1f80b1ae5fe014dbb2f6cd">解决方法：使用<code class="notion-inline-code">chmod -R 777 searxng</code> 修改项目文件夹的权限； </div></div></div><div class="notion-text notion-block-13c42f954c1f802eb380e8f386b3f793">容器启动后即可以访问前端搜索页面，该项目默认是：<code class="notion-inline-code"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://127.0.0.1:8080/">http://127.0.0.1:8080/</a></code></div><div class="notion-text notion-block-13c42f954c1f80c9b422ccba8e6b87d9">此时只可以搜索国内能直连的搜索引擎，下一步开始设置代理。</div><div class="notion-blank notion-block-13c42f954c1f80f2a788c94433151070"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-13c42f954c1f80bda2feec0f2c6e0b79" data-id="13c42f954c1f80bda2feec0f2c6e0b79"><span><div id="13c42f954c1f80bda2feec0f2c6e0b79" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80bda2feec0f2c6e0b79" title="代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">代理</span></span></h2><div class="notion-text notion-block-13c42f954c1f80b0bbd9d5ce34b95bd2"><b>配置 Docker 容器使用代理的流程及注意事项</b></div><div class="notion-text notion-block-13c42f954c1f80489097c6b56b44cf14">在 Docker 容器中使用主机上的代理，需要进行一系列配置，以确保容器能够正确地通过代理访问外部网络。以下是详细的配置步骤和过程中需要注意的事项，包括 Docker 网络模式对代理设置的影响。</div><hr class="notion-hr notion-block-13c42f954c1f805d9cb7c68e6b2855a1"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-13d42f954c1f80059304e8f87cdd5c5d" data-id="13d42f954c1f80059304e8f87cdd5c5d"><span><div id="13d42f954c1f80059304e8f87cdd5c5d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13d42f954c1f80059304e8f87cdd5c5d" title="步骤一：确保代理服务器正常运行"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤一：确保代理服务器正常运行</b></span></span></h3><div class="notion-text notion-block-13c42f954c1f8000b4d9cd451b02ce9f">首先，确认您的代理服务器（例如 Clash）在主机上正常运行，并监听正确的端口。</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f803fa911c144e4c750d6"><li><b>检查代理服务器状态</b></li></ul><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80e5b72ef49dcdbee063"><li><b>启动代理服务器</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80e5b72ef49dcdbee063"><div class="notion-text notion-block-13c42f954c1f80cc9c78fbae98806eeb">如果代理未运行，请启动代理。例如，对于 Clash：</div><div class="notion-text notion-block-13c42f954c1f809d8864d7fd1ddf959b"><code class="notion-inline-code">./clash -f 配置文件.yaml</code></div></ul></ul><hr class="notion-hr notion-block-13c42f954c1f80fca20af4d67ab96758"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-13c42f954c1f8061b8d2fc7d6638e645" data-id="13c42f954c1f8061b8d2fc7d6638e645"><span><div id="13c42f954c1f8061b8d2fc7d6638e645" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f8061b8d2fc7d6638e645" title="步骤二：修改代理配置，允许容器访问"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤二：修改代理配置，允许容器访问</b></span></span></h3><div class="notion-text notion-block-13c42f954c1f804c94d0efece8685f87">默认情况下，代理服务器可能只监听 <code class="notion-inline-code">127.0.0.1</code>，这意味着只能从本地主机访问。为了让 Docker 容器能够访问代理，需要修改代理配置，使其监听所有网络接口并允许 LAN 访问。</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f806393a5e0d729bf520f"><li><b>修改 Clash 配置文件</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f806393a5e0d729bf520f"><div class="notion-text notion-block-13c42f954c1f80e5babccf35c15533dd">在 Clash 的配置文件（如 <code class="notion-inline-code">config.yaml</code> 或 <code class="notion-inline-code">glados.yaml</code>）中，设置以下参数：</div></ul></ul><div class="notion-blank notion-block-13c42f954c1f80ab99b6dd9df2044d38"> </div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80d59f84e37bfe0a0f6e"><li><b>重启代理服务器</b></li></ul><hr class="notion-hr notion-block-13c42f954c1f8037ab88f62d8d0461bd"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-13c42f954c1f801ea559f6c28701e182" data-id="13c42f954c1f801ea559f6c28701e182"><span><div id="13c42f954c1f801ea559f6c28701e182" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f801ea559f6c28701e182" title="步骤三：设置代理环境变量"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤三：设置代理环境变量</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-13c42f954c1f802b8ad8fffe9461c278" data-id="13c42f954c1f802b8ad8fffe9461c278"><span><div id="13c42f954c1f802b8ad8fffe9461c278" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f802b8ad8fffe9461c278" title="方法1：在 Docker 容器中设置代理环境变量(不推荐)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">方法1：<b>在 Docker 容器中设置代理环境变量(不推荐)</b></span></span></h4><div class="notion-text notion-block-13c42f954c1f804795f8e1a2ad0aa964">在 <code class="notion-inline-code">docker-compose.yaml</code> 文件中，为需要使用代理的服务添加环境变量，并确保容器能够访问主机的代理端口。</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80909bd2cdb89b897822"><li><b>获取主机的 Docker 网桥 IP</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80909bd2cdb89b897822"><div class="notion-text notion-block-13c42f954c1f80d3968ce053fcc26c49">通常，Docker 网桥（<code class="notion-inline-code">docker0</code>）的 IP 是 <code class="notion-inline-code">172.17.0.1</code>。可以通过以下命令确认：</div><div class="notion-text notion-block-13c42f954c1f8013b9c9e53adb9db19d"><code class="notion-inline-code">ip addr show docker0 | grep &quot;inet\b&quot;</code></div></ul></ul><ul class="notion-list notion-list-disc notion-block-13c42f954c1f804cbe91ced1ecbe6dd7"><li><b>修改 </b><code class="notion-inline-code"><b>docker-compose.yaml</b></code></li></ul><div class="notion-text notion-block-13c42f954c1f80f0b08af1e7309994f8"><b>注意</b>：在 Linux 上，<code class="notion-inline-code">host.docker.internal</code> 默认不可用，需要使用主机的 IP 地址。</div><hr class="notion-hr notion-block-13c42f954c1f80c081e5dcb825f2135f"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-13c42f954c1f80a98c01eedfc826bf9f" data-id="13c42f954c1f80a98c01eedfc826bf9f"><span><div id="13c42f954c1f80a98c01eedfc826bf9f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80a98c01eedfc826bf9f" title="方法2：配置应用程序的代理设置（推荐）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">方法2<b>：配置应用程序的代理设置（推荐）</b></span></span></h4><div class="notion-text notion-block-13c42f954c1f802fb5d7d7a2ff277844">如果应用程序有自己的代理配置文件（例如 settings.yml），需要在其中指定代理。</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8000a83fdcd7540f4a16"><li><b>修改 settings.yml</b></li></ul><hr class="notion-hr notion-block-13c42f954c1f806f8a3aec7a54c25e77"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-13c42f954c1f8030987fd5bd300d3915" data-id="13c42f954c1f8030987fd5bd300d3915"><span><div id="13c42f954c1f8030987fd5bd300d3915" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f8030987fd5bd300d3915" title="步骤五：重启 Docker 容器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤五：重启 Docker 容器</b></span></span></h4><div class="notion-text notion-block-13c42f954c1f8010bca1ebd2c18f7386">在完成以上配置后，重启 Docker 容器使更改生效。</div><hr class="notion-hr notion-block-13c42f954c1f807aaac4f2d40498d3b0"/><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-13c42f954c1f80a49364f7437f2b85c1" data-id="13c42f954c1f80a49364f7437f2b85c1"><span><div id="13c42f954c1f80a49364f7437f2b85c1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80a49364f7437f2b85c1" title="坑和注意事项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>坑和注意事项</b></span></span></h2><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-13c42f954c1f8063b769e98d08299025" data-id="13c42f954c1f8063b769e98d08299025"><span><div id="13c42f954c1f8063b769e98d08299025" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f8063b769e98d08299025" title="1. 容器无法访问主机的 127.0.0.1"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 容器无法访问主机的 </b><code class="notion-inline-code"><b>127.0.0.1</b></code></span></span></h4><div class="notion-text notion-block-13c42f954c1f80338e04e33bbf965999">在 Docker 的默认 <code class="notion-inline-code">bridge</code> 网络模式下，容器的 <code class="notion-inline-code">127.0.0.1</code> 指向容器自身，而非主机。因此，直接使用 <code class="notion-inline-code">127.0.0.1</code> 无法访问主机的代理服务。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-13c42f954c1f8042ad98c9bd9cec63d4" data-id="13c42f954c1f8042ad98c9bd9cec63d4"><span><div id="13c42f954c1f8042ad98c9bd9cec63d4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f8042ad98c9bd9cec63d4" title="2. host.docker.internal 在 Linux 上不可用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. </b><code class="notion-inline-code"><b>host.docker.internal</b></code><b> 在 Linux 上不可用</b></span></span></h4><div class="notion-text notion-block-13c42f954c1f80eb971bf55b68349d25"><code class="notion-inline-code">host.docker.internal</code> 是 Docker 在 macOS 和 Windows 上提供的特殊主机名，用于让容器访问主机。但在 Linux 上默认不可用。解决办法：</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f80d78819e841c562aef3"><li><b>在 </b><code class="notion-inline-code"><b>docker-compose.yaml</b></code><b> 中添加 </b><code class="notion-inline-code"><b>extra_hosts</b></code></li></ul><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8070ab33d504ff084a8e"><li><b>或者直接使用主机的 IP 地址</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8070ab33d504ff084a8e"><div class="notion-text notion-block-13c42f954c1f80c2918ac2b2d3da09a6">在环境变量和配置文件中使用 <code class="notion-inline-code">172.17.0.1</code>。</div></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-13c42f954c1f805e9d40e0435fe96266" data-id="13c42f954c1f805e9d40e0435fe96266"><span><div id="13c42f954c1f805e9d40e0435fe96266" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f805e9d40e0435fe96266" title="3. 代理服务器只监听 127.0.0.1"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 代理服务器只监听 </b><code class="notion-inline-code"><b>127.0.0.1</b></code></span></span></h4><div class="notion-text notion-block-13c42f954c1f80f19bc9f6da9b7072df">需要将代理服务器的监听地址修改为 <code class="notion-inline-code">0.0.0.0</code>，以允许来自容器的连接。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-13c42f954c1f80f98d8ed241ea6c21e8" data-id="13c42f954c1f80f98d8ed241ea6c21e8"><span><div id="13c42f954c1f80f98d8ed241ea6c21e8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80f98d8ed241ea6c21e8" title="4. Docker 网络模式对代理设置的影响"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4. Docker 网络模式对代理设置的影响</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-13c42f954c1f809bac12c73745f7a8b7"><li><b>Bridge 模式（默认）</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f809bac12c73745f7a8b7"><li><b>特点</b>：容器有独立的网络命名空间，<code class="notion-inline-code">127.0.0.1</code> 指向容器自身。</li><li><b>影响</b>：需要使用主机在容器网络中的 IP 地址（如 <code class="notion-inline-code">172.17.0.1</code>）访问主机服务。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8067870ace03579d3d67"><li><b>Host 模式</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8067870ace03579d3d67"><li><b>特点</b>：容器与主机共享网络命名空间，<code class="notion-inline-code">127.0.0.1</code> 指向主机。</li><li><b>影响</b>：容器可以直接访问主机的服务，但端口映射失效，可能导致端口冲突。</li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-13c42f954c1f80b1932ad190bbbf3e66" data-id="13c42f954c1f80b1932ad190bbbf3e66"><span><div id="13c42f954c1f80b1932ad190bbbf3e66" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80b1932ad190bbbf3e66" title="5. 防火墙限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>5. 防火墙限制</b></span></span></h4><div class="notion-text notion-block-13c42f954c1f80c287f3e842f6c80ab3">确保主机的防火墙未阻止容器访问代理端口 <code class="notion-inline-code">7890</code> 和 <code class="notion-inline-code">7891</code>。</div><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8063a3aae84f28a7ba5b"><li><b>检查防火墙状态</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f8063a3aae84f28a7ba5b"><div class="notion-text notion-block-13c42f954c1f805891abd72af2099042"><code class="notion-inline-code">sudo ufw status</code></div></ul></ul><ul class="notion-list notion-list-disc notion-block-13c42f954c1f800caad4e891e6f5dd99"><li><b>允许端口访问</b></li><ul class="notion-list notion-list-disc notion-block-13c42f954c1f800caad4e891e6f5dd99"><div class="notion-text notion-block-13c42f954c1f80f489cac2a3bc6c5905"><code class="notion-inline-code">sudo ufw allow 7890</code></div><div class="notion-text notion-block-13c42f954c1f80f497d0f7591c3f21e8"><code class="notion-inline-code">sudo ufw allow 7891</code></div></ul></ul><hr class="notion-hr notion-block-13c42f954c1f80148f05c2f42aa2b4b6"/><div class="notion-blank notion-block-13c42f954c1f800b9601cd1cb51f12fd"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-13c42f954c1f80fba2d6c7751cc49408" data-id="13c42f954c1f80fba2d6c7751cc49408"><span><div id="13c42f954c1f80fba2d6c7751cc49408" class="notion-header-anchor"></div><a class="notion-hash-link" href="#13c42f954c1f80fba2d6c7751cc49408" title="参考"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考</span></span></h2><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-13c42f954c1f80b78954f801eb273932" href="https://fantasyplayer.link/periphery/%E4%BD%BF%E7%94%A8docker-%E6%90%AD%E5%BB%BAsearxng%E6%9C%8D%E5%8A%A1-%E4%B8%80%E4%B8%AA%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E%E8%81%9A%E5%90%88%E5%B7%A5%E5%85%B7/"><div><div class="notion-bookmark-title">使用docker 搭建searxng服务 - 一个搜索引擎聚合工具</div><div class="notion-bookmark-description">github: https://github.com/searxng/searxng 容器的github地址： https://github.com/searxng/searxng-docker 一些不完全的文档： https://docs.searxng.org/admin/index.html 主要内容 安装使用下面的步骤来安装， 翻译自 searxng-docker 的仓库： 安装docker 从github上把仓库 克</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Ffantasyplayer.link%2Fapple-touch-icon.png?table=block&amp;id=13c42f95-4c1f-80b7-8954-f801eb273932&amp;cache=v2" alt="使用docker 搭建searxng服务 - 一个搜索引擎聚合工具" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://fantasyplayer.link/periphery/%E4%BD%BF%E7%94%A8docker-%E6%90%AD%E5%BB%BAsearxng%E6%9C%8D%E5%8A%A1-%E4%B8%80%E4%B8%AA%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E%E8%81%9A%E5%90%88%E5%B7%A5%E5%85%B7/</div></div></div></a></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-13c42f954c1f803996fad4ff2d8b26e9" href="https://www.monoko.jp/docker-searxng/"><div><div class="notion-bookmark-title">搭建一个自己的搜索引擎—SearXNG - Yume.KISEKI</div><div class="notion-bookmark-description">把docker仓库内的文件克隆过来并进入searxng-docker文件夹内</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fwww.monoko.jp%2Fwp-content%2Fuploads%2F2022%2F10%2Fearthstars.png?table=block&amp;id=13c42f95-4c1f-8039-96fa-d4ff2d8b26e9&amp;cache=v2" alt="搭建一个自己的搜索引擎—SearXNG - Yume.KISEKI" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://www.monoko.jp/docker-searxng/</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fwww.monoko.jp%2Fwp-content%2Fuploads%2F2022%2F11%2Fsearxng1.jpg?table=block&amp;id=13c42f95-4c1f-8039-96fa-d4ff2d8b26e9&amp;cache=v2" alt="搭建一个自己的搜索引擎—SearXNG - Yume.KISEKI" loading="lazy" decoding="async"/></div></a></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-13c42f954c1f803d9928edded032cbf6" href="https://kebingzao.com/2019/02/22/docker-container-proxy/"><div><div class="notion-bookmark-title">docker 容器内使用宿主机的代理配置</div><div class="notion-bookmark-description">前言之前在用docker安装golang 版本的时候，有出现过一种情况，就是宿主机有设置代理，但在docker的容器内(container)下载golang依赖资源的时候，却不能使用宿主机的代理设置，所以下载依赖就会失败。举个例子，我run了一个 docker 的容器，基于 go10.1 这个go版本。1[root@VM_156_200_centos docker-go1.10]# sudo do</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fkebingzao.com%2Fimages%2Fapple-touch-icon-next.png%3Fv%3D5.1.4?table=block&amp;id=13c42f95-4c1f-803d-9928-edded032cbf6&amp;cache=v2" alt="docker 容器内使用宿主机的代理配置" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://kebingzao.com/2019/02/22/docker-container-proxy/</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fkebingzao.com%2F2019%2F02%2F22%2Fdocker-container-proxy%2F2.png?table=block&amp;id=13c42f95-4c1f-803d-9928-edded032cbf6&amp;cache=v2" alt="docker 容器内使用宿主机的代理配置" loading="lazy" decoding="async"/></div></a></div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[Nginx 反向代理]]></title>
        <id>https://blog.zzwopenai.com/proxy</id>
        <link href="https://blog.zzwopenai.com/proxy"/>
        <updated>2024-05-26T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[使用Nginx 反向代理，隐藏端口访问]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-d6dd20e50274463c90a7dd7a5939fe55"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-ac569aff2f28479092d5b1df55568e50" data-id="ac569aff2f28479092d5b1df55568e50"><span><div id="ac569aff2f28479092d5b1df55568e50" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ac569aff2f28479092d5b1df55568e50" title="从安装 Nginx 开始配置反向代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>从安装 Nginx 开始配置反向代理</b></span></span></h2><div class="notion-text notion-block-4d61045287ab487cbc5e8d2e224269e9"><b>Ubuntu 系统：</b></div><div class="notion-text notion-block-7a8e74ecd3ad4438ab9206b291c658fb"><b>1. 更新软件包列表：</b></div><div class="notion-text notion-block-1ee3737ec2d2406fa0c03e8cf6915048"><code class="notion-inline-code">sudo apt update</code></div><div class="notion-text notion-block-f0aaa49e087c4d409b2f89bcd645a353"><b>2. 安装 Nginx：</b></div><div class="notion-text notion-block-f00a35ab67fa478f95e24cd97ed45179"><code class="notion-inline-code">sudo apt install nginx</code></div><div class="notion-text notion-block-888dec88767d4a869e25a1d417cd3319"><b>3. 启动 Nginx：</b></div><div class="notion-text notion-block-011c6094cc504ac99fb8a77da3638f2a"><code class="notion-inline-code">sudo systemctl start nginx</code></div><div class="notion-text notion-block-29894a1878fa47bbb028a1967fc26ca7"><b>4. 检查 Nginx 状态：</b></div><div class="notion-text notion-block-f99a7fbfbc014a16808dd4b586b651c0"><code class="notion-inline-code">sudo systemctl status nginx</code></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a885b00078264c79a9c677ba3f5ac038" data-id="a885b00078264c79a9c677ba3f5ac038"><span><div id="a885b00078264c79a9c677ba3f5ac038" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a885b00078264c79a9c677ba3f5ac038" title="配置反向代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>配置反向代理</b></span></span></h2><div class="notion-text notion-block-835d02f34cfe40ce9ef6afc70361e032"><b>1. 创建 Nginx 配置文件：</b></div><div class="notion-text notion-block-1a67109d23d74ca89bfb1a7293cdaa12">在 /etc/nginx/conf.d/ 目录下创建一个新的配置文件，例如 chat-plus.conf，并添加以下内容：</div><div class="notion-callout notion-gray_background_co notion-block-64376376e5644c228556a92860872595"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><b>2.解释：</b><ul class="notion-list notion-list-disc notion-block-de284123fbf04bc39fa39855f52d4b9e"><li>listen 80;: 监听 80 端口，即 HTTP 默认端口。</li></ul><ul class="notion-list notion-list-disc notion-block-4d2144b8774c49c7b6908e7203d19345"><li>server_name chat-plus.zzwopenai.com;: 设置域名，所有访问该域名的请求都会被此配置处理。</li></ul><ul class="notion-list notion-list-disc notion-block-67a7fd26917d4236bf7183263faf6ad5"><li>location /: 匹配所有路径，将请求转发到 http://localhost:8080/。</li></ul><ul class="notion-list notion-list-disc notion-block-a8ed4c604fee494498cca67638d24eb1"><li>proxy_set_header: 设置一些 HTTP 头信息，用于传递客户端真实 IP 和主机名等信息。</li></ul></div></div><div class="notion-text notion-block-501eb161db4d4731af32526432575ede"><b>3.测试配置：</b></div><div class="notion-text notion-block-25ed2eedfc944475bf0489cd1f369f78"><code class="notion-inline-code">sudo nginx -t</code></div><div class="notion-text notion-block-d25953cb958e403c8497509dd4db0014"><b>4. 重启 Nginx：</b></div><div class="notion-text notion-block-66ceea6faee24cf0915a8340869015d5"><code class="notion-inline-code">sudo systemctl restart nginx</code></div><div class="notion-text notion-block-6dcac2d3c91745f3b2b43b1933ad831a"><b>5. 访问测试：</b></div><div class="notion-text notion-block-292b11e8a81c4b4283e6ccef052cc254">通过浏览器访问自定义域名来测试反向代理是否生效。</div><div class="notion-text notion-block-a04bd9cf8a1c46acab02ef1a25d4ba36"><b>请注意：</b></div><ul class="notion-list notion-list-disc notion-block-cc61ff43cb99416c988a11ef5ebe5e9a"><li>确保域名已经解析到您的服务器 IP 地址。</li></ul><ul class="notion-list notion-list-disc notion-block-3c8131b80f3541b6ad8b21d24d1adfb9"><li>确保应用程序正在 8080 端口上运行。</li></ul><ul class="notion-list notion-list-disc notion-block-08b88c01939b42e3a1240ba2f681e874"><li>根据需要调整配置文件，例如添加 HTTPS 支持、配置缓存等。</li></ul><div class="notion-blank notion-block-fbccde1293544a8eadb4989f0b7bed63"> </div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[尝试用AI写一个小游戏]]></title>
        <id>https://blog.zzwopenai.com/game</id>
        <link href="https://blog.zzwopenai.com/game"/>
        <updated>2024-05-26T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[尝试用ai写个简单的跳跃游戏]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-3ce2e2c21be14548932a727d771e6142"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-6f3b072647084f7d875cd367f8439fa3"><div><b>使用大语言模型工具为chatgpt-4o模型和gemini1.5flash模型，前者拆解需求，后者编写代码；
使用绘图工具为dalle-3，生成背景图片和障碍物；
音效从FREESOUND淘的；</b></div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-80fef72eb0f54ca3a02bf36d2980bbd2" data-id="80fef72eb0f54ca3a02bf36d2980bbd2"><span><div id="80fef72eb0f54ca3a02bf36d2980bbd2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#80fef72eb0f54ca3a02bf36d2980bbd2" title="制作截图："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>制作截图：</b></span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-4b7943e7c7f544bb96645b7ce448a0b7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:689px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fb8172f2a-26cc-4a79-8fbc-7f15eb8adf6c%2FUntitled.png%3Ftable%3Dblock%26id%3D4b7943e7-c7f5-44bb-9664-5b7ce448a0b7%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DhYyUEv0EAFyXjm0082tkjVQHLTim8BWmVM4-uYzOjc4?table=block&amp;id=4b7943e7-c7f5-44bb-9664-5b7ce448a0b7&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-e1a243e179744c0b95e8ba410170bc6f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fa882bb08-923e-4168-bfe9-1ba98df30567%2FUntitled.png%3Ftable%3Dblock%26id%3De1a243e1-7974-4c0b-95e8-ba410170bc6f%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DqD-RlVhOlkRUAV8WkVcJSBDh5WFlbkUL2Jf32PBdblw?table=block&amp;id=e1a243e1-7974-4c0b-95e8-ba410170bc6f&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d2b91d562e1041deabc0c3854f43a3c1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fac75f349-1784-4f1e-94a8-fc1d98c05feb%2FUntitled.png%3Ftable%3Dblock%26id%3Dd2b91d56-2e10-41de-abc0-c3854f43a3c1%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DFpSq7a0atfFEtEhwIJJBs_bwQKoQjpvS5RO9fWkRZDw?table=block&amp;id=d2b91d56-2e10-41de-abc0-c3854f43a3c1&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-dea59cef73334b10bf19123e6edd1c6a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fa16f3f16-39f4-4ab1-b36b-6ba6802dce91%2FUntitled.png%3Ftable%3Dblock%26id%3Ddea59cef-7333-4b10-bf19-123e6edd1c6a%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3D2jSE6Hq01VRMTbglBLApnoTlnHcp7k0YIY1-K6WTgnM?table=block&amp;id=dea59cef-7333-4b10-bf19-123e6edd1c6a&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-callout notion-gray_background_co notion-block-2fcb93053ee446e9805cabec9d687c29"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">”开发一个复古风格的无尽奔跑游戏，包括跳跃和躲避障碍的机制。其中障碍物体会向左侧移动，主人公只<div class="notion-text notion-block-85ae3c6a487a47dfab08909352ce2a35">能通过向上跳跃的方式躲避，如果未成功躲避，则游戏结束。可以使用像素风格表示主人公和障碍物，也</div><div class="notion-text notion-block-d136ac1217f44b4e99ce3f3654222edd">可以采用其他图形。每跨越一个障碍物，需要至少加 1 分，随着分数增高，游戏节奏需加快（3 分一个挡</div><div class="notion-text notion-block-fd5ee69a64ab4a909b3808fcbea689ca">位）。游戏需显示当前得分，结束时显示总分。“</div><div class="notion-text notion-block-e6d156c6ed554bd1ad6b23ae38ae943a"><b>请将以上的需求整理成一条条的需求清单，针对每一条细化需求指向和给出具体的实现方式</b></div></div></div><div class="notion-callout notion-gray_background_co notion-block-fd64a28ac2984758b5f41df0bef60f12"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="✅">✅</span></div><div class="notion-callout-text"><b>GPT-4o</b><h3 class="notion-h notion-h2 notion-block-01e7699693254fc296407eb89dc5d5a8" data-id="01e7699693254fc296407eb89dc5d5a8"><span><div id="01e7699693254fc296407eb89dc5d5a8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#01e7699693254fc296407eb89dc5d5a8" title="复古风格无尽奔跑游戏需求清单"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">复古风格无尽奔跑游戏需求清单</span></span></h3><div class="notion-text notion-block-df6c1a5333834f7088936bc96413eca8"><b>1. 游戏核心机制:</b></div><ul class="notion-list notion-list-disc notion-block-46a772f9f06f4c8eab2a16214aadd296"><li><b>需求指向:</b> 游戏需要实现经典的无尽奔跑玩法，玩家控制角色持续前进，并通过跳跃躲避障碍物。</li></ul><ul class="notion-list notion-list-disc notion-block-92404248a2bd44daa8bea2711ccd08d7"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-92404248a2bd44daa8bea2711ccd08d7"><li>使用循环机制，让角色持续向前移动。</li><li>设计障碍物生成机制，随机生成不同类型的障碍物。</li><li>实现跳跃机制，玩家控制角色向上跳跃，并控制跳跃高度。</li><li>判定碰撞机制，检测角色与障碍物之间的碰撞，碰撞则游戏结束。</li></ul></ul><div class="notion-text notion-block-ba4c86a9dde84cd29168a48f03eb09a4"><b>2. 障碍物移动:</b></div><ul class="notion-list notion-list-disc notion-block-b86e0fea28c9460da4ce5e207f71b627"><li><b>需求指向:</b> 障碍物需要持续向左侧移动，模拟角色不断前进的场景。</li></ul><ul class="notion-list notion-list-disc notion-block-2aaf1fc280004aabb60be2b6f6357e36"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-2aaf1fc280004aabb60be2b6f6357e36"><li>为每个障碍物设置一个速度值，并使用计时器控制障碍物位置的更新。</li><li>障碍物速度随着游戏进行而逐渐加快。</li></ul></ul><div class="notion-text notion-block-591ca90c442243308f8968325ccbdc59"><b>3. 角色控制:</b></div><ul class="notion-list notion-list-disc notion-block-73b3a7338a1b4c94a1b4078fe229e0ae"><li><b>需求指向:</b> 玩家需要控制角色进行跳跃，躲避障碍物。</li></ul><ul class="notion-list notion-list-disc notion-block-b28224e81d484954b8f783e3f4fba876"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-b28224e81d484954b8f783e3f4fba876"><li>使用键盘或触控方式作为输入方式，控制角色进行跳跃。</li><li>通过按键或触控的持续时间控制跳跃高度。</li></ul></ul><div class="notion-text notion-block-a232cba3c4c44c5b97c916718e6d0fdd"><b>4. 计分机制:</b></div><ul class="notion-list notion-list-disc notion-block-99aeac126858435ba4e7cd503f74ba1a"><li><b>需求指向:</b> 每跨越一个障碍物，玩家需要获得至少 1 分。</li></ul><ul class="notion-list notion-list-disc notion-block-d603a636d84740e988e6fc8e4439df60"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-d603a636d84740e988e6fc8e4439df60"><li>使用计数器记录玩家跨越的障碍物数量。</li><li>当角色成功越过障碍物时，计数器加 1。</li><li>显示当前分数。</li></ul></ul><div class="notion-text notion-block-5c51c790c50946da9bf0a70d29c5e5cb"><b>5. 游戏节奏加速:</b></div><ul class="notion-list notion-list-disc notion-block-3550172b59f44e7a97196a70b123289e"><li><b>需求指向:</b> 随着玩家分数的增加，游戏节奏需要加快。</li></ul><ul class="notion-list notion-list-disc notion-block-7a7b91708b704b27a8c696944a5f86c0"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-7a7b91708b704b27a8c696944a5f86c0"><li>每 3 分为一个档位，当分数达到每个档位时，增加障碍物速度或生成频率。</li><li>也可以考虑随着分数增加，增加角色移动速度。</li></ul></ul><div class="notion-text notion-block-33e02580ecbb458da8def690d91dc97b"><b>6. 游戏结束:</b></div><ul class="notion-list notion-list-disc notion-block-72638304a4ad45b9bf1a6826bc642972"><li><b>需求指向:</b> 当角色与障碍物发生碰撞时，游戏结束。</li></ul><ul class="notion-list notion-list-disc notion-block-403d5590b6d74b8095f43a50eb07a68d"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-403d5590b6d74b8095f43a50eb07a68d"><li>当角色与障碍物碰撞时，停止游戏循环。</li><li>显示最终得分。</li></ul></ul><div class="notion-text notion-block-cb745b09e1ee4ba1a2762e50c8a05737"><b>7. 画面风格:</b></div><ul class="notion-list notion-list-disc notion-block-72dbd6b9b6ef4503b4622147118fe5f7"><li><b>需求指向:</b> 游戏需要呈现复古风格。</li></ul><ul class="notion-list notion-list-disc notion-block-2504030aecb94226a5362304b89c08e4"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-2504030aecb94226a5362304b89c08e4"><li>使用像素风格表示角色和障碍物。</li><li>可以选择像素风格的背景和音效。</li><li>也可以采用其他复古风格的图形，例如卡通风格等。</li></ul></ul><div class="notion-text notion-block-d5efeb4a0c1647abacd2dcefbae3302e"><b>8. 游戏界面:</b></div><ul class="notion-list notion-list-disc notion-block-2c3f20c47164435ca2f2a2c8cb3e47ec"><li><b>需求指向:</b> 游戏需要显示分数信息。</li></ul><ul class="notion-list notion-list-disc notion-block-f8cc8844672c4a6e8de63a4edc8ff202"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-f8cc8844672c4a6e8de63a4edc8ff202"><li>使用文字或数字显示当前分数。</li><li>可以设计一个分数显示区域，例如屏幕顶部或底部。</li><li>在游戏结束时，显示最终得分。</li></ul></ul><div class="notion-text notion-block-9b9350ed753f4cd38cdce4826eb6217f"><b>9. 音效:</b></div><ul class="notion-list notion-list-disc notion-block-3d6c0980af4e4631bcc154e4ca0dcb67"><li><b>需求指向:</b> 游戏需要加入音效，提升玩家的游戏体验。</li></ul><ul class="notion-list notion-list-disc notion-block-9984ea5cfcb042e394d75edd01f773ce"><li><b>实现方式:</b></li><ul class="notion-list notion-list-disc notion-block-9984ea5cfcb042e394d75edd01f773ce"><li>加入跳跃音效、碰撞音效、背景音乐等。</li><li>可以使用复古风格的音效。</li></ul></ul><div class="notion-text notion-block-0769834cd5b04997964a9679502c4edc"><b>以上需求清单只是对游戏功能的基本描述，实际开发过程中还需要根据具体情况进行调整和补充。</b></div></div></div><div class="notion-callout notion-gray_background_co notion-block-05caf8dcc9244110a52904eda1a81be4"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><b>请根据以上需求进行代码开发，使用python的pygame库，将以上需求全部写入一个main.py函数中，留出背景、人物、障碍物、音效的资源名称，这些资源统一在source文件夹中</b>；</div></div><div class="notion-callout notion-gray_background_co notion-block-adec30a208a1439d944bccb7264e204f"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="✅">✅</span></div><div class="notion-callout-text"><b>Genmini1.5Flash</b><div class="notion-text notion-block-e71e49404df64c21a1265583659e2c51"><b>Explanation of the Fix:</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-f07d6a6841f941cca1f9db7caa75dca6" style="list-style-type:decimal"><li><b>Initialize score_checked:</b> Before the game loop starts, initialize score_checked as an empty list using score_checked = [].</li></ol><div class="notion-text notion-block-a36389a8db7f407c8c7ff5a2f7ef34d9">Now, score_checked will be defined before it is used inside the if statement, and the error will be resolved.</div><div class="notion-text notion-block-ca3bd2a10d0d417a8af8d4bcf3dd3ac5"><b>Key Points:</b></div><ul class="notion-list notion-list-disc notion-block-17b00acd154142b59efddb3706ebb352"><li><b>Variable Scope:</b> Remember that variables in Python are defined within specific scopes. In this case, you need to define score_checked outside the for loop so that it can be accessed throughout the game loop.</li></ul><ul class="notion-list notion-list-disc notion-block-22a7cf9402a6493cba4528fc19544701"><li><b>Data Structures:</b> Lists like score_checked are useful for storing data like the obstacles that have already been scored.</li></ul></div></div><div class="notion-callout notion-gray_background_co notion-block-bb502dd0e0c7469b971f73e97e6c7c66"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><b>我的背景图片尺寸为1792和1024，人物尺寸为260x260,障碍物尺寸为290x327，请适应修改人物跳跃高度和速度，以适应背景大小，修改障碍物为同一水平出现</b></div></div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[Youtube数据爬取]]></title>
        <id>https://blog.zzwopenai.com/爬虫</id>
        <link href="https://blog.zzwopenai.com/爬虫"/>
        <updated>2024-04-10T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[爬取Youtube视频评论]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-512d256960ab4268ac4e206f93300f8a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-26dfb218f8cd4976bb38c99649731f02" data-id="26dfb218f8cd4976bb38c99649731f02"><span><div id="26dfb218f8cd4976bb38c99649731f02" class="notion-header-anchor"></div><a class="notion-hash-link" href="#26dfb218f8cd4976bb38c99649731f02" title="使用 YouTube Data API v3"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>使用 YouTube Data API v3</b></span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-140dd100147f46b6b3f8ff0d78f061d2" style="list-style-type:decimal"><li>申请 API 密钥：需要在 Google Cloud Platform 上创建一个项目并启用 YouTube Data API v3。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-069756fe04bf49098865c29ea3294390" style="list-style-type:decimal"><li>安装 Google API 客户端库：</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-675249e5d1ca4b68a0ba36ade6adc301" data-id="675249e5d1ca4b68a0ba36ade6adc301"><span><div id="675249e5d1ca4b68a0ba36ade6adc301" class="notion-header-anchor"></div><a class="notion-hash-link" href="#675249e5d1ca4b68a0ba36ade6adc301" title="YouTube Data API v3 函数方法详解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">YouTube Data API v3 函数方法详解</span></span></h3><div class="notion-text notion-block-7aea781fa1b8407f87921fc6b96558ad">YouTube Data API v3 提供了丰富的函数方法来访问和管理 YouTube 数据，包括视频、频道、播放列表等。以下是一些常用的函数方法及其参数：</div><div class="notion-text notion-block-3d696bf41b2f478b8a6b1aab159c2d05"><b>1. youtube.videos().list()</b></div><ul class="notion-list notion-list-disc notion-block-25746b7a243747af890170138c61cb63"><li><b>功能：</b> 获取视频信息。</li></ul><ul class="notion-list notion-list-disc notion-block-20e7a565a90e4576b489e5bef83d001f"><li><b>常用参数：</b></li><ul class="notion-list notion-list-disc notion-block-20e7a565a90e4576b489e5bef83d001f"><li>part: 指定要返回的视频资源的部分，例如 snippet、contentDetails、statistics 等。</li><li>id: 视频 ID 列表。</li><li>myRating: 指定返回的视频与当前用户的关系，例如 like、dislike 等。</li></ul></ul><div class="notion-text notion-block-6bb186c8b0444ccdbe434a2efa4aa94d"><b>示例：</b></div><div class="notion-text notion-block-957ea75323d24bb3b09302635396817e"><b>2. youtube.channels().list()</b></div><ul class="notion-list notion-list-disc notion-block-e73e9fd37714496a8f842def46c99ba0"><li><b>功能：</b> 获取频道信息。</li></ul><ul class="notion-list notion-list-disc notion-block-437668cdbe874ac2b3b3c239db08edde"><li><b>常用参数：</b></li><ul class="notion-list notion-list-disc notion-block-437668cdbe874ac2b3b3c239db08edde"><li>part: 指定要返回的频道资源的部分，例如 snippet、contentDetails、statistics 等。</li><li>id: 频道 ID 列表。</li><li>forUsername: 频道用户名。</li></ul></ul><div class="notion-text notion-block-16ef17e39ce146fb8095144e3e1a16f4"><b>示例：</b></div><div class="notion-text notion-block-417acfc2aa4e4f7c985e6aa55e053922"><b>3. youtube.playlists().list()</b></div><ul class="notion-list notion-list-disc notion-block-000b881dd434414db3626b632ebcc2b9"><li><b>功能：</b> 获取播放列表信息。</li></ul><ul class="notion-list notion-list-disc notion-block-d963f5e5e3d944868adb164c9615d9ce"><li><b>常用参数：</b></li><ul class="notion-list notion-list-disc notion-block-d963f5e5e3d944868adb164c9615d9ce"><li>part: 指定要返回的播放列表资源的部分，例如 snippet、contentDetails 等。</li><li>id: 播放列表 ID 列表。</li><li>channelId: 频道 ID。</li></ul></ul><div class="notion-text notion-block-6c1f65cfb7ca426c87cfd79656316a10"><b>示例：</b></div><div class="notion-text notion-block-d85870e46df943e7bde0c605704217d2"><b>4. youtube.playlistItems().list()</b></div><ul class="notion-list notion-list-disc notion-block-5343131a97094ea98ef35b92303cf73f"><li><b>功能：</b> 获取播放列表中的视频信息。</li></ul><ul class="notion-list notion-list-disc notion-block-a39c0d79b917411fbc63ac4b19f1abba"><li><b>常用参数：</b></li><ul class="notion-list notion-list-disc notion-block-a39c0d79b917411fbc63ac4b19f1abba"><li>part: 指定要返回的播放列表项资源的部分，例如 snippet。</li><li>playlistId: 播放列表 ID。</li></ul></ul><div class="notion-text notion-block-3a62ee709b724a4b81001ba312a4c595"><b>示例：</b></div><div class="notion-text notion-block-8da48bdcee4040c79433cf4b57318bf6"><b>5. youtube.search().list()</b></div><ul class="notion-list notion-list-disc notion-block-64b0fc3d2a714a3cac197e642406b740"><li><b>功能：</b> 搜索 YouTube 视频、频道和播放列表。</li></ul><ul class="notion-list notion-list-disc notion-block-2d18c7fe0632409a924a7d2864d4fd96"><li><b>常用参数：</b></li><ul class="notion-list notion-list-disc notion-block-2d18c7fe0632409a924a7d2864d4fd96"><li>part: 指定要返回的搜索结果资源的部分，例如 snippet。</li><li>q: 搜索查询字符串。</li><li>type: 指定搜索类型，例如 video、channel、playlist。</li></ul></ul><div class="notion-text notion-block-897b7d240c2b4996ae324e85c9643508"><b>示例：</b></div><div class="notion-text notion-block-e70063c4ce1a40209efabfa9d59ae334"><b>更多信息：</b></div><ul class="notion-list notion-list-disc notion-block-d3e05aeebc354980a15a3c2199395a40"><li><b>YouTube Data API v3 官方文档:</b> <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developers.google.com/youtube/v3"><b>https://developers.google.com/youtube/v3</b></a></li></ul><ul class="notion-list notion-list-disc notion-block-ab11605a0adf409bbd20b8094c02f1f7"><li><b>API 资源管理器:</b> <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developers.google.com/youtube/v3/docs/"><b>https://developers.google.com/youtube/v3/docs/</b></a></li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-31ad0a3105a840928d8aa1eb837fc3f7" data-id="31ad0a3105a840928d8aa1eb837fc3f7"><span><div id="31ad0a3105a840928d8aa1eb837fc3f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31ad0a3105a840928d8aa1eb837fc3f7" title="提取指定播放列表下视频中的评论"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">提取指定播放列表下视频中的评论</span></span></h3><div class="notion-blank notion-block-02a61c3bb6a441cb95f65612cfed6e07"> </div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[基于Mediapipe的人体骨骼角度角度获取]]></title>
        <id>https://blog.zzwopenai.com/mediapipe</id>
        <link href="https://blog.zzwopenai.com/mediapipe"/>
        <updated>2024-04-06T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[基于Mediapipe的人体骨骼角度角度获取]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-e0792b2f63914c2486404583746a8f91"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-callout notion-gray_background_co notion-block-7495c83ae44f4d75afa81f1604248b7c"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="📌">📌</span></div><div class="notion-callout-text">接的一个小兼职
<b>需求描述：</b>给定指定视频，获取视频中人体部分关节角度（双踝关节，双膝关节，双髋关节，背部）
<b>大体思路：</b>基于mediapipe的pose模型获取每一帧的人体骨骼关节点，根据指定关节的上下连接关节计算关节角度；</div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-34085b4ce74947c1abbe79d8eca51478" data-id="34085b4ce74947c1abbe79d8eca51478"><span><div id="34085b4ce74947c1abbe79d8eca51478" class="notion-header-anchor"></div><a class="notion-hash-link" href="#34085b4ce74947c1abbe79d8eca51478" title="MediaPipe"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">MediaPipe</span></span></h2><div class="notion-text notion-block-1082819d326849dea36ae9cec226c546">MediaPipe 是一个由 Google 开发的开源框架，旨在帮助开发者轻松构建和部署跨平台的视觉、音频和传感器数据处理管道。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-0b29a68eae37431d890e036d5eeb3f4c" data-id="0b29a68eae37431d890e036d5eeb3f4c"><span><div id="0b29a68eae37431d890e036d5eeb3f4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0b29a68eae37431d890e036d5eeb3f4c" title="安装 MediaPipe"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>安装 MediaPipe</b></span></span></h4><div class="notion-text notion-block-5b9559c42cb04f6a98f8a7e15befafca">首先，通过 Python 的包管理器 pip 完成安装：</div><div class="notion-text notion-block-3720ffffdd98403081ebbbea78d7f394"><b>简单示例：手部关键点检测</b></div><div class="notion-text notion-block-108875c930d343e98bb1b6af52aa3496">以下是一个简单的示例，展示了如何使用 MediaPipe 进行实时手部关键点检测。</div><ol start="1" class="notion-list notion-list-numbered notion-block-9b07412b4be64b0c83861c8214971d5a" style="list-style-type:decimal"><li><b>导入所需的库</b>：首先，你需要导入 MediaPipe 和 OpenCV（用于视频处理）。</li><ol class="notion-list notion-list-numbered notion-block-9b07412b4be64b0c83861c8214971d5a" style="list-style-type:lower-alpha"></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25b909601e594dc799e8c3d7959e656b" style="list-style-type:decimal"><li><b>初始化 MediaPipe 手部解决方案</b>：使用 MediaPipe 提供的手部解决方案。</li><ol class="notion-list notion-list-numbered notion-block-25b909601e594dc799e8c3d7959e656b" style="list-style-type:lower-alpha"></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-92f9baaa1b5642ceab2424c9dbb9dc78" style="list-style-type:decimal"><li><b>视频帧处理</b>：从摄像头读取视频帧，并将其传递给 MediaPipe 手部模块。</li><ol class="notion-list notion-list-numbered notion-block-92f9baaa1b5642ceab2424c9dbb9dc78" style="list-style-type:lower-alpha"></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3d7ce602671f4b899b5b351397914dd2" style="list-style-type:decimal"><li><b>显示结果</b>：上述代码将打开一个窗口，实时显示检测到的手部关键点。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-c3b10086bfc6400bb8d84d32c4373e3a" style="list-style-type:decimal"><li><b>结束程序</b>：当你按下 <code class="notion-inline-code"><b>ESC</b></code> 键时，程序会退出。</li></ol><div class="notion-text notion-block-2c3932390085407ab4635dc0f2e5d735">这个简单的示例展示了如何使用 MediaPipe 来检测视频流中的手部关键点。你可以在此基础上扩展功能，比如增加手势识别或将检测到的关键点用于进一步的处理。 MediaPipe 提供了多种解决方案，不仅限于手部关键点检测，还包括面部标记、姿势估计、物体检测等，你可以根据自己的需求选择合适的模块进行开发。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-415cee8c80ed41b99d3fcf3f36c75295" data-id="415cee8c80ed41b99d3fcf3f36c75295"><span><div id="415cee8c80ed41b99d3fcf3f36c75295" class="notion-header-anchor"></div><a class="notion-hash-link" href="#415cee8c80ed41b99d3fcf3f36c75295" title="计算关节点角度"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">计算关节点角度</span></span></h2><div class="notion-text notion-block-e1fb012e7fd0409698546719d670559d">以下是如何计算各个关节角度的详细步骤：</div><ol start="1" class="notion-list notion-list-numbered notion-block-740151ff160145f597500a8a799a50c9" style="list-style-type:decimal"><li><b>膝关节角度</b>（以左膝为例）:</li><ol class="notion-list notion-list-numbered notion-block-740151ff160145f597500a8a799a50c9" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-e1ae2d4abb814db8b75d9e2836e6a622"><li>确定三个点：左髋（hip_left）、左膝（knee_left）、左踝（ankle_left）。</li></ul><ul class="notion-list notion-list-disc notion-block-14ddef16e2c648538eb708e721a04d5d"><li>计算向量：一个是从髋到膝的向量，另一个是从膝到踝的向量。</li></ul><ul class="notion-list notion-list-disc notion-block-88202b13954943ff838972f9037f75f4"><li>使用这两个向量计算夹角，这就是膝关节的角度。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-0d026bc7520f4a32a0a5691a46af9914" style="list-style-type:decimal"><li><b>髋关节角度</b>（以左髋为例）:</li><ol class="notion-list notion-list-numbered notion-block-0d026bc7520f4a32a0a5691a46af9914" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-0a0062081efa4c87ac77857e6e75fdf4"><li>确定三个点：中点肩膀（shoulder_mid，左右肩膀中点）、左髋（hip_left）、左膝（knee_left）。</li></ul><ul class="notion-list notion-list-disc notion-block-8cdf3b67119848eeb36d26a06f6be34c"><li>计算向量：一个是从中点肩膀到髋的向量，另一个是从髋到膝的向量。</li></ul><ul class="notion-list notion-list-disc notion-block-51d13d9df41d449cb0213ffc9b34c38d"><li>计算这两个向量之间的角度，这就是髋关节的角度。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3d142d6d1aa64a889b2bd42dcd119f8a" style="list-style-type:decimal"><li><b>踝关节角度</b>（以左踝为例）:</li><ol class="notion-list notion-list-numbered notion-block-3d142d6d1aa64a889b2bd42dcd119f8a" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-6c93f8c8a42e4aabaa8d1ce1dde6c68f"><li>确定三个点：左膝（knee_left）、左踝（ankle_left）和左脚尖（foot_index_left）。左脚尖不直接提供，可以通过从踝关节向下延伸一小段距离得到一个假想点。</li></ul><ul class="notion-list notion-list-disc notion-block-e7392aae42ad4577a6c7791f7186baa8"><li>计算向量：一个是从膝到踝的向量，另一个是从踝到脚尖的向量。</li></ul><ul class="notion-list notion-list-disc notion-block-a273fa516f55409e8a557c11829c6d1a"><li>通过这两个向量计算夹角，这是踝关节的角度。</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-9800f2345b734f608a5c20c409542dee" style="list-style-type:decimal"><li><b>腰部角度</b>:</li><ol class="notion-list notion-list-numbered notion-block-9800f2345b734f608a5c20c409542dee" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-4b466572b07a4c39a1d9082867c69ba9"><li>确定三个点：左髋（hip_left）、肩部中点（shoulder_mid）、右髋（hip_right）。</li></ul><ul class="notion-list notion-list-disc notion-block-f0c6c7eb6faa4567b553e6d0f6eddee4"><li>计算向量：一个是从左髋到肩部中点的向量，另一个是从肩部中点到右髋的向量。</li></ul><ul class="notion-list notion-list-disc notion-block-5819a679689441cfb623cb21a80b5ab6"><li>计算这两个向量之间的角度，这就是腰部的角度。</li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-91bf75c8e3a144d49971ef30d9d269d3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fe7ad4020-7105-409f-8113-c25091745309%2FUntitled.png%3Ftable%3Dblock%26id%3D91bf75c8-e3a1-44d4-9971-ef30d9d269d3%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DsNZASLJiiYenDB6MDKXGQEqBjqe0WNSdZdHwP5Bxgls?table=block&amp;id=91bf75c8-e3a1-44d4-9971-ef30d9d269d3&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-900c407c092c4faa9aae1947e64592e6">如果角度大于180度，使用 <!-- -->360<!-- -->−<!-- -->Angle<!-- -->360−Angle 来获取小于180度的内角。这样就可以得到每个关节的角度。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-0ca5288dfd514b53a1a887fa5723a991" data-id="0ca5288dfd514b53a1a887fa5723a991"><span><div id="0ca5288dfd514b53a1a887fa5723a991" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0ca5288dfd514b53a1a887fa5723a991" title="完整代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">完整代码</span></span></h2><div class="notion-file notion-block-e9c8a0a22a1549db982b39a8ada65c2d"><a target="_blank" rel="noopener noreferrer" class="notion-file-link" href="https://file.notion.com/f/f/20e5beb8-d8d1-43a9-98d4-325817187b03/a395c292-792a-4199-8f11-736594cc027c/video.py?table=block&amp;id=e9c8a0a2-2a15-49db-982b-39a8ada65c2d&amp;spaceId=20e5beb8-d8d1-43a9-98d4-325817187b03&amp;expirationTimestamp=1795824000000&amp;signature=-Wq2Cm12KX0yunq0aSPKp_L7awkzt776jsXzOf7Gqyg"><svg class="notion-file-icon" viewBox="0 0 30 30"><path d="M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z"></path></svg><div class="notion-file-info"><div class="notion-file-title">video.py</div><div class="notion-file-size">6.9KB</div></div></a></div><div class="notion-blank notion-block-b2c0ec8f000d48cbab8ee87827c94e8d"> </div></main>]]></content>
    </entry>
    <entry>
        <title type="html"><![CDATA[自动化字幕制作工程]]></title>
        <id>https://blog.zzwopenai.com/auto-subtitles</id>
        <link href="https://blog.zzwopenai.com/auto-subtitles"/>
        <updated>2024-03-15T16:00:00.000Z</updated>
        <summary type="html"><![CDATA[记录一下字幕制作自动化的个人流程]]></summary>
        <content type="html"><![CDATA[<main class="notion light-mode notion-page notion-block-0a1ffa1b335b4caa932120dbfa3ff678"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-40d040d9b13744f38bde4b45d0f7a1ef">记录一下字幕制作自动化的个人流程，这里的字幕是相对比较复杂的场景，比如下面这种情况：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-f6898678c8304a1f890dc66671cc8aef"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F00b6d3b0-ba79-4bcb-8165-3c67cf117453%2FUntitled.png%3Ftable%3Dblock%26id%3Df6898678-c830-4a1f-890d-c66671cc8aef%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DExCY2g492Sulk_wjCs_XUDyX9oA8pi_Jbrw-iPA1Kn8?table=block&amp;id=f6898678-c830-4a1f-890d-c66671cc8aef&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1ea628e606b8429a8530e814eab0f665">说是自动化，其实用起来也是相当麻烦，后续有需求再看看怎么优化吧；</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-115bb2fd62e548e1b158f688a9b3e61e" data-id="115bb2fd62e548e1b158f688a9b3e61e"><span><div id="115bb2fd62e548e1b158f688a9b3e61e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#115bb2fd62e548e1b158f688a9b3e61e" title="前期准备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前期准备</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-a41ac784f18f4bb99115d01b93d9e04e" data-id="a41ac784f18f4bb99115d01b93d9e04e"><span><div id="a41ac784f18f4bb99115d01b93d9e04e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a41ac784f18f4bb99115d01b93d9e04e" title="需要准备的材料："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">需要准备的材料：</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-ed75bf3c53c14b8eae6f39defd0aa297" data-id="ed75bf3c53c14b8eae6f39defd0aa297"><span><div id="ed75bf3c53c14b8eae6f39defd0aa297" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ed75bf3c53c14b8eae6f39defd0aa297" title="1、一张字幕框底图："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1、一张字幕框底图：</span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2db23f8b12f0447c837ac7ed298c71ca"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fd2a9b360-bae0-45ee-8e9f-6e8bc7e7fcb0%2Ftest.png%3Ftable%3Dblock%26id%3D2db23f8b-12f0-447c-837a-c7ed298c71ca%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DVYpVTAEJnJ9FGPXRTrKuiNG1CVwVc9pCjyFbW_jrfZg?table=block&amp;id=2db23f8b-12f0-447c-837a-c7ed298c71ca&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-bb8761377b1b4ff3ad6a73a303eabef2" data-id="bb8761377b1b4ff3ad6a73a303eabef2"><span><div id="bb8761377b1b4ff3ad6a73a303eabef2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#bb8761377b1b4ff3ad6a73a303eabef2" title="2、带角色名的txt文本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2、带角色名的txt文本</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-b515e7ef02cc49e884322312a1ab0736"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">每一行构成： 角色名：台本内容（<b>注意分割符“：”</b>，后续python脚本中需要指定对应的分隔符，另外每一行的<b>字数不宜过多</b>，保证能全部显示在字幕框中）</div></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0b20979cd9ee4a0f98bd7abad72d6176"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F764428da-a31e-4c9c-a2e8-a4cf96bf8848%2FUntitled.png%3Ftable%3Dblock%26id%3D0b20979c-d9ee-4a0f-98bd-7abad72d6176%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3Dmd4_n3G-BZZDAQADvTnDkbSV3pUmMKQZnYlMF2IqDUY?table=block&amp;id=0b20979c-d9ee-4a0f-98bd-7abad72d6176&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-cd761c78720146ee932808008ff78013" data-id="cd761c78720146ee932808008ff78013"><span><div id="cd761c78720146ee932808008ff78013" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cd761c78720146ee932808008ff78013" title="3、不带角色名的txt文本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3、不带角色名的txt文本</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-1fe542d0df9d42b1b32d55940232e0e9"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">注意这里的每一行和<b>上面txt文本中每一行台本内容要对应上
</b>这个文本也可以在后续的脚本中<b>自动生成</b>；</div></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-67a2cd2266894c8eb33750039004d264"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:322.98077392578125px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F01b9b42c-49e3-4362-b1d7-eb9a6efcd3f1%2FUntitled.png%3Ftable%3Dblock%26id%3D67a2cd22-6689-4c8e-b337-50039004d264%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3D3sjrFctSp6hPSWCmlniFj5jFDIU10N7bolzETsyQl9U?table=block&amp;id=67a2cd22-6689-4c8e-b337-50039004d264&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-4639cb043ee14d7ebe42011f25c14941" data-id="4639cb043ee14d7ebe42011f25c14941"><span><div id="4639cb043ee14d7ebe42011f25c14941" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4639cb043ee14d7ebe42011f25c14941" title="4、音频文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4、音频文件</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-95d04a46c2a94599acf2ccd0013d8b95"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">尽量使用<b>纯人声</b>的音频文件，可以提高后续自动打轴的识别精度；</div></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-98a8ed90bf9e44ec942003477b566ffb" data-id="98a8ed90bf9e44ec942003477b566ffb"><span><div id="98a8ed90bf9e44ec942003477b566ffb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#98a8ed90bf9e44ec942003477b566ffb" title="需要使用的工具："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">需要使用的工具：</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-c62e6ffdf0bf4f7eb9edc21260dd1cc3" data-id="c62e6ffdf0bf4f7eb9edc21260dd1cc3"><span><div id="c62e6ffdf0bf4f7eb9edc21260dd1cc3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c62e6ffdf0bf4f7eb9edc21260dd1cc3" title="1、Arctime Pro"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1、Arctime Pro</span></span></h4><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-b54b93927aac4cc39c231bc42c8b726c" href="https://arctime.org/"><div><div class="notion-bookmark-title">ArcTime Pro跨平台字幕软件 | Arctime字幕软件</div><div class="notion-bookmark-description">Arctime Pro简单、强大、高效的跨平台字幕制作软件官网。提供精准的音频波形图，可以快速准确的创建和编辑时间轴。AI语音识别、AI自动打轴可大大降低工作量，机器翻译可以快速进行语言转换。AI语音合成可快速为视频添加配音，开启新一代视频创作方式。支持导出多种字幕格式、导出到全系列剪辑软件、高质量视频压制。</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Farctime.org%2Fimages%2Ffavicon.ico%3Fcrc%3D388733599?table=block&amp;id=b54b9392-7aac-4cc3-9c23-1bc42c8b726c&amp;cache=v2" alt="ArcTime Pro跨平台字幕软件 | Arctime字幕软件" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://arctime.org/</div></div></div></a></div><div class="notion-callout notion-gray_background_co notion-block-153069dfa3a94e0e8afb707506e00918"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">个人非常推荐的字幕打轴软件，付费，但是也不贵，15分钟的音频自动打轴，需要大概5块钱；支持语音识别+自动打轴，对于没有台本的情况非常实用；</div></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-53cde1f428ed48e1a66e9bb2a03e53a3" data-id="53cde1f428ed48e1a66e9bb2a03e53a3"><span><div id="53cde1f428ed48e1a66e9bb2a03e53a3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#53cde1f428ed48e1a66e9bb2a03e53a3" title="2、python"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2、python</span></span></h4><div class="notion-callout notion-gray_background_co notion-block-43faf3119a2b47e0a507c1d8ba4c2a24"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">自动化工程主体部分是基于python脚本，需要了解python安装和运行，具体脚本代码会给出；</div></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-f4e55eb6691743c48498997f63a6825d" href="https://blog.zzwopenai.com/code_subtitles"><div><div class="notion-bookmark-title">blog.zzwopenai.com</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fblog.zzwopenai.com%2Ffavicon.png?table=block&amp;id=f4e55eb6-6917-43c4-8498-997f63a6825d&amp;cache=v2" alt="blog.zzwopenai.com" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://blog.zzwopenai.com/code_subtitles</div></div></div></a></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-67e2d29e86b14ebab412ad04e45707f9" data-id="67e2d29e86b14ebab412ad04e45707f9"><span><div id="67e2d29e86b14ebab412ad04e45707f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#67e2d29e86b14ebab412ad04e45707f9" title="制作流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">制作流程</span></span></h2><div class="notion-text notion-block-909ed5f580e14eafba8698110be5f68e">制作的基本思路是：1、先使用Arctime Pro进行打轴，得到含有<b>字幕时间序列的XML文件</b>；2、使用python的PIL库进行图片处理，将角色名和台本内容叠到字幕框图上，得到<b>特定样式的字幕PNG文件</b>；3、将XML序列中的字幕链接到python生成的png文件；</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c1dc5fe5aec143d3a0b66cad6478cf3e" data-id="c1dc5fe5aec143d3a0b66cad6478cf3e"><span><div id="c1dc5fe5aec143d3a0b66cad6478cf3e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c1dc5fe5aec143d3a0b66cad6478cf3e" title="制作字幕时间序列XML文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">制作字幕时间序列XML文件</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-51e199da36d24e5cb95681954e92d52b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2Fa8e6a11f-7033-4140-ad30-00b489666e5d%2FUntitled.png%3Ftable%3Dblock%26id%3D51e199da-36d2-4e5c-b956-81954e92d52b%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DxRB6GwwNrNOZ_ZSVD9Tr5Q5GsBW0UR8uyjHMm9WnJTw?table=block&amp;id=51e199da-36d2-4e5c-b956-81954e92d52b&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-6f3dd157b15a4c2582ed7cb6de0066f2"><b>自动识别出来的轴还是需要自己手动微调，调整完成后导出XML+PNG</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-e1f13e8b6355477db12847b3a85bb8b6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F3ce50402-0685-4206-a5f7-cec4118642de%2FUntitled.png%3Ftable%3Dblock%26id%3De1f13e8b-6355-477d-b128-47b3a85bb8b6%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3DPFLGFewvws41G99ERLM4YFJ7EWWrQ57CEI8xURTGU_g?table=block&amp;id=e1f13e8b-6355-477d-b128-47b3a85bb8b6&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-5891bbeba0704cb89d0df7cd1d41d5c4"><b>现在得到了带有时间序列的字幕轴XML文件；</b></div><div class="notion-blank notion-block-c4fb33d1f7b9458d97edaaa5d1a2eb9b"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-ace36f3b0a744f758518d1031b37a44a" data-id="ace36f3b0a744f758518d1031b37a44a"><span><div id="ace36f3b0a744f758518d1031b37a44a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ace36f3b0a744f758518d1031b37a44a" title="批量生成带有角色名和台词的PNG文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">批量生成带有角色名和台词的PNG文件</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-a7903f839b3a4834bf63936c9a1f93d0"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">这一步直接使用编写好的脚本，修改对应的参数即可</div></div><div class="notion-text notion-block-ca56fbf47f6f4bb095c3dd6644af3939">修改参数后，执行</div><div class="notion-text notion-block-674115f79c434cb2b823fbfcd4366817"><b>得到叠加了角色名和台词的PNG文件；</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0a84c36602c14626b06aebaa013825cc"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F7b49bb2c-9b97-4fbd-997b-0c38deba13ee%2FUntitled.png%3Ftable%3Dblock%26id%3D0a84c366-02c1-4626-b06a-ebaa013825cc%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3D4xbBGQJbMw3vBG0w_ivIacp5Uus8seZLHoQCXt6-YCo?table=block&amp;id=0a84c366-02c1-4626-b06a-ebaa013825cc&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-250be3d9e7f943db84883891f099908f"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-398f96a806b843d68a34b2c6fd110903" data-id="398f96a806b843d68a34b2c6fd110903"><span><div id="398f96a806b843d68a34b2c6fd110903" class="notion-header-anchor"></div><a class="notion-hash-link" href="#398f96a806b843d68a34b2c6fd110903" title="链接PNG图片到XML序列中"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">链接PNG图片到XML序列中</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-0cf1727a45d64d07803cdacc35a7b51a"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">这一步非常简单，因为在脚本批量生成时图片的命名已经修改为xml中指定的命名规则，将生成的png文件全部<b>复制</b>到xml文件所在的文件夹，<b>全部替换</b>即可；</div></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d68a40307a21428aa8b3c8a9c3994015"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F347cd6e6-cf6c-465e-917d-2fa031a639f4%2FUntitled.png%3Ftable%3Dblock%26id%3Dd68a4030-7a21-428a-a8b3-c8a9c3994015%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3D9fp4XQ-QBo-DcEXR8MJqXHWw8Wff56uRCNrXJSlR2mU?table=block&amp;id=d68a4030-7a21-428a-a8b3-c8a9c3994015&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-e42d06edf0c44d308f707f01e2337373"> </div><div class="notion-text notion-block-728407f17c584c9ab0111b1d2987ad4d"><b>在使用时，将xml文件拖入pr中，就可以获得打好轴的特定样式字幕！</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-5eb3bc4a5229495382956a00ebbf41aa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.com%2Ff%2Ff%2F20e5beb8-d8d1-43a9-98d4-325817187b03%2F8540fb88-209a-440b-adf2-a26ab37d3706%2FUntitled.png%3Ftable%3Dblock%26id%3D5eb3bc4a-5229-4953-8295-6a00ebbf41aa%26spaceId%3D20e5beb8-d8d1-43a9-98d4-325817187b03%26expirationTimestamp%3D1795824000000%26signature%3Di4eCtljY3Tn1DNFasw3-RmWGlYIV6SRuz66mAto-XB8?table=block&amp;id=5eb3bc4a-5229-4953-8295-6a00ebbf41aa&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-0e770ae8a975403f83136a057cbdce51"> </div></main>]]></content>
    </entry>
</feed>