<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>盖子的灵感宝盒</title>
        <link>https://www.connorshen.site/</link>
        <description>目标是星辰大海</description>
        <lastBuildDate>Thu, 18 Sep 2025 07:40:51 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2025, 比尔盖子</copyright>
        <item>
            <title><![CDATA[物产中大期货开发备忘]]></title>
            <link>https://www.connorshen.site/article/2611670f-fa6d-80bb-8423-ed889a74704f</link>
            <guid>https://www.connorshen.site/article/2611670f-fa6d-80bb-8423-ed889a74704f</guid>
            <pubDate>Mon, 01 Sep 2025 00:00:00 GMT</pubDate>
        </item>
        <item>
            <title><![CDATA[后端面试准备]]></title>
            <link>https://www.connorshen.site/article/2611670f-fa6d-80c2-a43f-cddc4dd5a7d7</link>
            <guid>https://www.connorshen.site/article/2611670f-fa6d-80c2-a43f-cddc4dd5a7d7</guid>
            <pubDate>Mon, 01 Sep 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2611670ffa6d80c2a43fcddc4dd5a7d7"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80049a54e098d5af9c48" data-id="2611670ffa6d80049a54e098d5af9c48"><span><div id="2611670ffa6d80049a54e098d5af9c48" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80049a54e098d5af9c48" title="Java基础"><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">Java基础</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d807aa7e5f60defe67c37" data-id="2611670ffa6d807aa7e5f60defe67c37"><span><div id="2611670ffa6d807aa7e5f60defe67c37" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d807aa7e5f60defe67c37" 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></h4><div class="notion-text notion-block-2611670ffa6d8011b5c3d068261a3042">数字：short，int，long，double，byte</div><div class="notion-text notion-block-2611670ffa6d803daa21f2bb70455408">字符：char</div><div class="notion-text notion-block-2611670ffa6d802e9d72cd0861301632">布尔：boolean</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80e89e04d36322e3a243" data-id="2611670ffa6d80e89e04d36322e3a243"><span><div id="2611670ffa6d80e89e04d36322e3a243" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80e89e04d36322e3a243" 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></h4><div class="notion-text notion-block-2611670ffa6d80c5a024f91ff734d5b5">装箱：Integer i=1，Integer.valueOf(1)</div><div class="notion-text notion-block-2611670ffa6d8069bde3df3a6aa39898">拆箱：int a = i，i.intValue()</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d805cafeeef5b83e74cac" data-id="2621670ffa6d805cafeeef5b83e74cac"><span><div id="2621670ffa6d805cafeeef5b83e74cac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d805cafeeef5b83e74cac" title="String"><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">String</span></span></h4><div class="notion-text notion-block-2621670ffa6d809db7fbcc617b136757">不可变因为final修饰，final char value[]</div><div class="notion-text notion-block-2621670ffa6d800e88bff3543cd46580">StringBuilder线程不安全，可变</div><div class="notion-text notion-block-2621670ffa6d80d7b20fe099ba2bea73">StringBuffer线程安全，速度慢，可变</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80f79e40e10131b9008f" data-id="2611670ffa6d80f79e40e10131b9008f"><span><div id="2611670ffa6d80f79e40e10131b9008f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80f79e40e10131b9008f" 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></h4><div class="notion-text notion-block-2621670ffa6d80949dc2e7221f5be77d">List，Set，Map，Queue</div><div class="notion-text notion-block-2621670ffa6d80409c7edfa8ca0598c3">ArrayList：线程不安全，指定位置插入，元素需要位移。</div><div class="notion-text notion-block-2621670ffa6d809f9546c452ea0e4dd1">LinkedList：线程不安全，插入速度快。</div><div class="notion-text notion-block-2621670ffa6d80f1a8fee50cc0427e59">HashMap：线程不安全，数组+链表。链表长度大于8，转为红黑树。</div><div class="notion-text notion-block-2621670ffa6d807fbaf9e7798f157d9a">HasTable：线程安全，速度慢，基本被淘汰。数组+链表。</div><div class="notion-text notion-block-2621670ffa6d80899e83d6605b209bed">ConcurrentHashMap：线程安全，相对于HashTable实行分段加锁。效率上会快一些，底层数据结构还是跟HashMap一样。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80f1836be2e5991babb4" data-id="2611670ffa6d80f1836be2e5991babb4"><span><div id="2611670ffa6d80f1836be2e5991babb4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80f1836be2e5991babb4" 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></h4><div class="notion-text notion-block-2621670ffa6d8085b678d4853446d500">线程状态</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2621670ffa6d80a6b57dfbe0b037bada"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:432px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A22143b21-b3bb-41ea-8783-18b8284780a6%3Aimage.png?table=block&amp;id=2621670f-fa6d-80a6-b57d-fbe0b037bada&amp;t=2621670f-fa6d-80a6-b57d-fbe0b037bada" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2621670ffa6d80538bf2c75e74594249">死锁条件</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8002982cdfb7857c0abd"><li><b>互斥条件</b>：该资源任意一个时刻只由一个线程占用。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8008b964db4923d7f61c"><li><b>请求与保持条件</b>：一个线程因请求资源而阻塞时，对已获得的资源保持不放。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80a59a6bd32dd867ef02"><li><b>不剥夺条件</b>：线程已获得的资源在未使用完之前不能被其他线程强行剥夺，只有自己使用完毕后才释放资源。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d809b9b58c6714807f9db"><li><b>循环等待条件</b>：若干线程之间形成一种头尾相接的循环等待资源关系。</li></ul><div class="notion-text notion-block-2621670ffa6d806098abde2416250713">预防死锁</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80ec8336efe8fb339eed"><li><b>破坏请求与保持条件</b>：一次性申请所有的资源。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8079a713e82727901eca"><li><b>破坏不剥夺条件</b>：占用部分资源的线程进一步申请其他资源时，如果申请不到，可以主动释放它占有的资源。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80c38d9be8f95899fa6f"><li><b>破坏循环等待条件</b>：靠按序申请资源来预防。按某一顺序申请资源，释放资源则反序释放。破坏循环等待条件。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2631670ffa6d80c1852ced327a4652b1" data-id="2631670ffa6d80c1852ced327a4652b1"><span><div id="2631670ffa6d80c1852ced327a4652b1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80c1852ced327a4652b1" 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-2631670ffa6d80d88974c0860c1806f0">乐观锁：认为每次访问时不会出问题，采用CAS更新数据。用于读比较多的场景。</div><div class="notion-text notion-block-2631670ffa6d800fb80dc0680e0636a0">悲观锁：认为每次被访问就会出问题，每次操作资源就会上锁。性能开销大，会有死锁问题。用于写比较多的常见。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d804ab057f1fd11d31c3f" data-id="2621670ffa6d804ab057f1fd11d31c3f"><span><div id="2621670ffa6d804ab057f1fd11d31c3f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d804ab057f1fd11d31c3f" 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></h4><div class="notion-text notion-block-2621670ffa6d80d58eb9f9879ab9eddd">synchronized和reentrantlock，reentrantlock更加灵活。可实现公平锁。</div><div class="notion-text notion-block-2621670ffa6d80c4a255f7455d3087d7">Semaphore：信号量，获取到资源的时候才会继续执行。</div><div class="notion-text notion-block-2621670ffa6d8073a094cde71043ebab">CountDownLatch：到0之后开始继续执行。</div><div class="notion-text notion-block-2621670ffa6d80058d5ddad094118365">CyclicBarrier：当一组线程全部到达屏障之后才会继续开始执行，否则都阻塞。</div><div class="notion-text notion-block-2621670ffa6d801bb3c2f387e3a1beb9">CompletableFuture：异步任务编排，anyOf和Allof并行执行，get方法阻塞。可以指定线程池。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d807ca8bbe4a7bfc32eb5" data-id="2621670ffa6d807ca8bbe4a7bfc32eb5"><span><div id="2621670ffa6d807ca8bbe4a7bfc32eb5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d807ca8bbe4a7bfc32eb5" 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></h4><div class="notion-text notion-block-2621670ffa6d80e5b5fde0b33d380fd6">ThreadPoolExecutor 3 个最重要的参数：</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80bdb805e9e9fa313012"><li>corePoolSize : 任务队列未达到队列容量时，最大可以同时运行的线程数量。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d809bbd5dc263128eaa48"><li>maximumPoolSize : 任务队列中存放的任务达到队列容量的时候，当前可以同时运行的线程数量变为最大线程数。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8079a503ea7a630b0d8e"><li>workQueue: 新任务来的时候会先判断当前运行的线程数量是否达到核心线程数，如果达到的话，新任务就会被存放在队列中。</li></ul><div class="notion-text notion-block-2621670ffa6d80a0b7daf6c2a4746d7b">ThreadPoolExecutor其他常见参数 :</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d802c986ef09fc311a1a8"><li>keepAliveTime:当线程池中的线程数量大于corePoolSize ，即有非核心线程（线程池中核心线程以外的线程）时，这些非核心线程空闲后不会立即销毁，而是会等待，直到等待的时间超过了 keepAliveTime才会被回收销毁。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80a089e4f3d20db31b6a"><li>unit : keepAliveTime 参数的时间单位。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80b38b7dc6ed053216dc"><li>threadFactory :executor 创建新线程的时候会用到。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8081811ce3089baf7127"><li>handler :拒绝策略</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2621670ffa6d80c8b061e3f8c185e5b0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A413ecaf0-caa5-46f5-ac66-c82facd20e71%3Aimage.png?table=block&amp;id=2621670f-fa6d-80c8-b061-e3f8c185e5b0&amp;t=2621670f-fa6d-80c8-b061-e3f8c185e5b0" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80f284ccf4adcd8951cf" data-id="2611670ffa6d80f284ccf4adcd8951cf"><span><div id="2611670ffa6d80f284ccf4adcd8951cf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80f284ccf4adcd8951cf" 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></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2621670ffa6d809b9042ce9dfa1e4c2b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7b260574-9bef-4548-891e-130e97c46fc4%3Aimage.png?table=block&amp;id=2621670f-fa6d-809b-9042-ce9dfa1e4c2b&amp;t=2621670f-fa6d-809b-9042-ce9dfa1e4c2b" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2621670ffa6d80008016fd866800a8ab">内存分配原则</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d804b9547e9b666ffe410"><li>对象优先在Eden分配</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80ee85e3f02721f167a2"><li>大对象直接进入老年代</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8094b79cc10f153dfac6"><li>长期存活的对象进入老年代</li></ul><div class="notion-text notion-block-2621670ffa6d80f0882efdc972564ecf">对象死亡判断方法</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8076b5fcc46563635178"><li>引用计数法：对象添加引用计数变量，每次被引用就+1。当引用计数等于0时被回收。</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d806fab6ccfae478463e3"><li>可达性分析法：从GC Root向下寻找，在这棵树上的就不需要被回收。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80b98747f982dec9d804" data-id="2611670ffa6d80b98747f982dec9d804"><span><div id="2611670ffa6d80b98747f982dec9d804" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80b98747f982dec9d804" title="JVM调优"><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">JVM调优</span></span></h4><div class="notion-text notion-block-2621670ffa6d8059a0cff005fb0c7d86">JVM内存区域</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2621670ffa6d806bba9dd77edbeb512c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:432px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A90088c33-0f63-4732-8ec6-933c78ab0853%3Aimage.png?table=block&amp;id=2621670f-fa6d-806b-ba9d-d77edbeb512c&amp;t=2621670f-fa6d-806b-ba9d-d77edbeb512c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2621670ffa6d802f8ccee635b90d450f">不得不进行调优的时机，这是最后手段，不建议优先使用。因为参数都是魔法数字，不可持续维护。</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d806b9cdbf315553897eb"><li>full gc频繁，老年代太小</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80eeb463d7f80d938146"><li>gc停顿时间太长</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8077902ee57988d6a1f2"><li>系统启动的时候频繁gc，运行稳定之后不gc</li></ul><div class="notion-text notion-block-2621670ffa6d804c899fea0f4dfacd6d">排除方法</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8089bb62ebcbaba2a974"><li>jstat -gc查看堆中分区占用内存</li></ul><div class="notion-text notion-block-2621670ffa6d809c9ea9e7983a81564c">常见策略</div><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80b795e8f64243f6a08b"><li>内存不够：Xms，Xmx设大点</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80749ff5c8e6244f240b"><li>启动时频繁gc：Xms=Xmx</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d80cca337ed3481d2b26d"><li>调整内存区大小比例：survivor区和Eden区大小比率SurvivorRatio，新时代和老年代比例NewRatio</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d8020bc90f91ed45f8531"><li>对象过早进入老年代：提升对象老年代年龄</li></ul><ul class="notion-list notion-list-disc notion-block-2621670ffa6d804cbc8cff77130ee5ee"><li>垃圾回收器类型：Serial（串行），Parallel（并行），CMS，G1</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d80a9a6b8f19f3d326acd" data-id="2621670ffa6d80a9a6b8f19f3d326acd"><span><div id="2621670ffa6d80a9a6b8f19f3d326acd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d80a9a6b8f19f3d326acd" 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></h4><div class="notion-text notion-block-2621670ffa6d80958551c9b42b696b9a">单例模式：Spring中Bean就是单例。</div><div class="notion-text notion-block-2621670ffa6d80df9bd0e20de271145a">工厂模式：对象都通过工厂方法new出来，不用关心对象创建过程。</div><div class="notion-text notion-block-2621670ffa6d802194bad8c09e5d553f">观察者模式/发布-订阅模式：MetaQ和EventBus</div><div class="notion-text notion-block-2621670ffa6d80a5893ce15d9171b018">责任链：Spring中的Filer多个过滤器依次处理请求</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80c3b7dddbc57afdd7cd" data-id="2611670ffa6d80c3b7dddbc57afdd7cd"><span><div id="2611670ffa6d80c3b7dddbc57afdd7cd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80c3b7dddbc57afdd7cd" title="Redis"><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">Redis</span></span></h3><div class="notion-text notion-block-2621670ffa6d80818395c402a9a18fbb">常见数据结构：string，map，list，set，有序set</div><div class="notion-text notion-block-2621670ffa6d80af8155ffa910329fb4">作用：分布式锁，限流，消息队列</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d80eba951c738b9b1cd86" data-id="2621670ffa6d80eba951c738b9b1cd86"><span><div id="2621670ffa6d80eba951c738b9b1cd86" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d80eba951c738b9b1cd86" 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></h4><div class="notion-text notion-block-2621670ffa6d8017a5a7f5b1ea2e8fa9">令牌桶算法：拿到令牌才能访问，定时向令牌桶中放置令牌。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d802489bed3b31c6b1638" data-id="2611670ffa6d802489bed3b31c6b1638"><span><div id="2611670ffa6d802489bed3b31c6b1638" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d802489bed3b31c6b1638" 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></h4><div class="notion-text notion-block-2621670ffa6d803eb46de395f075525b">缓存穿透：无效key即不在数据库里也不在Redis。布隆过滤器，接口限流。</div><div class="notion-text notion-block-2621670ffa6d8096a3bfdac134951b45">缓存击穿：热点数据在数据库中，不在缓存中。提前预热热点数据。</div><div class="notion-text notion-block-2621670ffa6d80a0aa25c900b2cce908">缓存雪崩：缓存同一时间大面积失效。设置随机过期时间，提前预热。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2611670ffa6d80d08596d2805564d3a8" data-id="2611670ffa6d80d08596d2805564d3a8"><span><div id="2611670ffa6d80d08596d2805564d3a8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80d08596d2805564d3a8" 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></h4><div class="notion-text notion-block-2621670ffa6d80eb9960fa86b7b84ba8">mater负责写，slave负责读</div><div class="notion-text notion-block-2621670ffa6d80a3b7a8e9068b9093b8">哨兵：多一个哨兵机器用于监听机器下线，选举出一个master。主观下线表示当前哨兵认为下线，客观下线所有哨兵认为该机器下线。</div><div class="notion-text notion-block-2621670ffa6d80c1b8d4d7345c044bc3">切片机器：适合数据量大的时候，主从复制有太多冗余，将数据切片分散保存。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2621670ffa6d80fc9afce29cbd5d72cf" data-id="2621670ffa6d80fc9afce29cbd5d72cf"><span><div id="2621670ffa6d80fc9afce29cbd5d72cf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2621670ffa6d80fc9afce29cbd5d72cf" 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></h4><div class="notion-text notion-block-2621670ffa6d80f3a3f9eeefc4b95882">AOF（Append Only File）保存每一个操作命令，不存在丢失数据风险，恢复速度慢。</div><div class="notion-text notion-block-2621670ffa6d809eb882d544c5b0545b">RDB（Redis Database Snapshot）定时保存数据快照，存在丢失数据风险，恢复速度快。</div><div class="notion-text notion-block-2621670ffa6d809297f0c167af2e02a5">混合模式：结合AOF和RDB的优点。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2661670ffa6d80259d22ce721b36f282" data-id="2661670ffa6d80259d22ce721b36f282"><span><div id="2661670ffa6d80259d22ce721b36f282" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d80259d22ce721b36f282" 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></h4><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80749b7fd9291c4e044d"><li>获取锁，set if not exist，如果key存在则获取失败。</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d805fbd33edcc614c7533"><li>释放锁，删除key。</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80438d7de435565b6f2d"><li>需要设置过期时间，放在锁释放不了造成死锁。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80b9a449f28e82bd1395" data-id="2611670ffa6d80b9a449f28e82bd1395"><span><div id="2611670ffa6d80b9a449f28e82bd1395" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80b9a449f28e82bd1395" title="Dubbo"><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">Dubbo</span></span></h3><div class="notion-text notion-block-2621670ffa6d80dda0bcfe5a8fdd3436">生产者提供api包，不包括具体实现。消费者引入这个包直接使用。</div><ol start="1" class="notion-list notion-list-numbered notion-block-2621670ffa6d80769368c19dff07a547" style="list-style-type:decimal"><li><b>注册中心（Registry）</b>：生产者在此注册并发布内容，消费者在此订阅并接收发布的内容。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2621670ffa6d8014a155f2209893c1e1" style="list-style-type:decimal"><li><b>消费者（Consumer）</b>：客户端，从注册中心获取到方法，可以调用生产者中的方法。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2621670ffa6d804b9d9bf1a2baa6b6c7" style="list-style-type:decimal"><li><b>生产者（Provider）</b>：服务端，生产内容，生产前需要依赖容器（先启动容器）。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2621670ffa6d80a1b6f7ec45de5ad09c" style="list-style-type:decimal"><li><b>容器（Container）</b>：生产者在启动执行的时候，必须依赖容器才能正常启动（默认依赖的是Spring容器）。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2621670ffa6d80c4953aebae7ba7e51b" style="list-style-type:decimal"><li><b>监控（Monitor）</b>：统计服务的调用次数与时间等。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d8023b516e30601f044b9" data-id="2611670ffa6d8023b516e30601f044b9"><span><div id="2611670ffa6d8023b516e30601f044b9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d8023b516e30601f044b9" title="MySql"><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">MySql</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80c484a7f5b8b983d977" data-id="2631670ffa6d80c484a7f5b8b983d977"><span><div id="2631670ffa6d80c484a7f5b8b983d977" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80c484a7f5b8b983d977" 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></h4><div class="notion-text notion-block-2631670ffa6d8058b838d62676c1950f">ACID：原子性，一致性，隔离性，持久性</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80e7921dee020b3a1819" data-id="2631670ffa6d80e7921dee020b3a1819"><span><div id="2631670ffa6d80e7921dee020b3a1819" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80e7921dee020b3a1819" title="InnoDb"><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">InnoDb</span></span></h4><div class="notion-text notion-block-2631670ffa6d80b3a0a4ff96757b65a9">数据结构</div><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80b58558cab5668e750a"><li>二叉查找树：解决查询时间问题，二分查找</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80b897a0cf5c815f2040"><li>AVL平衡树：解决二叉查找树不平衡问题，可能会退化为链表</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80cda0efdd4fcff45f6d"><li>红黑树：解决AVL旋转耗时问题</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d807f93e1d71591ae11f9"><li>B树：解决红黑树查询耗时问题，转为多叉查找树。降低树的层级。</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80d4a303e3ca6e3379e2"><li>B+树：子节点用链表相连，非叶子节点不存储数据。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80c989c1cefe48c2d79f" data-id="2631670ffa6d80c989c1cefe48c2d79f"><span><div id="2631670ffa6d80c989c1cefe48c2d79f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80c989c1cefe48c2d79f" 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></h4><ul class="notion-list notion-list-disc notion-block-2631670ffa6d801f97bef031a76af9cc"><li>脏读：A事务回滚了，B事务读了A回滚前的脏数据。</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80a6b322c5b89d300afa"><li>不可重复读：A事务在修改数据，B在修改前和修改后都读了一下，发现不一样。</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8008988df2511d0d26fa"><li>幻读：B事务在A事务插入一行前读了一下，在插入之后读了一下，发现多了一行。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80e6ae98e89a65466f48" data-id="2631670ffa6d80e6ae98e89a65466f48"><span><div id="2631670ffa6d80e6ae98e89a65466f48" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80e6ae98e89a65466f48" 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></h4><ul class="notion-list notion-list-disc notion-block-2631670ffa6d801fbc0bda957b354a17"><li>binlog：记录每一条更改数据库的SQL</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d808cab90c1364cea1087"><li>general query log：所有查询SQL</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8033834ef4f5dfc0d069"><li>slow query log：执行时间超过long_query_time的SQL查询</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8078b946e3695e2a95c0"><li>redo log和undo log：事务日志</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80c89588d6faf731d4da" data-id="2631670ffa6d80c89588d6faf731d4da"><span><div id="2631670ffa6d80c89588d6faf731d4da" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80c89588d6faf731d4da" 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></h4><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8020a6ffff753822df6c"><li>分表分库</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8020a6ffff753822df6c"><li>垂直分表：根据业务类型纵向切分表，根据访问业务，频率切分</li><li>水平分表：基于数据的表行进行拆分，将大表拆为几个小表</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d803c9637d5fab829fdc9"><li>读写分离</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d803c9637d5fab829fdc9"><li>主表写，从表读。从表利用主表的binlog复制数据</li><li>主从同步延迟：1）对数据一致性要求高的请求直接路由到主表读。2）提升从库的机器性能。3）延迟读取，等他同步完了</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d800c9494fc5d1b561871"><li>慢Sql优化</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d800c9494fc5d1b561871"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://mp.weixin.qq.com/s/sPO-6ULwIfUexLY3V4acBg">那些年我们一起优化的SQL</a></li><li>建立有效索引</li><li>避免索引失效</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80739d87ddfebc1be221"><li>最左匹配</li><li>选择性过低</li></ul><li>索引要高效</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80798e2fc189b0cbc84c"><li>慢查询排查</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80798e2fc189b0cbc84c"><li>开启慢查询日志slow_query_log，设置慢查询日志long_query_time</li><li>select前加上explain</li><li>查看type和key，type至少要range以上</li><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80e4b50afc0df64b2180"><li>const通过唯一索引找到</li><li>range索引范围扫描</li><li>index全索引扫描</li><li>all全表扫描</li></ul></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80e595aae765d0b1be19" data-id="2611670ffa6d80e595aae765d0b1be19"><span><div id="2611670ffa6d80e595aae765d0b1be19" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80e595aae765d0b1be19" title="Mybatis"><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">Mybatis</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d800a9ce8e410ea9dcef2" data-id="2631670ffa6d800a9ce8e410ea9dcef2"><span><div id="2631670ffa6d800a9ce8e410ea9dcef2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d800a9ce8e410ea9dcef2" 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></h4><div class="notion-text notion-block-2631670ffa6d8022b19dfba44cb8997d">${}是字符串变量，有sql注入风险</div><div class="notion-text notion-block-2631670ffa6d80af8d6ac2dca675807d">#{}是参数变量，mybatis会将#{}替换为问号，执行前将问号替换为参数</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d8051aa72d1bd7ade2bb4" data-id="2631670ffa6d8051aa72d1bd7ade2bb4"><span><div id="2631670ffa6d8051aa72d1bd7ade2bb4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d8051aa72d1bd7ade2bb4" 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></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2631670ffa6d80308a19d4e35f27358c" style="list-style-type:decimal"><li>使用RowBounds，内存分页。原理是所有数据都加载到内存，把查询到的分页返回。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2631670ffa6d802bbcc8d9fef2e625c8" style="list-style-type:decimal"><li>使用物理分页，使用mysql语句中的limit x,y。x是限制几条，y是偏移量。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80e99835d63aeb6b4047" data-id="2631670ffa6d80e99835d63aeb6b4047"><span><div id="2631670ffa6d80e99835d63aeb6b4047" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80e99835d63aeb6b4047" 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></h4><ul class="notion-list notion-list-disc notion-block-2631670ffa6d80a6b376d733e945c20e"><li>增删改查：insert，delete，update，select</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d807f9320ebb28fef46d6"><li>resultMap，用于解决java对象和数据库列名不一致问题</li></ul><ul class="notion-list notion-list-disc notion-block-2631670ffa6d8070a37bc304e4503917"><li>where，when，if，forEach</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80b59012eb5a238a012e" data-id="2611670ffa6d80b59012eb5a238a012e"><span><div id="2611670ffa6d80b59012eb5a238a012e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80b59012eb5a238a012e" title="SpringBoot"><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">SpringBoot</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d8015b178df5b6b9889fb" data-id="2631670ffa6d8015b178df5b6b9889fb"><span><div id="2631670ffa6d8015b178df5b6b9889fb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d8015b178df5b6b9889fb" title="AOP"><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">AOP</span></span></h4><div class="notion-text notion-block-2631670ffa6d802c922edee1aa5a5299">面向切面编程，可以将跟业务代码无关的逻辑放到AOP中实现。如：日志，权限控制，事务控制。</div><div class="notion-text notion-block-2631670ffa6d80ee95fefa8fdab77567">在方法执行前或者执行后插入代码。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2631670ffa6d80f7b593fcad4ec395bd" data-id="2631670ffa6d80f7b593fcad4ec395bd"><span><div id="2631670ffa6d80f7b593fcad4ec395bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2631670ffa6d80f7b593fcad4ec395bd" title="IOC和DI"><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">IOC和DI</span></span></h4><div class="notion-text notion-block-2631670ffa6d8014bb9bf6cecb39b400">ioc：将对象的生命周期交给ioc容器管理，用于对象之间解耦</div><div class="notion-text notion-block-2631670ffa6d8052bcb8eace365e3d26">di：依赖注入，存在依赖的两个对象通过依赖注入连接。Autowired和Resource</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d80ed900aeab291eb9777" data-id="2611670ffa6d80ed900aeab291eb9777"><span><div id="2611670ffa6d80ed900aeab291eb9777" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80ed900aeab291eb9777" 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-1 notion-block-2661670ffa6d8069b7fee8f8a4ee032a" data-id="2661670ffa6d8069b7fee8f8a4ee032a"><span><div id="2661670ffa6d8069b7fee8f8a4ee032a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d8069b7fee8f8a4ee032a" title="RBAC模型"><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">RBAC模型</span></span></h4><div class="notion-text notion-block-2661670ffa6d80dd9aeee19068ff7a52">一个用户有多个角色，一个角色有多个权限。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2661670ffa6d80648c4dfa407ba33805"><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/attachment%3A91171666-babb-4134-b6e5-c234fd26aae5%3Aimage.png?table=block&amp;id=2661670f-fa6d-8064-8c4d-fa407ba33805&amp;t=2661670f-fa6d-8064-8c4d-fa407ba33805" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2661670ffa6d80f38a45eceb6eb105c4" data-id="2661670ffa6d80f38a45eceb6eb105c4"><span><div id="2661670ffa6d80f38a45eceb6eb105c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d80f38a45eceb6eb105c4" 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></h4><div class="notion-text notion-block-2661670ffa6d804193ecdd255180e987">一共5张表。用户表，角色表，权限表。用户和角色关系表。角色和权限关系表。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2661670ffa6d8059bf54c549800d2ef8" data-id="2661670ffa6d8059bf54c549800d2ef8"><span><div id="2661670ffa6d8059bf54c549800d2ef8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d8059bf54c549800d2ef8" title="Spring Security"><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">Spring Security</span></span></h4><div class="notion-text notion-block-2661670ffa6d80eb9fabe0d9d6082a22"><b>通用配置</b></div><ul class="notion-list notion-list-disc notion-block-2661670ffa6d802798e9cce202712b0c"><li>拦截所有需要权限控制的路径，只放开跟登录有关的。</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80c2a748e0e020b3deb8"><li>在UsernamePasswordAuthenticationFilter拦截器上自定义自己的拦截逻辑。</li></ul><div class="notion-text notion-block-2661670ffa6d80458977dd21eef68999"><b>第一次登录</b></div><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80aaac8dcf37989064ea"><li>接收用户的帐号和密码，跟数据库中核对。</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80a891c4c70cce026df0"><li>登录成功将生成的token放入redis中，value设置为用户信息</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80189713f61ba510e074"><li>在前端cookie中塞入token</li></ul><div class="notion-text notion-block-2661670ffa6d8097bd5fe9b3c43dca8d"><b>第二次登录</b></div><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80e9a1c4d6bc91cdd572"><li>解析cookie中的token，如果在redis中存在则之间返回登录成功。</li></ul><div class="notion-text notion-block-2661670ffa6d802dade6dc78b1535d37"><b>鉴权</b></div><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80659600fd46e6b0bf3d"><li>根据用户名查询用户角色和权限，将权限列表塞回给User对象。Spring Security会校验访问的接口路径是否在权限列表中。</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d804ea44df60a01c7c8ff"><li>使用hasAuthority和hasRole注解控制权限。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2661670ffa6d801e8439fd61de6fb6fa" data-id="2661670ffa6d801e8439fd61de6fb6fa"><span><div id="2661670ffa6d801e8439fd61de6fb6fa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d801e8439fd61de6fb6fa" 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-2661670ffa6d80d7856ee6206a22f40f"><b>单机任务</b></div><div class="notion-text notion-block-2661670ffa6d80ca9393e24e238b2b55">spring的schdule</div><div class="notion-text notion-block-2661670ffa6d80a6a09bcd5430bd72cf"><b>分布式任务</b></div><div class="notion-text notion-block-2661670ffa6d801d85a6ce5562e8d195">xxl-job</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2661670ffa6d802e99fecdc7f30fd0eb" data-id="2661670ffa6d802e99fecdc7f30fd0eb"><span><div id="2661670ffa6d802e99fecdc7f30fd0eb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2661670ffa6d802e99fecdc7f30fd0eb" 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-2661670ffa6d8067b5e5f44e2481fcdd"><li>轮询</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d8042ae1bda6d28a48ae8"><li>SSE：前端开启EventSource文件流，像断断续续的下载</li></ul><ul class="notion-list notion-list-disc notion-block-2661670ffa6d80248f81f980b2dd0176"><li>WebSocket：双选通信</li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[前端面试准备]]></title>
            <link>https://www.connorshen.site/article/2601670f-fa6d-809e-a932-c86d181b816d</link>
            <guid>https://www.connorshen.site/article/2601670f-fa6d-809e-a932-c86d181b816d</guid>
            <pubDate>Sun, 31 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2601670ffa6d809ea932c86d181b816d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d802f8d94e5e0bc417622" data-id="2601670ffa6d802f8d94e5e0bc417622"><span><div id="2601670ffa6d802f8d94e5e0bc417622" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d802f8d94e5e0bc417622" title="虚拟DOM"><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">虚拟DOM</span></span></h4><div class="notion-text notion-block-2601670ffa6d804f92eae141c7cbc87e">虚拟DOM是什么？</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d800daeaed5cf6387db74"><li>在传统的Web应用中，数据的变化会实时地更新到用户界面中，于是每次数据微小的变化都会引起DOM的渲染。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d804a9f16e0ae29061e6d"><li>虚拟DOM是将所有的操作聚集到一块，计算出所有的变化后，统一更新一次虚拟DOM。</li></ul><div class="notion-text notion-block-2601670ffa6d80eea76fdb52ef2bc356">虚拟DOM作用</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80f69c4fcccdefaefa98"><li>提高开发效率，只需要关注业务代码。无需关注DOM更新，React会将这一切计算好。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d804b95e2ecfd50cdb911"><li>虚拟DOM感受到变化的时候，只会更新局部，而非整体。同时，虚拟DOM会减少了非常多的DOM操作 ，所以性能会提升很多</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d80fa880cf9b3fc0b3f7a" data-id="2601670ffa6d80fa880cf9b3fc0b3f7a"><span><div id="2601670ffa6d80fa880cf9b3fc0b3f7a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d80fa880cf9b3fc0b3f7a" title="React Diff算法"><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">React Diff算法</span></span></h4><ul class="notion-list notion-list-disc notion-block-2601670ffa6d800887b5cf5adbe90f7d"><li>Tree Diff：认为跨层级移动节点操作比较少，只比较同一层级的节点。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80549013ee140d06b61e"><li>Component Diff：组件类型不一样，React就认为不是同一个组件。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d805c950ddb4bec33f849"><li>Element diff：同一层级的子节点，比较唯一Key。有三类操作：插入，移动，删除。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d805084aae7bac43eeecd" data-id="2601670ffa6d805084aae7bac43eeecd"><span><div id="2601670ffa6d805084aae7bac43eeecd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d805084aae7bac43eeecd" title="React Hook原理"><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">React Hook原理</span></span></h4><div class="notion-text notion-block-2601670ffa6d80469260d050f23e8432">Fiber结构</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80c6b202d518099dec6e"><li>parent：指向父级Fiber节点：</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80028d90d4f21d8a9823"><li>child：指向子Fiber节点</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80328da4cf5082503a97"><li>sibling：指向右边的兄弟节点</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2601670ffa6d8040a0f3c1a4ef778d33"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A6deea549-691a-4a89-a673-0a879c72937c%3Aimage.png?table=block&amp;id=2601670f-fa6d-8040-a0f3-c1a4ef778d33&amp;t=2601670f-fa6d-8040-a0f3-c1a4ef778d33" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2601670ffa6d80bdaa57f506d38d38f2">为什么要用Fiber</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d8026bd88c4c15208df1a"><li>在 react16 引入 Fiber 架构之前，react 会采用递归方法对比两颗虚拟DOM树，找出需要改动的节点，然后同步更新它们，这个过程 react 称为reconcilation（协调）。在reconcilation期间，react 会同步执行操作，提交到真实 DOM 的更改，会一直占着浏览器的资源，不能中断，中断后就不能恢复，使得我们一些用户操作定时器等等事件无法得到响应，是一个非常糟糕的用户体验。</li></ul><div class="notion-text notion-block-2601670ffa6d804c923ac40e7dfdb1e6">怎么实现的</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80939b7fe9040ad55b86"><li>一个节点就是一个Fiber任务，在浏览器的requestIdleCallback回调中，判断空余时间执行Fiber任务。</li></ul><div class="notion-text notion-block-2601670ffa6d80d99b30f46a99a8bf21">Hooks原理</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d8008b451cfd90e013b27"><li>hooks 实现是基于 fiber 的，通常链表形式串起来。每次会执行链表中的Hooks更新，所以不能用在条件和循环语句中。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80bcb57fcbafb47c6963"><li>每个 fiber 节点的 memoizedState 保存了对应的数据，不同的 hooks 通过使用该对应数据完成对应的逻辑功能。</li></ul><div class="notion-text notion-block-2601670ffa6d802a9319f4d6f39e27fd">常见Hooks状态</div><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80ca8d65ca08049c0595"><li>useState/useReducer：memoizedState 等于 state 的值</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80b4b89de702c250daf1"><li>useEffect：memoizedState 保存的是 effect 链表（包含 useEffect 第一个参数回调与第二个参数依赖项数组的值）</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d806685cdea9d32ada170"><li>useRef：memoizedState 等于 { current: 当前值 }</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d802883fde16453ca044b"><li>useCallback：保存两个参数值，memoizedState 等于 [callback, deps]，缓存的是函数</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80feb251c3e3c08681ab"><li>useMemo：保存两个参数值，memoizedState 等于 [callback(), deps]，缓存的是函数执行计算结果。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d80a18217e75660a94094" data-id="2601670ffa6d80a18217e75660a94094"><span><div id="2601670ffa6d80a18217e75660a94094" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d80a18217e75660a94094" 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></h4><ul class="notion-list notion-list-disc notion-block-2601670ffa6d805c9a1bc0af53e0dd91"><li><b>解析HTML</b>：浏览器将HTML解析成DOM树。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d8065a356eec80a354171"><li><b>解析CSS</b>：浏览器将CSS解析成CSSOM树。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80d8b3ddc1f2005bc1b3"><li><b>构建渲染树</b>：浏览器将DOM树和CSSOM树结合，生成渲染树。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d8017a85ff78f67b2e749"><li><b>布局（Layout）</b>：浏览器根据渲染树计算每个节点的几何信息（位置和大小）。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d808c8125e67dcfe9eac6"><li><b>绘制（Paint）</b>：浏览器将渲染树的每个节点绘制到屏幕上。</li></ul><blockquote class="notion-quote notion-block-2601670ffa6d80c38f25d612335fc534"><div>其中Layout就是重排，Paint就是重绘</div></blockquote><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2601670ffa6d806da359dff9be906556"><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/attachment%3Afa275f4a-1491-4e3f-bf95-d77d185b6fec%3Aimage.png?table=block&amp;id=2601670f-fa6d-806d-a359-dff9be906556&amp;t=2601670f-fa6d-806d-a359-dff9be906556" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d800f890bfdc242e7a438" data-id="2601670ffa6d800f890bfdc242e7a438"><span><div id="2601670ffa6d800f890bfdc242e7a438" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d800f890bfdc242e7a438" 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></h4><ul class="notion-list notion-list-disc notion-block-2601670ffa6d808d880ed747da5c1455"><li>父向子传值：props传值</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80e59dd2ebd86c6dd168"><li>子向调用父方法：props传入回调函数</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80358847d121934cc701"><li>父调用子方法：父组件useRef拿到子组件ref，子组件在useImperativeHandle中声明暴露给父组件的方法。</li></ul><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80fea2f0ea2879b41368"><li>父跨层级向子传值：</li><ul class="notion-list notion-list-disc notion-block-2601670ffa6d80fea2f0ea2879b41368"><li>Redux</li><li>Provider，userContext</li><li>EventBus，数据流转会变得不可控，建议用在小项目上。</li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d8062b433d3851e0fbf5b" data-id="2601670ffa6d8062b433d3851e0fbf5b"><span><div id="2601670ffa6d8062b433d3851e0fbf5b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d8062b433d3851e0fbf5b" title="自己基于Provider实现Redux"><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">自己基于Provider实现Redux</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2611670ffa6d80f79fdaca0ebccfb3d4" style="list-style-type:decimal"><li>provider传参dispatch和state</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2611670ffa6d8013ae92e58020ade3e2" style="list-style-type:decimal"><li>useContext获取state和dispatch，state数据发生变化时刷新视图</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2611670ffa6d800d8818e50b9092806c" style="list-style-type:decimal"><li>dispatch根据action改变state的值</li></ol><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d80d8bcecdd051824f745" data-id="2601670ffa6d80d8bcecdd051824f745"><span><div id="2601670ffa6d80d8bcecdd051824f745" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d80d8bcecdd051824f745" 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></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2611670ffa6d80e9bbe4dd607d2a0846" style="list-style-type:decimal"><li>网络优化</li><ol class="notion-list notion-list-numbered notion-block-2611670ffa6d80e9bbe4dd607d2a0846" style="list-style-type:lower-alpha"><li>开启gzip</li><li>使用webp图片</li><li>开启Tree Shaking，移除未使用JS代码。使用MiniCssExtractPlugin进行CSS压缩。</li><li>协商缓存，强缓存</li><li>静态资源CDN</li></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2611670ffa6d80628ee7d638766d40a8" style="list-style-type:decimal"><li>渲染优化</li><ol class="notion-list notion-list-numbered notion-block-2611670ffa6d80628ee7d638766d40a8" style="list-style-type:lower-alpha"><li>减少重排重绘</li><li>虚拟列表优化</li><li>代码分割和懒加载</li><li>useMemo，memo缓存组件</li><li>节流和防抖</li></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2611670ffa6d80d79ba5fa3690c064b6" style="list-style-type:decimal"><li>进阶优化</li><ol class="notion-list notion-list-numbered notion-block-2611670ffa6d80d79ba5fa3690c064b6" style="list-style-type:lower-alpha"><li>预加载回包</li><li>SSR云端预加载回包</li></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2601670ffa6d80e2a3c5d7ff2696552a" data-id="2601670ffa6d80e2a3c5d7ff2696552a"><span><div id="2601670ffa6d80e2a3c5d7ff2696552a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2601670ffa6d80e2a3c5d7ff2696552a" 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></h4><div class="notion-text notion-block-2611670ffa6d80938c1ad1bf61518a94">CSS中使用@media根据设备的宽高映射不同的样式</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2611670ffa6d806aad7fdec733076895" data-id="2611670ffa6d806aad7fdec733076895"><span><div id="2611670ffa6d806aad7fdec733076895" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d806aad7fdec733076895" title="JSBridge原理"><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">JSBridge原理</span></span></h4><div class="notion-text notion-block-2611670ffa6d80929e2cd7194ddc2648">JSbridge用于JS和Native之间互相通信，方便数据传输和回调方法</div><div class="notion-text notion-block-2611670ffa6d805685f4db53788ebc03">JS调用JAVA：WebView.addJavascriptInterface()将对象注册到JavaScript，这个对象中@JavascriptInterface 注解标记的方法，会被暴露给 JS，使得 JS 可以直接调用这些方法。</div><div class="notion-text notion-block-2611670ffa6d80109b1cd3e679422242">JAVA调用JS：WebView.evaluateJavascript()，前端注册回调window.jsBridge.receiveNativeMessage</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2611670ffa6d807bad84e8da9f625a5e" data-id="2611670ffa6d807bad84e8da9f625a5e"><span><div id="2611670ffa6d807bad84e8da9f625a5e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d807bad84e8da9f625a5e" title="Webpack插件"><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">Webpack插件</span></span></h3><div class="notion-text notion-block-2611670ffa6d80e68ba6ed688822039a">loader：是个转换函数，输入文件输出处理过的文件。如babel，ts-loader</div><div class="notion-text notion-block-2611670ffa6d80708dc5cfa145c98eb5">plugin：插件，基于Webpack的生命周期做些扩展操作。</div><div class="notion-text notion-block-2611670ffa6d80f9a645d4fa7ff5047a">TerserPlugin：压缩JS</div><div class="notion-text notion-block-2611670ffa6d8040b463e7ab44a77dc5">cssnano：减少CSS体积</div><div class="notion-text notion-block-2611670ffa6d80d1ba42d769a49b1979">SplitChunksPlugin：切分代码块</div><ol start="1" class="notion-list notion-list-numbered notion-block-2611670ffa6d8011bba9da69c533fc5e" style="list-style-type:decimal"><li>用正则匹配三方包名，将共用的三方库打包如vender。chunks=”inital”</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2611670ffa6d803183fecfb3b51956f3" style="list-style-type:decimal"><li>非首屏入口，使用懒加载import()。chunks=”all”|”async”</li></ol></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[期货基础知识]]></title>
            <link>https://www.connorshen.site/article/2571670f-fa6d-80da-a737-ebd9788b3c0a</link>
            <guid>https://www.connorshen.site/article/2571670f-fa6d-80da-a737-ebd9788b3c0a</guid>
            <pubDate>Fri, 22 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2571670ffa6d80daa737ebd9788b3c0a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2571670ffa6d8053a723f330b02f1188" data-id="2571670ffa6d8053a723f330b02f1188"><span><div id="2571670ffa6d8053a723f330b02f1188" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d8053a723f330b02f1188" 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-2571670ffa6d80babc7df4bf36e55867" data-id="2571670ffa6d80babc7df4bf36e55867"><span><div id="2571670ffa6d80babc7df4bf36e55867" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d80babc7df4bf36e55867" 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-2571670ffa6d8073b29fd6f3886f7725">英镑，欧元，澳元。总之跟英国有关。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d807e95fbf5e4907cc830" data-id="2571670ffa6d807e95fbf5e4907cc830"><span><div id="2571670ffa6d807e95fbf5e4907cc830" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d807e95fbf5e4907cc830" 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-2571670ffa6d80f98c05d7adf0ea00b6">报价98-080=98+1/32*8+0，100块钱的债券值这么多钱</div><div class="notion-text notion-block-2571670ffa6d80af8e99f8eb22d1fd57">最后一位表示</div><table class="notion-simple-table notion-block-2571670ffa6d8051a6ecd85ec6025f63"><tbody><tr class="notion-simple-table-row notion-block-2571670ffa6d804d97d1f319036a3316"><td class="" style="width:111.328125px"><div class="notion-simple-table-cell">0</div></td><td class="" style="width:113.328125px"><div class="notion-simple-table-cell">2</div></td><td class="" style="width:113.328125px"><div class="notion-simple-table-cell">5</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">7</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d804d982ed9d4d7ca9c65"><td class="" style="width:111.328125px"><div class="notion-simple-table-cell">0</div></td><td class="" style="width:113.328125px"><div class="notion-simple-table-cell">1/32*1/4</div></td><td class="" style="width:113.328125px"><div class="notion-simple-table-cell">1/32*2/4</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1/32*3/4</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d80b4aeded13b0c149cf1" data-id="2571670ffa6d80b4aeded13b0c149cf1"><span><div id="2571670ffa6d80b4aeded13b0c149cf1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d80b4aeded13b0c149cf1" 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-2571670ffa6d80d7aca1e1f4d78afc55">紧缩货币政策，收拢市场上货币。提高国债利率，国债现货价格下降，国债期货价格下降。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d8022a6a7ffdc19df5c09" data-id="2571670ffa6d8022a6a7ffdc19df5c09"><span><div id="2571670ffa6d8022a6a7ffdc19df5c09" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d8022a6a7ffdc19df5c09" title="K线图"><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">K线图</span></span></h3><div class="notion-text notion-block-2571670ffa6d80c2bea6f0af3240714c">实体是阴线，空心是阳线</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d8000b5aefe358a99a008" data-id="25a1670ffa6d8000b5aefe358a99a008"><span><div id="25a1670ffa6d8000b5aefe358a99a008" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d8000b5aefe358a99a008" 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><table class="notion-simple-table notion-block-25a1670ffa6d804f9fd5d8a6d18cd85b"><tbody><tr class="notion-simple-table-row notion-block-25a1670ffa6d80669c0ce440cf7d110e"><td class="" style="width:298.328125px"><div class="notion-simple-table-cell">交易所</div></td><td class="" style="width:389.328125px"><div class="notion-simple-table-cell">品种</div></td></tr><tr class="notion-simple-table-row notion-block-25a1670ffa6d80058959e3e67a2c626a"><td class="" style="width:298.328125px"><div class="notion-simple-table-cell">上海期货交易所</div></td><td class="" style="width:389.328125px"><div class="notion-simple-table-cell">铜、铝、锌、铅、螺纹钢、线材、热轧
卷板、天然橡胶、黄金、白银、燃料油、
石油沥青、锡、镍、纸浆、不锈钢、纯
碱</div></td></tr><tr class="notion-simple-table-row notion-block-25a1670ffa6d80f58371eedf9a786d7d"><td class="" style="width:298.328125px"><div class="notion-simple-table-cell">郑州商品交易所</div></td><td class="" style="width:389.328125px"><div class="notion-simple-table-cell">棉花、白糖、精对苯二甲酸(PTA)、菜籽
油、小麦、早籼稻、甲醇、动力煤、玻
璃、菜籽粕、粳稻、晚籼稻、铁合金、
棉纱、苹果、红枣、尿素、花生、纯碱</div></td></tr><tr class="notion-simple-table-row notion-block-25a1670ffa6d80b1a706ffa7c580ce9d"><td class="" style="width:298.328125px"><div class="notion-simple-table-cell">大连商品交易所</div></td><td class="" style="width:389.328125px"><div class="notion-simple-table-cell">玉米、黄大豆、豆粕、豆油、棕榈油、
线型低密度聚乙烯(LLDPE)、聚氯乙烯
(PUC)、聚丙烯、焦炭、焦煤、铁矿石、
鸡蛋、胶合板、纤维板、玉米淀粉、粳
米、生猪、乙二醇、苯乙烯期货、液化
石油</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d80a79d19f255bc2ee45c" data-id="25a1670ffa6d80a79d19f255bc2ee45c"><span><div id="25a1670ffa6d80a79d19f255bc2ee45c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d80a79d19f255bc2ee45c" 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-25a1670ffa6d80f1b6d4df72842877e1">买方做期转现的实际交收成本为：交收价-（平仓价-开仓价）</div><div class="notion-text notion-block-25a1670ffa6d8032a408caf8021edbc3">卖方做期转现的实际售价：交收价+（开仓价-平仓价）</div><div class="notion-text notion-block-25a1670ffa6d8092b449efd931af3598">双方愿意做期转现的条件为 0&lt;平仓价-交收价&lt;交割成本</div><div class="notion-text notion-block-25a1670ffa6d80fb94eec28485e78ba8">交割成本卖方出</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d807f9605ebdce907cacd" data-id="25a1670ffa6d807f9605ebdce907cacd"><span><div id="25a1670ffa6d807f9605ebdce907cacd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d807f9605ebdce907cacd" 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-25a1670ffa6d8063855ae90200351c72">移动平均线MA</div><div class="notion-text notion-block-25a1670ffa6d80eebeecc0c20e453c59">平滑异同移动平均线MACD</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d8081b703dd4fb6686e53" data-id="25a1670ffa6d8081b703dd4fb6686e53"><span><div id="25a1670ffa6d8081b703dd4fb6686e53" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d8081b703dd4fb6686e53" 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-25a1670ffa6d803ebad0d4c5fb67ea0b">隐含回购利率 = [(到期结算金额 - 初始结算金额) / 初始结算金额] × (365 / 回购天数) × 100%</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25b1670ffa6d8023996cd6829a84a687" data-id="25b1670ffa6d8023996cd6829a84a687"><span><div id="25b1670ffa6d8023996cd6829a84a687" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d8023996cd6829a84a687" 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-25a1670ffa6d806fa58ffbc752296028">利率互换，一方给另一方打的钱。期末大于期初，买方向卖方支付。用于固定利率。</div><div class="notion-text notion-block-25b1670ffa6d8018bf7ef5fe32447eeb"></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25b1670ffa6d80f59bbdc10fb7dab170" data-id="25b1670ffa6d80f59bbdc10fb7dab170"><span><div id="25b1670ffa6d80f59bbdc10fb7dab170" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d80f59bbdc10fb7dab170" title="CTD债券"><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">CTD债券</span></span></h3><div class="notion-text notion-block-25b1670ffa6d80c98d40da3730b2d62e">最便宜可交割债券，Cheapest to delivery</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25b1670ffa6d80129e9bdf0c5ad50399" data-id="25b1670ffa6d80129e9bdf0c5ad50399"><span><div id="25b1670ffa6d80129e9bdf0c5ad50399" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d80129e9bdf0c5ad50399" 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><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25b1670ffa6d8052bcb7cbb60e5a5198" data-id="25b1670ffa6d8052bcb7cbb60e5a5198"><span><div id="25b1670ffa6d8052bcb7cbb60e5a5198" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d8052bcb7cbb60e5a5198" 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-25b1670ffa6d808d9eb0ef534ca1bcf0">换两次本金，交割两次。适合1月需要美元，3月需要人民币的公司</div><div class="notion-text notion-block-25b1670ffa6d8069ac61df4335714ae3">第一次交割：甲买入美元卖出欧元，乙买入欧元卖出美元</div><div class="notion-text notion-block-25b1670ffa6d80508c72e239d837b838">第二次交割：甲买入欧元卖出美元，乙买入美元卖出欧元</div><div class="notion-text notion-block-25b1670ffa6d8094a87fd8f4a7f20052">6.2300/6.2340，前面为买入价，后面为卖出价</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25c1670ffa6d807884f5d631405b7d8b" data-id="25c1670ffa6d807884f5d631405b7d8b"><span><div id="25c1670ffa6d807884f5d631405b7d8b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25c1670ffa6d807884f5d631405b7d8b" 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-25c1670ffa6d80fd8c80cce2402591e9">价格=现价+利息-红利=现价+持仓成本</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25b1670ffa6d80fda218f116c4be7360" data-id="25b1670ffa6d80fda218f116c4be7360"><span><div id="25b1670ffa6d80fda218f116c4be7360" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d80fda218f116c4be7360" 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><table class="notion-simple-table notion-block-25b1670ffa6d80a68569cf3911b1b861"><tbody><tr class="notion-simple-table-row notion-block-25b1670ffa6d80b6be58c3a01dc8487f"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">类型</div></td><td class="" style="width:209.328125px"><div class="notion-simple-table-cell">方向</div></td><td class="" style="width:239px"><div class="notion-simple-table-cell">目的</div></td></tr><tr class="notion-simple-table-row notion-block-25b1670ffa6d8023b831ebb69d0344ed"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">利率互换</div></td><td class="" style="width:209.328125px"><div class="notion-simple-table-cell">买方收取浮动利息，支付固定利率。
卖方支付浮动利息，收取固定利息。</div></td><td class="" style="width:239px"><div class="notion-simple-table-cell">看多利率</div></td></tr><tr class="notion-simple-table-row notion-block-25b1670ffa6d80e793cbc873a9a5860a"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">外汇掉期</div></td><td class="" style="width:209.328125px"><div class="notion-simple-table-cell">买方收入基准货币，期末支付基准货币。</div></td><td class="" style="width:239px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-25c1670ffa6d8096befdfdeae082c70a"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">货币互换</div></td><td class="" style="width:209.328125px"><div class="notion-simple-table-cell">买方收入外币，支付外币利息
卖方收入支付外币，收取外币利息</div></td><td class="" style="width:239px"><div class="notion-simple-table-cell">对现有利率不满</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25c1670ffa6d809c9fdae243ced767a7" data-id="25c1670ffa6d809c9fdae243ced767a7"><span><div id="25c1670ffa6d809c9fdae243ced767a7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25c1670ffa6d809c9fdae243ced767a7" 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-25c1670ffa6d808d9a32d86b40e9f788">短期：指数报价法，100减去不带百分号的年利率</div><div class="notion-text notion-block-25c1670ffa6d80bb871bd89fad5e10e5">长期：价格报价法，百元面值国债净价</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25c1670ffa6d802a912ad21ccc56289f" data-id="25c1670ffa6d802a912ad21ccc56289f"><span><div id="25c1670ffa6d802a912ad21ccc56289f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25c1670ffa6d802a912ad21ccc56289f" 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-25c1670ffa6d80d389cbd62d86fd2601">麦考利久期：单位年，债券投资的加权平均回收时间。</div><div class="notion-text notion-block-25c1670ffa6d8098a10df2c2b499c847">修正久期：麦考利久期发展而来，衡量债券价格对利率的敏感性。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25c1670ffa6d80b5a0baf0548535876c" data-id="25c1670ffa6d80b5a0baf0548535876c"><span><div id="25c1670ffa6d80b5a0baf0548535876c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25c1670ffa6d80b5a0baf0548535876c" 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-25c1670ffa6d80239942dc7944b85b48"></div><div class="notion-text notion-block-25c1670ffa6d8071866cf66bd1d33113">资金占用成本使用市场利率，利息使用票面利率</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25d1670ffa6d808bbcbee86edbac6bc0" data-id="25d1670ffa6d808bbcbee86edbac6bc0"><span><div id="25d1670ffa6d808bbcbee86edbac6bc0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25d1670ffa6d808bbcbee86edbac6bc0" 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><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-25d1670ffa6d8003b88aeeb3915a395a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:638px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3483f623-b1bf-4183-b26e-9f1c281f8c50%3Aimage.png?table=block&amp;id=25d1670f-fa6d-8003-b88a-eeb3915a395a&amp;t=25d1670f-fa6d-8003-b88a-eeb3915a395a" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25d1670ffa6d803b8982c523ca4512fb" data-id="25d1670ffa6d803b8982c523ca4512fb"><span><div id="25d1670ffa6d803b8982c523ca4512fb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25d1670ffa6d803b8982c523ca4512fb" 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-25d1670ffa6d802294e7e1b753c7a157">外汇期货最先在世界上出现，美国芝加哥CME</div><div class="notion-text notion-block-25d1670ffa6d80489e2beb8b27f3ddb7">利率期货最先在美国出现，CBOT政府国民抵押债券</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25d1670ffa6d804f9017fd2890879666" data-id="25d1670ffa6d804f9017fd2890879666"><span><div id="25d1670ffa6d804f9017fd2890879666" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25d1670ffa6d804f9017fd2890879666" 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-25d1670ffa6d8062a452c95e7e00ce5d">RSI大于50，超买。小于50超卖。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25d1670ffa6d80958135f9c73a0d1541" data-id="25d1670ffa6d80958135f9c73a0d1541"><span><div id="25d1670ffa6d80958135f9c73a0d1541" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25d1670ffa6d80958135f9c73a0d1541" 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-25d1670ffa6d800fbdd5dfdd1567b896">结算价按最后一小时加权平均价</div><div class="notion-text notion-block-25d1670ffa6d80fcabffe0a4ff301908">交割价按最后两小时算术平均价</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25d1670ffa6d804b92daf22c0c1f50bd" data-id="25d1670ffa6d804b92daf22c0c1f50bd"><span><div id="25d1670ffa6d804b92daf22c0c1f50bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25d1670ffa6d804b92daf22c0c1f50bd" 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><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-25d1670ffa6d80d79676de182b06c4b6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:652px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2a46fe5e-33a2-4c4c-9a2a-e410c9e1b1db%3Aimage.png?table=block&amp;id=25d1670f-fa6d-80d7-9676-de182b06c4b6&amp;t=25d1670f-fa6d-80d7-9676-de182b06c4b6" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2611670ffa6d80ed8e84e706674a6b44" data-id="2611670ffa6d80ed8e84e706674a6b44"><span><div id="2611670ffa6d80ed8e84e706674a6b44" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d80ed8e84e706674a6b44" 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-2611670ffa6d802cbf60d60081f2a4b8">最早期货交易所CBOT芝加哥期货交易所</div><div class="notion-text notion-block-2611670ffa6d80ae8cd9e76a64bc7895">最早金属交易所LME伦敦金属交易所</div><div class="notion-text notion-block-2611670ffa6d8029b251d8b256765eed">最早金融期货，芝加哥商业交易所CME设立了国际货币市场分部</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2611670ffa6d8005bbfbdb9fc6ff9d30" data-id="2611670ffa6d8005bbfbdb9fc6ff9d30"><span><div id="2611670ffa6d8005bbfbdb9fc6ff9d30" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d8005bbfbdb9fc6ff9d30" 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-2611670ffa6d803ba3f6dee2e2341163">道琼斯和日经是算数平均</div><div class="notion-text notion-block-2611670ffa6d80e9ac65c724e186eab5">其他都是加权平均</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2611670ffa6d806bb5bce6bab543b6b6" data-id="2611670ffa6d806bb5bce6bab543b6b6"><span><div id="2611670ffa6d806bb5bce6bab543b6b6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2611670ffa6d806bb5bce6bab543b6b6" 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><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2611670ffa6d80d080a0f29304210080"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:347px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ab44027fa-2239-43d4-951b-f8dd7136449d%3Aimage.png?table=block&amp;id=2611670f-fa6d-80d0-80a0-f29304210080&amp;t=2611670f-fa6d-80d0-80a0-f29304210080" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2611670ffa6d80939b5cd52c7c2ebfd0">先买后卖：6.4343，45.23，55.15</div><div class="notion-text notion-block-2611670ffa6d80609935e61e142fa0df">先卖后买：6.4340，40.04，60.15</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[台州银行招聘准备]]></title>
            <link>https://www.connorshen.site/article/2591670f-fa6d-80da-8abd-e4cada1d81bc</link>
            <guid>https://www.connorshen.site/article/2591670f-fa6d-80da-8abd-e4cada1d81bc</guid>
            <pubDate>Sun, 24 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2591670ffa6d80da8abde4cada1d81bc"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-25f1670ffa6d8080a6ebc3d0f0fd0809" data-id="25f1670ffa6d8080a6ebc3d0f0fd0809"><span><div id="25f1670ffa6d8080a6ebc3d0f0fd0809" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25f1670ffa6d8080a6ebc3d0f0fd0809" 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><table class="notion-simple-table notion-block-25f1670ffa6d805a956aca77624f272e"><tbody><tr class="notion-simple-table-row notion-block-25f1670ffa6d80938a2ec85dd053e9c0"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">内容</div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">地址</div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">密码</div></td></tr><tr class="notion-simple-table-row notion-block-25f1670ffa6d806f92d9deb11065d181"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">面试指北</div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.yuque.com/snailclimb/mf2z3k">https://www.yuque.com/snailclimb/mf2z3k</a>?</div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">cnk4</div></td></tr><tr class="notion-simple-table-row notion-block-25f1670ffa6d80c98852d84906d195d1"><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">必读源码</div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.yuque.com/snailclimb/gepg7u/ighw8v">https://www.yuque.com/snailclimb/gepg7u/ighw8v</a></div></td><td class="" style="width:236.33333333333334px"><div class="notion-simple-table-cell">ihvn</div></td></tr></tbody></table><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2591670ffa6d80d6b94bc9bca15a50bb" data-id="2591670ffa6d80d6b94bc9bca15a50bb"><span><div id="2591670ffa6d80d6b94bc9bca15a50bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2591670ffa6d80d6b94bc9bca15a50bb" 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-2591670ffa6d80988bc8c4dfd482de76"><b>工作职责</b></div><div class="notion-text notion-block-2591670ffa6d80b49d45d5404f9032b6">1、了解业务需求，负责银行相关应用的技术方案设计、功能开发、产品交付及软件质量控制工作；
2、根据用户需求完成软件开发和交付，包括需求分析、系统设计、编码实现，完成交付所需要的测试及其他准备工作；
3、梳理相关系统的接入标准、功能逻辑与输出能力，维护与其他系统之间的调用关系，改善系统间的服务治理；
4、负责相关系统的上线投产、版本升级变更以及优化改进维护，配合分析并解决软件故障，提升系统的安全可用性。</div><div class="notion-text notion-block-2591670ffa6d806b9184eea2b9b0964e"><b>任职要求</b></div><div class="notion-text notion-block-2591670ffa6d80e6b6adc2f4996239f3">1、本科及以上学历，计算机软件等相关专业毕业，二年及以上软件开发经验，；
2、熟悉计算机体系架构、主流操作系统、数据库、网络、信息安全基础理论及知识结构，至少掌握OS/主流数据库/中间件/应用开发框架的一套技术栈与开发工具；
3、熟悉SpringCloud、Dubbo等微服务框架和技术；
4、至少精通一种主流开发语言或开发技术，如Java/C/C++等，或JSP/ASP/Javascript/HTML及存储过程开发，熟悉前后端框架，如Spring/Hibernate/Mybatis/JQuery等，熟悉常见设计模式。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2591670ffa6d806ba778dc82e883cf9c" data-id="2591670ffa6d806ba778dc82e883cf9c"><span><div id="2591670ffa6d806ba778dc82e883cf9c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2591670ffa6d806ba778dc82e883cf9c" 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-25a1670ffa6d80a8821cec84a4b4be8a" data-id="25a1670ffa6d80a8821cec84a4b4be8a"><span><div id="25a1670ffa6d80a8821cec84a4b4be8a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d80a8821cec84a4b4be8a" 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></h4><div class="notion-text notion-block-25a1670ffa6d801fb747f423e5b87e08">这组技能的核心是能独立完成 “前端页面呈现 - 后端逻辑处理 - 数据库交互” 的全流程 Web 开发：</div><ul class="notion-list notion-list-disc notion-block-25a1670ffa6d80d39bf6ec42d70d4fe6"><li>既能用 HTML+JavaScript 构建用户友好的前端界面，又能通过 JSP/ASP 实现后端业务逻辑（如用户登录验证、订单处理），同时能编写存储过程高效操作数据库（如查询用户信息、统计交易数据）。</li></ul><ul class="notion-list notion-list-disc notion-block-25a1670ffa6d80ee9b91de5974283e63"><li>适合开发需要前后端紧密配合的 Web 应用，尤其在传统企业级系统（如银行、政务系统）中，这类技术组合常用于快速实现功能完整、数据交互频繁的业务系统。</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-25a1670ffa6d801b9b07ccf9889f9748" data-id="25a1670ffa6d801b9b07ccf9889f9748"><span><div id="25a1670ffa6d801b9b07ccf9889f9748" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d801b9b07ccf9889f9748" 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-25a1670ffa6d808c8725f4e4a4dbe3c9" data-id="25a1670ffa6d808c8725f4e4a4dbe3c9"><span><div id="25a1670ffa6d808c8725f4e4a4dbe3c9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d808c8725f4e4a4dbe3c9" 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-25c1670ffa6d80bd8da0e0938511d84f">项目名称：动态化广告渲染</div><div class="notion-text notion-block-25a1670ffa6d8092a9daf379f3664aaa">背景：在激励视频广告场景下，负责React Native跨平台动态化广告系统的前端开发，实现广告模板的动态化渲染。运行于手机QQ、全民K歌、酷狗等宿主App上。</div><div class="notion-text notion-block-25a1670ffa6d80a89f19e893e76c84b7">技术栈：Java，Android，React，ReactNative，Redux，Webpack</div><div class="notion-text notion-block-25c1670ffa6d8057b6b2f2bb3fdd444e">职责：前端开发，前端性能优化，CI/CD流水线维护，团队提效</div><div class="notion-text notion-block-25c1670ffa6d80dd9bd6c4bad48e1c63">工作内容：</div><ol start="1" class="notion-list notion-list-numbered notion-block-25a1670ffa6d808bb2a0cb2ce8f3584f" style="list-style-type:decimal"><li>参与需求评审，技术方案设计。按设计稿实现点击激励，视频激励，点滑摇广告等广告形态开发。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80199a9bf6c537dd68a9" style="list-style-type:decimal"><li>通过JAVA+XML绘制原生广告视频播放组件，注册至RN后供前端调用。将广告视频播放成功率控制在90%以上。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-25b1670ffa6d8012831af3a176740fd1" style="list-style-type:decimal"><li>基于React Hook封装摇动、曝光上报、数据请求等带状态的逻辑提升逻辑复用度。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-25a1670ffa6d8088abaec92eaaf79939" style="list-style-type:decimal"><li>基于SQLite实现广告曝光和播放的延时批量上报系统。通过单例设计模式管理SQLiteDatabase和synchronized互斥锁机制将并发访问转为串行访问，将上报成功率控制在98%以上。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80b3a5d4fe0fa9a1fd21" style="list-style-type:decimal"><li>通过Webpack代码分割、ReactNative引擎预热、广告资源预加载等手段优化广告秒开率至85%。</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-25a1670ffa6d805aa563d526dc2ef185" style="list-style-type:decimal"><li>在Node.js环境下开发VSCode插件。使用live-server，fs等库启动热更新服务实现广告模板的实时预览。达到边编辑广告模板边预览的效果，提升团队成员的开发效率。</li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80a78574c0a018604839" style="list-style-type:decimal"><li>配置CI/CD流水线，解决日常打包错误。使用Python脚本实现广告模板错误定时告警流水线，自动检测模板格式兼容问题并通过WebHook报告至企业微信群。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d8065a1b3e46da7479879" data-id="25a1670ffa6d8065a1b3e46da7479879"><span><div id="25a1670ffa6d8065a1b3e46da7479879" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d8065a1b3e46da7479879" 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-25b1670ffa6d80a7b3eae74709dfb960" data-id="25b1670ffa6d80a7b3eae74709dfb960"><span><div id="25b1670ffa6d80a7b3eae74709dfb960" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d80a7b3eae74709dfb960" 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></h4><div class="notion-text notion-block-25c1670ffa6d80da9e74e00ad81a3c72">项目名称：阿里商旅AI旅小助</div><div class="notion-text notion-block-25b1670ffa6d80f193e6f5370bfae7d9">背景：在商旅行业中，企业和个人用户面临着管控规则繁杂、商旅知识碎片化以及天气实时信息影响出行决策等问题，传统问答方式难以高效精准地提供所需信息。为解决这些痛点，打造了商旅AI旅小助，利用RAG技术提升问答服务质量。</div><div class="notion-text notion-block-25b1670ffa6d80f6bdffca946eadf90a">技术栈：Java，Springboot，Redis，Mybatis，MySql，RAG，React</div><div class="notion-text notion-block-25b1670ffa6d8082a659f33969acc83e">职责：全栈开发，向量知识库管理</div><div class="notion-text notion-block-25c1670ffa6d80faa642f984cd632f82">工作内容：</div><ol start="1" class="notion-list notion-list-numbered notion-block-25b1670ffa6d8085a674edb1817cc773" style="list-style-type:decimal"><li>基于Spring Security+Token+Redis实现统一认证授权和鉴权，使用RBAC权限模型实现动态权限控制。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25b1670ffa6d803c8cadd75885e4ad2a" style="list-style-type:decimal"><li>意图识别模块搭建：借助Qwen2大模型完成用户问题切分和意图识别功能。准确区分管控、预定、商旅知识问答、出发地天气查询等业务类型，实现用户需求的精准路由。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80a4ad6ce1c74a76e168" style="list-style-type:decimal"><li>知识向量库构建：基于飞猪知识向量库能力，将语雀文档转成结构化数据后存入向量数据库并打上标签。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80c9b261c9e8e815deaa" style="list-style-type:decimal"><li>知识向量库匹配：利用CompletableFuture+自定义线程池并行化RAG检索过程，实现对多个向量库的高效并发匹配，将知识检索阶段耗时从8s降低到1s。匹配过程使用Bert模型计算句向量之间的余弦距离后找出最相似的问题答案对。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80a5a2f5dd0266278401" style="list-style-type:decimal"><li>会话记忆模块：将多轮对话上下文缓存至MySql，支持文本超长时记忆压缩。解决分布式系统请求时记忆丢失问题。</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-25b1670ffa6d807cb8a1fc232ff1562d" style="list-style-type:decimal"><li>开发用户反馈功能，收集用户对回答的满意度。依据反馈对知识库进行迭代优化，持续提升平台服务质量。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-25b1670ffa6d80ce9673e5dc5d7bc69e" data-id="25b1670ffa6d80ce9673e5dc5d7bc69e"><span><div id="25b1670ffa6d80ce9673e5dc5d7bc69e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25b1670ffa6d80ce9673e5dc5d7bc69e" 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></h4><div class="notion-text notion-block-25c1670ffa6d80ef9092c66f37211698">项目名称：阿里商旅供应链开发</div><div class="notion-text notion-block-25b1670ffa6d807db4c0c32faf38a352">背景：该项目为飞猪B端的阿里商旅业务，拥有机票、酒店、火车票和用车四个类目，满足企业用户对员工出行的一站式管理需求，实现预订流程高效化、管控精准化。</div><div class="notion-text notion-block-25b1670ffa6d804a8e22fafa30cb5ab5">技术栈：React，Antd，TypeScript，Redux，HybridApp，NodeJS中间件，Redis，RPC框架</div><div class="notion-text notion-block-25b1670ffa6d80968191cb04d9a4eee3">职责：前端开发，前端性能优化</div><div class="notion-text notion-block-25c1670ffa6d8061846afb3459384484">工作内容：</div><ol start="1" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80238635fc9a0496cdbd" style="list-style-type:decimal"><li>负责机票和火车票的预订链路前端开发，复用飞猪前端组件库。确保前端界面交互友好、操作流畅。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25c1670ffa6d80f1a786c96262666368" style="list-style-type:decimal"><li>负责企业管理后台管控相关功能的全栈开发，通过RPC（内部称为HSF框架，类似Dubbo）调用查询和更改企业维度管控信息。存储的管控配置用于企业用户预订时拦截。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-25b1670ffa6d8090ae36cff3d7aa3e86" style="list-style-type:decimal"><li>设计预加载SDK，针对多维度预加载策略设计上报方案。使用接口预加载，钉钉离线包，渐进式加载和SSR预加载做页面性能优化，将页面FMP（First Meaning Paint）指标稳定在85%。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-25b1670ffa6d801daad3ee9a681956af" style="list-style-type:decimal"><li>使用Rax的虚拟列表优化火车票长列表，实现按需加载。在低端机上使200+项列表滚动帧率稳定在60fps。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80bb9432dc507dfa7e54" style="list-style-type:decimal"><li>Node中间件设计：实现HTTP请求代理转发至RPC协议，利用Redis实现参数高速缓存。设计缓存过期方案，保证缓存有效性。高速缓存用于SSR渲染时，提前拉取页面回包。</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-25b1670ffa6d80e2a094e71c1f9e7979" style="list-style-type:decimal"><li>基于美杜莎i18n，设计实时语言切换功能。实现中、英、日三语支持，通过动态加载语言包减少首屏资源占用。统一管理多语言文案，满足跨国企业使用需求。</li></ol></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[期货法律法规]]></title>
            <link>https://www.connorshen.site/article/2571670f-fa6d-802c-b5d3-ffe4a63ca16e</link>
            <guid>https://www.connorshen.site/article/2571670f-fa6d-802c-b5d3-ffe4a63ca16e</guid>
            <pubDate>Fri, 22 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2571670ffa6d802cb5d3ffe4a63ca16e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2571670ffa6d8018bccbf0c557cdb5b4" data-id="2571670ffa6d8018bccbf0c557cdb5b4"><span><div id="2571670ffa6d8018bccbf0c557cdb5b4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d8018bccbf0c557cdb5b4" 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-2571670ffa6d805e93a4faaa1a0cbd7d" data-id="2571670ffa6d805e93a4faaa1a0cbd7d"><span><div id="2571670ffa6d805e93a4faaa1a0cbd7d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d805e93a4faaa1a0cbd7d" 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-2571670ffa6d8001ae2fd79ed1fdd251">净资产=总资产−总负债</div><div class="notion-text notion-block-2571670ffa6d80aca522d6e6df802ed0">净资本=净资产−风险调整项+附属净资本</div><div class="notion-text notion-block-2571670ffa6d8041ad26f949fb340c45">净资本是用于金融机构用于风险控制</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d801fa1ecfa3c97add39c" data-id="25a1670ffa6d801fa1ecfa3c97add39c"><span><div id="25a1670ffa6d801fa1ecfa3c97add39c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d801fa1ecfa3c97add39c" 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><ol start="1" class="notion-list notion-list-numbered notion-block-25a1670ffa6d8079a91fd240a9070522" style="list-style-type:decimal"><li>净资本不得低于人民币3000万元</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80518324d2e37e212755" style="list-style-type:decimal"><li>净资本与公司风险资本准备的比例不得低于100%; </li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-25a1670ffa6d805faa75c166e365ea76" style="list-style-type:decimal"><li>资本与净资产的比例不得低于20%; </li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-25a1670ffa6d802cb9b5e7b6a4e02629" style="list-style-type:decimal"><li>流动资产与流动负债的比例不得低于100%; </li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-25a1670ffa6d8036afd0e848e8c0f618" style="list-style-type:decimal"><li>负债与净资产的比例不得高于150%; </li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-25a1670ffa6d801b90c6fd2562d06580" style="list-style-type:decimal"><li>规定的最低限额结算准备金要求。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d80978dadcbfc0053a06a" data-id="25a1670ffa6d80978dadcbfc0053a06a"><span><div id="25a1670ffa6d80978dadcbfc0053a06a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d80978dadcbfc0053a06a" 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><ol start="1" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80ce885ec73a965870c9" style="list-style-type:decimal"><li>注册资本不低于人民币1亿元，且净资本不低于人民币8000万元；</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80bfaf0ef0a9549776a0" style="list-style-type:decimal"><li>申请日前6个月的风险监管指标持续符合监管要求；</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80c7a67bdd8da9c1c97e" style="list-style-type:decimal"><li>具有3年以上期货从业经历并取得期货投资咨询从业资格的高级管理人员不少于1名，具有2年以上期货从业经历并取得期货投资咨询从业资格的业务人员不少于5名，且前述高级管理人员和业务人员最近3年内无不良诚信记录，未受到行政、刑事处罚，且不存在因涉嫌违
法违规正被有权机关调查的情形；</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80959c57d33ee5da7d10" style="list-style-type:decimal"><li>具有完备的期货投资咨询业务管理制度；</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80269065ff4ffdd7e227" style="list-style-type:decimal"><li>近3年内未因违法违规经营受到行政、刑事处罚，且不存在因涉嫌重大违法违规正被有权机关调查的情形； </li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80b19c92d8e299612297" style="list-style-type:decimal"><li>近1年内不存在被监管机构采取《条例》规定的相关监管措施的情形；</li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-25a1670ffa6d80c2a5adf0db8935ab74" style="list-style-type:decimal"><li>中国证监会根据审慎监管原则规定的其他条件。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d8044b7cacfee4e9ba746" data-id="2571670ffa6d8044b7cacfee4e9ba746"><span><div id="2571670ffa6d8044b7cacfee4e9ba746" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d8044b7cacfee4e9ba746" 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><table class="notion-simple-table notion-block-2571670ffa6d80c5b838d695bfb9f78a"><tbody><tr class="notion-simple-table-row notion-block-2571670ffa6d807d8b87cdb0b7e6ad0e"><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">审批</div></td><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">报告</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d80c495bacf8c5b4290b9"><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">上市新品种</div></td><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">上市，修改合约</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d803892a8f7a4aee68662"><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">改规章</div></td><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">改规章细则</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d8040a75de7f10f9e6704"><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">改交易细则</div></td><td class="" style="width:369.6666666666667px"><div class="notion-simple-table-cell">ㅤ</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d80d199dbea7fd825bf76" data-id="2571670ffa6d80d199dbea7fd825bf76"><span><div id="2571670ffa6d80d199dbea7fd825bf76" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d80d199dbea7fd825bf76" 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><table class="notion-simple-table notion-block-2571670ffa6d80679165d33d1178cd3b"><tbody><tr class="notion-simple-table-row notion-block-2571670ffa6d80408939c05e17d381f5"><td class="" style="width:233.65625px"><div class="notion-simple-table-cell">名称</div></td><td class="" style="width:200.65625px"><div class="notion-simple-table-cell">收取方向</div></td><td class="" style="width:320px"><div class="notion-simple-table-cell">作用</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d80168e12fb1dfe078dbb"><td class="" style="width:233.65625px"><div class="notion-simple-table-cell">结算担保金</div></td><td class="" style="width:200.65625px"><div class="notion-simple-table-cell">交易所向会员</div></td><td class="" style="width:320px"><div class="notion-simple-table-cell">会员有违约风险时，如保证金不足</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d8023a327ea0fb9d0bfcd"><td class="" style="width:233.65625px"><div class="notion-simple-table-cell">风险准备金</div></td><td class="" style="width:200.65625px"><div class="notion-simple-table-cell">交易所手续费</div></td><td class="" style="width:320px"><div class="notion-simple-table-cell">保障市场稳定运行，如客户保证金不足违约。</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d80e79943d810a78a8ce7"><td class="" style="width:233.65625px"><div class="notion-simple-table-cell">结算准备金</div></td><td class="" style="width:200.65625px"><div class="notion-simple-table-cell">客户</div></td><td class="" style="width:320px"><div class="notion-simple-table-cell">保证金账户余额</div></td></tr><tr class="notion-simple-table-row notion-block-2571670ffa6d80d180e3f57b403d43eb"><td class="" style="width:233.65625px"><div class="notion-simple-table-cell">交易保证金</div></td><td class="" style="width:200.65625px"><div class="notion-simple-table-cell">客户</div></td><td class="" style="width:320px"><div class="notion-simple-table-cell">保证金</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2571670ffa6d806e99d5f4585cd7c7a9" data-id="2571670ffa6d806e99d5f4585cd7c7a9"><span><div id="2571670ffa6d806e99d5f4585cd7c7a9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2571670ffa6d806e99d5f4585cd7c7a9" 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-2571670ffa6d80b4a133c45979986a66">期货公司不能上场交易，子公司可以。基差交易，合作套保，点价交易。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d8005808cf9d571e6ce0b" data-id="25a1670ffa6d8005808cf9d571e6ce0b"><span><div id="25a1670ffa6d8005808cf9d571e6ce0b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d8005808cf9d571e6ce0b" 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-25a1670ffa6d8095a6b7f4163405585d">自查半年1次，培训1年1次</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d805b8dace3c1d27226b0" data-id="25a1670ffa6d805b8dace3c1d27226b0"><span><div id="25a1670ffa6d805b8dace3c1d27226b0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d805b8dace3c1d27226b0" 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-25a1670ffa6d8021a402caa2e8eb98ea">每半年一次</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-25a1670ffa6d803fada3d00b87c4a636" data-id="25a1670ffa6d803fada3d00b87c4a636"><span><div id="25a1670ffa6d803fada3d00b87c4a636" class="notion-header-anchor"></div><a class="notion-hash-link" href="#25a1670ffa6d803fada3d00b87c4a636" 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><table class="notion-simple-table notion-block-25a1670ffa6d805a97e3d1f6ccc92207"><tbody><tr class="notion-simple-table-row notion-block-25a1670ffa6d8083bc5dfa804e01fc84"><td class="" style="width:278.328125px"><div class="notion-simple-table-cell">罪名</div></td><td class="" style="width:445.328125px"><div class="notion-simple-table-cell">处罚</div></td></tr><tr class="notion-simple-table-row notion-block-25a1670ffa6d801c9cbace3522476ad4"><td class="" style="width:278.328125px"><div class="notion-simple-table-cell">擅自设立金融机构罪</div></td><td class="" style="width:445.328125px"><div class="notion-simple-table-cell">3年以下，2-20w。情节严重，3-10年，5-50w。</div></td></tr><tr class="notion-simple-table-row notion-block-25a1670ffa6d8005b5ede595f039ba08"><td class="" style="width:278.328125px"><div class="notion-simple-table-cell">伪造、变造、转让金融机构经营许可证、批准文件罪</div></td><td class="" style="width:445.328125px"><div class="notion-simple-table-cell">3年以下，2-20w。情节严重，3-10年，5-50w。</div></td></tr><tr class="notion-simple-table-row notion-block-25b1670ffa6d802a8720f276f9e2859e"><td class="" style="width:278.328125px"><div class="notion-simple-table-cell">内幕交易、泄露内幕信息罪

利用未公开信息交易罪</div></td><td class="" style="width:445.328125px"><div class="notion-simple-table-cell">5年以下。情节严重，5-10年。处罚1-5倍。</div></td></tr></tbody></table></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>