{"id":16627,"date":"2024-11-19T09:48:12","date_gmt":"2024-11-19T01:48:12","guid":{"rendered":"https:\/\/92it.top\/?p=16627"},"modified":"2024-11-19T09:48:12","modified_gmt":"2024-11-19T01:48:12","slug":"%e5%a6%82%e4%bd%95%e8%ae%be%e8%ae%a1%e4%b8%80%e5%a5%97%e9%ab%98%e6%80%a7%e8%83%bd%e7%9a%84%e7%9f%ad%e9%93%be%e7%b3%bb%e7%bb%9f%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=16627","title":{"rendered":"\u5982\u4f55\u8bbe\u8ba1\u4e00\u5957\u9ad8\u6027\u80fd\u7684\u77ed\u94fe\u7cfb\u7edf\uff1f"},"content":{"rendered":"\n<p>\u8f6c\u53d1\uff1a<a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzIwNDAyOTI2Nw==&amp;mid=2247500582&amp;idx=1&amp;sn=7b25b27b13058458ba48b0be01eeb70d&amp;chksm=96c4ef1aa1b3660cba831cac5c1960c6d1e5c9443668017bfbabfc753cd8cf5406872bda5921&amp;cur_album_id=2818595943724974083&amp;scene=190#rd\">\u5982\u4f55\u8bbe\u8ba1\u4e00\u5957\u9ad8\u6027\u80fd\u7684\u77ed\u94fe\u7cfb\u7edf\uff1f<\/a><\/p>\n\n\n\n<p>\u4ec0\u4e48\u662f\u77ed\u94fe\u7cfb\u7edf\uff1f\u5148\u8ba9\u6211\u4eec\u6765\u770b\u4e00\u5f20\u8033\u719f\u80fd\u8be6\u7684\u56fe\u7247\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"354\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-1024x354.png\" alt=\"\" class=\"wp-image-16629\" style=\"width:432px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-1024x354.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-300x104.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-768x265.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-830x287.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-230x79.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-350x121.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130-480x166.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-130.png 1048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u70b9\u51fb\u77ed\u4fe1\u91cc\u201c\u84dd\u8272\u5b57\u4f53\u201d\uff0c\u5c31\u80fd\u8df3\u8f6c\u5230\u4e00\u4e2a\u7f51\u9875\uff0c\u5176\u80cc\u540e\u7684\u79d8\u5bc6\u5c31\u662f\u4e00\u5957\u5b8c\u6574\u7684\u77ed\u94fe\u7cfb\u7edf\uff0c\u4eca\u5929\u6211\u4eec\u5c31\u6765\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u8bbe\u8ba1\u4e00\u5957\u9ad8\u6027\u80fd\u77ed\u94fe\u670d\u52a1\uff01<\/p>\n\n\n\n<p>\u4e0a\u56fe\u4e2d\u90a3\u4e32\u84dd\u8272\u5b57\u7b26\uff0c\u6709\u4e2a\u4e13\u4e1a\u7684\u672f\u8bed\u53eb\u505a\u201c\u77ed\u94fe\u201d\uff0c\u5b83\u53ef\u4ee5\u662f\u4e00\u4e2a\u94fe\u63a5\u5730\u5740\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u8ba1\u6210\u4e8c\u7ef4\u7801\u3002<\/p>\n\n\n\n<p><strong>\u4e3a\u4ec0\u4e48\u8981\u7528\u77ed\u94fe\uff1f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5b58\u5728\u5373\u5408\u7406\uff0c\u8fd9\u91cc\u5217\u4e3e 3\u4e2a\u4e3b\u8981\u539f\u56e0\u3002<\/p>\n\n\n\n<p><strong>1.\u76f8\u5bf9\u5b89\u5168<\/strong><\/p>\n\n\n\n<p>\u77ed\u94fe\u4e0d\u5bb9\u6613\u66b4\u9732\u8bbf\u95ee\u53c2\u6570\uff0c\u751f\u6210\u65b9\u5f0f\u53ef\u4ee5\u5b8c\u5168\u8fce\u5408\u77ed\u4fe1\u5e73\u53f0\u7684\u89c4\u5219\uff0c\u80fd\u591f\u6709\u6548\u5730\u89c4\u907f\u5173\u952e\u8bcd\u3001\u57df\u540d\u5c4f\u853d\u7b49\u98ce\u9669\uff0c\u800c\u539f\u59cb URL\u5730\u5740\uff0c\u5f88\u53ef\u80fd\u56e0\u4e3a\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u88ab\u77ed\u4fe1\u7cfb\u7edf\u8bef\u5224\uff0c\u5bfc\u81f4\u94fe\u63a5\u65e0\u6cd5\u8df3\u8f6c\u3002<\/p>\n\n\n\n<p><strong>2.\u7f8e\u89c2<\/strong><\/p>\n\n\n\n<p>\u5bf9\u4e8e\u7cbe\u7b80\u7684\u6587\u5b57\uff0c\u4f3c\u4e4e\u66f4\u7b26\u5408\u7f8e\u5b66\u89c2\u5ff5\uff0c\u4e0d\u592a\u8ba9\u4eba\u4ea7\u751f\u53cd\u611f\u3002<\/p>\n\n\n\n<p><strong>3.\u5e73\u53f0\u9650\u5236<\/strong><\/p>\n\n\n\n<p>\u77ed\u4fe1\u53d1\u9001\u5e73\u53f0\u6709\u5b57\u6570\u9650\u5236\uff0c\u5728\u6574\u6761\u77ed\u4fe1\u5b57\u6570\u4e0d\u53d8\u7684\u524d\u63d0\u4e0b\uff0c\u628a\u94fe\u63a5\u7f29\u77ed\uff0c\u5176\u4ed6\u90e8\u5206\u7684\u6587\u5b57\u63cf\u8ff0\u5c31\u80fd\u589e\u52a0\uff0c\u8fd9\u6837\u4f3c\u4e4e\u66f4\u80fd\u8fbe\u5230\u8be5\u77ed\u4fe1\u7684\u5b9e\u9645\u76ee\u7684\uff08\u6bd4\u5982\uff0c\u8425\u9500\uff09\u3002<\/p>\n\n\n\n<p><strong>\u77ed\u94fe\u7684\u7ec4\u6210<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u4e0b\u56fe\uff0c\u77ed\u94fe\u7684\u7ec4\u6210\u901a\u5e38\u5305\u542b\u4e24\u4e2a\u90e8\u5206\uff1a\u57df\u540d + \u968f\u673a\u7801<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"322\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131.png\" alt=\"\" class=\"wp-image-16630\" style=\"width:492px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131.png 976w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-300x99.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-768x253.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-830x274.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-230x76.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-350x115.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-131-480x158.png 480w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/figure><\/div>\n\n\n<p>\u77ed\u94fe\u7684\u57df\u540d\u6700\u597d\u548c\u5176\u4ed6\u4e1a\u52a1\u57df\u540d\u5206\u5f00\uff0c\u800c\u4e14\u8981\u5c3d\u91cf\u7b80\u77ed\uff0c\u53ef\u4ee5\u4e0d\u5177\u5907\u4e1a\u52a1\u542b\u4e49\uff08\u6bd4\u5982\uff1axyz.com\uff09\uff0c\u56e0\u4e3a\u77ed\u94fe\u5927\u90e8\u5206\u662f\u7528\u4e8e\u8425\u9500\uff0c\u53ef\u80fd\u4f1a\u88ab\u4e09\u65b9\u5e73\u53f0\u5c4f\u853d\u3002<\/p>\n\n\n\n<p>\u77ed\u94fe\u7684\u968f\u673a\u7801\u9700\u8981\u5168\u5c40\u552f\u4e00\uff0c\u5efa\u8bae 10\u4f4d\u4ee5\u4e0b\u3002<\/p>\n\n\n\n<p><strong>\u77ed\u94fe\u8df3\u8f6c\u7684\u539f\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5148\u770b\u4e00\u4e2a\u77ed\u94fe\u8df3\u8f6c\u7684\u7b80\u5355\u4f8b\u5b50\uff0c\u5982\u4e0b\u4ee3\u7801\uff0c\u5b9a\u4e49\u4e86\u4e00\u4e2a 302\u91cd\u5b9a\u5411\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.servlet.view.RedirectView;\n\n@Controller\npublic class RedirectController {\n\n  @GetMapping(\"\/{shortCode}\")\n  public RedirectView redirect(@PathVariable String shortCode) {\n    String destUrl = \"https:\/\/yuanjava.com\";\n    \/\/ destUrl = getDestUrlByShortCode(shortCode); \/\/\u771f\u5b9e\u7684\u4e1a\u52a1\u903b\u8f91\n    return new RedirectView(destUrl);\n  }\n}<\/pre>\n\n\n\n<p>\u63a5\u7740\uff0c\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee\u77ed\u94fe&#8221;http:\/\/127.0.0.1:8080\/s2TYdWd&#8221; \u540e\uff0c\u8bf7\u6c42\u4f1a\u88ab\u91cd\u5b9a\u5411\u5230 https:\/\/yuanjava.com \uff0c\u4e0b\u56fe\u4e3a\u6d4f\u89c8\u5668\u63a7\u5236\u53f0\u4fe1\u606f\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"443\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-1024x443.png\" alt=\"\" class=\"wp-image-16631\" style=\"width:518px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-1024x443.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-300x130.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-768x332.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-830x359.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-230x99.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-350x151.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132-480x208.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-132.png 1096w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u4ece\u4e0a\u56fe\uff0c\u6211\u4eec\u770b\u5230\u4e86 302\u72b6\u6001\u7801\u5e76\u4e14\u8bf7\u6c42\u88ab Location\u5230\u53e6\u5916\u4e00\u4e2a URL\uff0c\u6574\u4e2a\u4ea4\u4e92\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-1024x469.png\" alt=\"\" class=\"wp-image-16632\" style=\"width:500px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-1024x469.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-300x137.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-768x351.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-830x380.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-230x105.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-350x160.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133-480x220.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-133.png 1036w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u662f\u4e0d\u662f\u6709\u4e00\u79cd\u5077\u6881\u6362\u67f1\u7684\u611f\u89c9\uff1f\uff1f\uff1f<\/p>\n\n\n\n<p>\u6700\u540e\uff0c\u603b\u7ed3\u4e0b\u77ed\u94fe\u8df3\u8f6c\u7684\u6838\u5fc3\u601d\u60f3\uff1a<\/p>\n\n\n\n<p>\u751f\u6210\u968f\u673a\u7801\uff0c\u5c06\u968f\u673a\u7801\u548c\u76ee\u6807 URL\uff08\u957f\u94fe\uff09\u7684\u6620\u5c04\u5173\u7cfb\u5b58\u5165\u6570\u636e\u5e93\uff1b<\/p>\n\n\n\n<p>\u7528\u57df\u540d+\u968f\u673a\u7801\u751f\u6210\u77ed\u94fe\uff0c\u5e76\u63a8\u9001\u7ed9\u76ee\u6807\u7528\u6237\uff1b<\/p>\n\n\n\n<p>\u5f53\u7528\u6237\u70b9\u51fb\u77ed\u94fe\u540e\uff0c\u8bf7\u6c42\u4f1a\u5148\u5230\u8fbe\u77ed\u94fe\u7cfb\u7edf\uff0c\u77ed\u94fe\u7cfb\u7edf\u6839\u636e\u968f\u673a\u7801\u67e5\u627e\u51fa\u5bf9\u5e94\u7684\u76ee\u6807 URL\uff0c\u63a5\u7740\u5c06\u8bf7\u6c42 302\u91cd\u5b9a\u5411\u5230\u76ee\u6807 URL\uff08\u957f\u94fe\uff09\uff1b<\/p>\n\n\n\n<p>\u5173\u4e8e\u91cd\u5b9a\u5411\u6709 301 \u548c 302\u4e24\u79cd\uff0c\u5982\u4f55\u9009\u62e9\uff1f<\/p>\n\n\n\n<ul>\n<li>302\uff0c\u4ee3\u8868\u4e34\u65f6\u91cd\u5b9a\u5411\uff1a\u6bcf\u6b21\u8bf7\u6c42\u77ed\u94fe\uff0c\u8bf7\u6c42\u90fd\u4f1a\u5148\u5230\u8fbe\u77ed\u94fe\u7cfb\u7edf\uff0c\u7136\u540e\u91cd\u5b9a\u5411\u5230\u76ee\u6807 URL\uff08\u957f\u94fe\uff09\uff0c\u8fd9\u6837\uff0c\u65b9\u4fbf\u77ed\u94fe\u7cfb\u7edf\u505a\u4e00\u4e9b\u7edf\u8ba1\u70b9\u51fb\u6570\u7b49\u64cd\u4f5c\uff1b\u901a\u5e38\u91c7\u7528 302<\/li>\n\n\n\n<li>301\uff0c\u4ee3\u8868\u6c38\u4e45\u91cd\u5b9a\u5411\uff1a\u7b2c\u4e00\u6b21\u8bf7\u6c42\u62ff\u5230\u76ee\u6807\u957f\u94fe\u63a5\u540e\uff0c\u4e0b\u6b21\u518d\u6b21\u8bf7\u6c42\u77ed\u94fe\uff0c\u8bf7\u6c42\u4e0d\u4f1a\u5230\u8fbe\u77ed\u94fe\u7cfb\u7edf\uff0c\u800c\u662f\u76f4\u63a5\u8df3\u8f6c\u5230\u6d4f\u89c8\u5668\u7f13\u5b58\u7684\u76ee\u6807 URL\uff08\u957f\u94fe\uff09\uff0c\u77ed\u94fe\u7cfb\u7edf\u53ea\u80fd\u7edf\u8ba1\u5230\u7b2c\u4e00\u6b21\u8bbf\u95ee\u7684\u6570\u636e\uff1b\u4e00\u822c\u4e0d\u91c7\u7528 301\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u5982\u4f55\u751f\u6210\u77ed\u94fe\uff1f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4ece\u77ed\u94fe\u7ec4\u6210\u7ae0\u8282\u53ef\u4ee5\u603b\u7ed3\u51fa\uff1a\u77ed\u94fe=\u57df\u540d+\u968f\u673a\u7801\u3002\u56e0\u6b64\uff0c\u5982\u4f55\u751f\u6210\u77ed\u94fe\u7684\u95ee\u9898\u8f6c\u6362\u6210\u4e86\u5982\u4f55\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7801\uff0c\u800c\u4e14\u8fd9\u4e2a\u968f\u673a\u7801\u9700\u8981\u5168\u5c40\u552f\u4e00\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u6765\u8bf4\u6709 3\u79cd\u505a\u6cd5\uff1a<\/p>\n\n\n\n<p><strong>Base62<\/strong><\/p>\n\n\n\n<p>Base62 \u8868\u793a\u6cd5\u662f\u4e00\u79cd\u57fa\u6570\u4e3a62\u7684\u6570\u5236\u7cfb\u7edf\uff0c\u5305\u542b26\u4e2a\u82f1\u6587\u5927\u5199\u5b57\u6bcd\uff08A-Z\uff09\uff0c26\u4e2a\u82f1\u6587\u5c0f\u5199\u5b57\u6bcd\uff08a-z\uff09\u548c10\u4e2a\u6570\u5b57\uff080-9\uff09\u3002\u8fd9\u6837\uff0c\u5171\u670962\u4e2a\u5b57\u7b26\u53ef\u4ee5\u7528\u6765\u8868\u793a\u6570\u503c\u3002\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import java.security.SecureRandom;\n\npublic class RandomCodeGenerator {\n  private static final String CHAR_62 = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n  private static final SecureRandom random = new SecureRandom();\n\n  public static String generateRandomCode(int length) {\n    StringBuilder sb = new StringBuilder(length);\n    for (int i = 0; i &lt; length; i++) {\n      int rndCharAt = random.nextInt(CHAR_62.length());\n      char rndChar = CHAR_62.charAt(rndCharAt);\n      sb.append(rndChar);\n    }\n    return sb.toString();\n  }\n}<\/pre>\n\n\n\n<p>\u5bf9\u4e8e Base62\u7b97\u6cd5\uff0c\u5982\u679c\u662f\u751f\u6210 6\u4f4d\u968f\u673a\u6570\u6709 62^6 &#8211; 1 = 56800235583, 568\u4ebf\u591a\uff0c\u5982\u679c\u662f\u751f\u6210 7\u4f4d\u968f\u673a\u6570\u6709 62^7 &#8211; 1 = 3521614606208\uff0c\u5408\u8ba13.5\u4e07\u4ebf\u591a\uff0c\u8db3\u591f\u4f7f\u7528\u3002<\/p>\n\n\n\n<p><strong>Hash\u7b97\u6cd5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Hash\u7b97\u6cd5\u7b97\u6cd5\u662f\u6211\u4eec\u6700\u5bb9\u6613\u60f3\u5230\u7684\u529e\u6cd5\uff0c\u6bd4\u5982 MD5, SHA-1, SHA-256, MurmurHash, \u4f46\u662f\u8fd9\u79cd\u7b97\u6cd5\u751f\u6210\u7684 Hash\u7b97\u6cd5\u503c\u8fd8\u662f\u6bd4\u8f83\u957f\uff0c\u5e38\u7528\u7684\u505a\u6cd5\u662f\u628a\u8fd9\u4e2a Hash\u7b97\u6cd5\u503c\u8fdb\u884c 62\/64\u8fdb\u884c\u538b\u7f29\u3002<\/p>\n\n\n\n<p>\u5982\u4e0b\u4ee3\u7801\uff0c\u901a\u8fc7 Google\u7684 MurmurHash\u7b97\u6cd5\u628a\u957f\u94fe Hash\u6210\u4e00\u4e2a 32\u4f4d\u7684 10\u8fdb\u5236\u6b63\u6570\uff0c\u7136\u540e\u518d\u8f6c\u6362\u621062\u8fdb\u5236\uff08\u538b\u7f29\uff09\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a 6\u4f4d\u968f\u673a\u6570\uff0c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import com.google.common.hash.HashFunction;\nimport com.google.common.hash.Hashing;\nimport java.nio.charset.StandardCharsets;\n\npublic class MurmurHashToBase62 {\n\n    private static final String BASE62 = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n    public static String toBase62(int value) {\n        StringBuilder sb = new StringBuilder();\n        while (value > 0) {\n            sb.insert(0, BASE62.charAt(value % 62));\n            value \/= 62;\n        }\n        return sb.toString();\n    }\n    public static void main(String[] args) {\n        \/\/ \u957f\u94fe\n        String input = \"https:\/\/yuanjava.cnposts\/short-link-system\/design?code=xsd&amp;page=1\";\n        \/\/ \u957f\u94fe\u5229\u7528 MurmurHash\u7b97\u6cd5\u751f\u6210 32\u4f4d 10\u8fdb\u5236\u6570\n        HashFunction hashFunction = Hashing.murmur3_32();\n        int hash = hashFunction.hashString(input, StandardCharsets.UTF_8).asInt();\n        if (hash &lt; 0) {\n            hash = hash &amp; 0x7fffffff; \/\/ Convert to positive by dropping the sign bit\n        }\n        \/\/ \u5c06 32\u4f4d 10\u8fdb\u5236\u6570 \u8f6c\u6362\u6210 62\u8fdb\u5236\n        String base62Hash = toBase62(hash);\n        System.out.println(\"base62Hash:\" + base62Hash);\n    }\n}<\/pre>\n\n\n\n<p><strong>\u5168\u5c40\u552f\u4e00 ID<\/strong><\/p>\n\n\n\n<p>\u6bd4\u5982\uff0c\u5f88\u591a\u5927\u4e2d\u578b\u516c\u53f8\u90fd\u4f1a\u6709\u81ea\u5df1\u5168\u5c40\u552f\u4e00 ID \u7684\u751f\u6210\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u670d\u52a1\u5668\u751f\u6210\u7684 ID\u6765\u4fdd\u8bc1\u5168\u5c40\u552f\u4e00\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u96ea\u82b1\u7b97\u6cd5\u751f\u6210\u5168\u5c40\u552f\u4e00\u7684ID\uff0c\u518d\u7ecf\u8fc7 62\/64\u8fdb\u5236\u538b\u7f29\u3002<\/p>\n\n\n\n<p><strong>\u5982\u4f55\u89e3\u51b3\u51b2\u7a81<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5bf9\u4e8e\u4e0a\u8ff03\u79cd\u65b9\u6cd5\u7684\u524d 2\u79cd\uff1abase62 \u6216\u8005 hash\uff0c\u56e0\u4e3a\u90fd\u662f\u54c8\u5e0c\u51fd\u6570\uff0c\u6240\u4ee5\uff0c\u4e0d\u53ef\u907f\u514d\u5730\u4f1a\u4ea7\u751f\u54c8\u5e0c\u51b2\u7a81\uff08\u5c3d\u7ba1\u6982\u7387\u5f88\u4f4e\uff09\uff0c\u8be5\u600e\u4e48\u89e3\u51b3\u5462\uff1f<\/p>\n\n\n\n<p>\u8981\u89e3\u51b3\u51b2\u7a81\uff0c\u9996\u5148\u8981\u68c0\u6d4b\u51b2\u7a81\uff0c\u901a\u5e38\u6765\u8bf4\u6709 3\u79cd\u68c0\u6d4b\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p><strong>\u5229\u7528\u6570\u636e\u5e93\u9501<\/strong><\/p>\n\n\n\n<p>\u5982\u4e0b\uff0c\u8fd9\u91cc\u4ee5 MySQL\u6570\u636e\u5e93\u4e3a\u4f8b\uff08\u4e5f\u53ef\u4ee5\u4fdd\u5b58\u5728 Redis\u4e2d\uff09\uff0c\u8868\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE TABLE `short_url_map` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `long_url` varchar(160) DEFAULT NULL COMMENT '\u957f\u94fe',\n  `short_url` varchar(10) DEFAULT NULL COMMENT '\u77ed\u94fe',\n  `gmt_create` int(11) DEFAULT NULL COMMENT '\u521b\u5efa\u65f6\u95f4',\n  PRIMARY KEY (`id`),\n  UNIQUE INDEX 'short_url' ('short_url')\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;<\/pre>\n\n\n\n<p>\u9996\u5148\u521b\u5efa\u4e00\u5f20\u957f\u94fe\u548c\u77ed\u94fe\u7684\u5173\u7cfb\u6620\u5c04\u8868\uff0c\u7136\u540e\u901a\u8fc7\u7ed9 short_url\u5b57\u6bb5\u6dfb\u52a0\u552f\u4e00\u9501\uff0c\u8fd9\u6837\uff0c\u5f53\u6570\u636e\u63d2\u5165\u65f6\uff0c\u5982\u679c\u5b58\u5728 Hash\u51b2\u7a81\uff08short_url\u503c\u76f8\u7b49\uff09\uff0c\u6570\u636e\u5e93\u5c31\u4f1a\u629b\u9519\uff0c\u63d2\u5165\u5931\u8d25\uff0c\u56e0\u6b64\uff0c\u53ef\u4ee5\u5728\u4e1a\u52a1\u4ee3\u7801\u91cc\u6355\u83b7\u5bf9\u5e94\u7684\u9519\u8bef\uff0c\u8fd9\u6837\u5c31\u80fd\u68c0\u6d4b\u51fa\u51b2\u7a81\u3002<\/p>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u5148\u7528 short_url\u53bb\u67e5\u8be2\uff0c\u5982\u679c\u80fd\u67e5\u5230\u6570\u636e\uff0c\u8bf4\u660e short_url\u5b58\u5728 Hash\u51b2\u7a81\u4e86\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u8fd9\u79cd\u901a\u8fc7\u67e5\u8be2\u6570\u636e\u5e93\u6216\u8005\u4f9d\u8d56\u4e8e\u6570\u636e\u5e93\u552f\u4e00\u9501\u7684\u673a\u5236\uff0c\u56e0\u4e3a\u90fd\u6d89\u53caDB\u64cd\u4f5c\uff0c\u6240\u4ee5\u5bf9\u6570\u636e\u5e93\u662f\u4e00\u4e2a\u5f00\u9500\uff0c\u5982\u679c\u6d41\u91cf\u6bd4\u8f83\u5927\u7684\u8bdd\uff0c\u9700\u8981\u4fdd\u8bc1\u6570\u636e\u5e93\u7684\u6027\u80fd\u3002<\/p>\n\n\n\n<p><strong>\u5e03\u9686\u8fc7\u6ee4\u5668\u8fc7\u6ee4\u5668<\/strong><\/p>\n\n\n\n<p>\u5728 DB\u64cd\u4f5c\u7684\u4e0a\u6e38\u589e\u52a0\u4e00\u4e2a\u5e03\u9686\u8fc7\u6ee4\u5668\uff0c\u5728\u957f\u94fe\u751f\u6210\u77ed\u94fe\u540e\uff0c \u5148\u7528\u77ed\u94fe\u5728\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u8fdb\u884c\u67e5\u627e\uff0c\u5982\u679c\u5b58\u5728\u5c31\u4ee3\u8868\u51b2\u7a81\u4e86\uff0c\u5982\u679c\u4e0d\u5b58\u5728\uff0c\u8bf4\u660e DB\u91cc\u4e0d\u5b58\u5728\u6b64\u77ed\u94fe\uff0c\u53ef\u4ee5\u63d2\u5165\u3002\u5bf9\u4e8e\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u9009\u62e9\uff0c\u5355\u673a\u53ef\u4ee5\u91c7\u7528 Google\u7684\u5e03\u9686\u8fc7\u6ee4\u5668\uff0c\u5206\u5e03\u5f0f\u53ef\u4ee5\u4f7f\u7528 RedisBloom\u3002<\/p>\n\n\n\n<p>\u6574\u4f53\u6d41\u7a0b\u53ef\u4ee5\u62bd\u8c61\u6210\u4e0b\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"439\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-1024x439.png\" alt=\"\" class=\"wp-image-16633\" style=\"width:510px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-1024x439.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-300x129.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-768x329.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-830x356.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-230x99.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-350x150.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134-480x206.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-134.png 1138w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u68c0\u6d4b\u51fa\u4e86\u51b2\u7a81\uff0c\u9700\u8981\u5982\u4f55\u89e3\u51b3\u51b2\u7a81\uff1f<\/p>\n\n\n\n<p>\u518d Hash\uff0c\u53ef\u4ee5\u5728\u957f\u94fe\u540e\u9762\u62fc\u63a5\u4e00\u4e2a UUID\u4e4b\u7c7b\u7684\u968f\u673a\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u518d\u6b21\u8fdb\u884c Hash\uff0c\u7528\u5f97\u51fa\u7684\u65b0\u503c\u518d\u8fdb\u884c\u4e0a\u8ff0\u68c0\u6d4b\uff0c\u8fd9\u6837 Hash\u51b2\u7a81\u7684\u6982\u7387\u53c8\u5927\u5927\u5927\u7684\u964d\u4f4e\u4e86\u3002<\/p>\n\n\n\n<p><strong>\u8868\u8bbe\u8ba1<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u6574\u4e2a\u77ed\u94fe\u7cfb\u7edf\u4e2d\uff0c\u6700\u6838\u5fc3\u7684\u8868\u5c31\u662f \u957f\u94fe\u548c\u77ed\u94fe\u7684\u6620\u5c04\u5173\u7cfb\u8868\uff0c\u8868\u8bbe\u8ba1\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE TABLE `short_url_map` (\n`id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n`long_url` varchar(160) DEFAULT NULL COMMENT '\u957f\u94fe',\n`short_url` varchar(10) DEFAULT NULL COMMENT '\u77ed\u94fe',\n`gmt_create` int(11) DEFAULT NULL COMMENT '\u521b\u5efa\u65f6\u95f4',\n  PRIMARY KEY (`id`),\n  UNIQUE INDEX 'short_url' ('short_url')\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;<\/pre>\n\n\n\n<p>\u9700\u8981\u5bf9\u77ed\u94fe\u5b57\u6bb5<code>short_url<\/code>\u6dfb\u52a0\u4e00\u4e2a\u552f\u4e00\u7d22\u5f15\uff0c\u8fd9\u6837\u7684\u8bdd\uff0c\u4e00\u65b9\u9762\u53ef\u4ee5\u4fdd\u8bc1 short_url\u5168\u5c40\u552f\u4e00\uff0c\u4e00\u65b9\u9762\u53ef\u4ee5\u901a\u8fc7\u7d22\u5f15\u52a0\u5feb\u4ee5\u4e0b\u67e5\u8be2\u8bed\u53e5\u7684\u901f\u5ea6\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">select * from short_url_map  where short_url = ?<\/pre>\n\n\n\n<p><strong>\u9ad8\u5e76\u53d1\u573a\u666f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u6d41\u91cf\u4e0d\u5927\u7684\u60c5\u51b5\uff0c\u4e0a\u8ff0\u65b9\u6cd5\u600e\u4e48\u6298\u817e\u4f3c\u4e4e\u90fd\u6ca1\u6709\u95ee\u9898\uff0c\u4f46\u662f\uff0c\u4e3a\u4e86\u67b6\u6784\u7684\u5065\u58ee\u6027\uff0c\u5f88\u591a\u65f6\u5019\u9700\u8981\u8003\u8651\u9ad8\u5e76\u53d1\uff0c\u5927\u6d41\u91cf\u7684\u573a\u666f\uff0c\u56e0\u6b64\u67b6\u6784\u9700\u8981\u652f\u6301\u6c34\u5e73\u6269\u5c55\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li>\u91c7\u7528\u5fae\u670d\u52a1<\/li>\n\n\n\n<li>\u529f\u80fd\u6a21\u5757\u5206\u79bb\uff0c\u6bd4\u5982\uff0c\u77ed\u94fe\u751f\u6210\u670d\u52a1\u548c\u957f\u94fe\u67e5\u8be2\u670d\u52a1\u5206\u79bb<\/li>\n\n\n\n<li>\u529f\u80fd\u6a21\u5757\u9700\u8981\u652f\u6301\u6c34\u5e73\u6269\u5bb9\uff0c\u6bd4\u5982\uff1a\u77ed\u94fe\u751f\u6210\u670d\u52a1\u548c\u957f\u94fe\u67e5\u8be2\u670d\u52a1\u80fd\u652f\u6301\u52a8\u6001\u6269\u5bb9<\/li>\n\n\n\n<li>\u7f13\u89e3\u6570\u636e\u5e93\u538b\u529b\uff0c\u6bd4\u5982\uff0c\u5206\u533a\uff0c\u5206\u5e93\u5206\u8868\uff0c\u4e3b\u4ece\uff0c\u8bfb\u5199\u5206\u79bb\u7b49\u673a\u5236<\/li>\n\n\n\n<li>\u670d\u52a1\u7684\u9650\u6d41\uff0c\u81ea\u4fdd\u673a\u5236<\/li>\n\n\n\n<li>\u5b8c\u5584\u7684\u76d1\u63a7\u548c\u9884\u8b66\u673a\u5236<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u91cc\u7ed9\u51fa\u4e00\u5957\u6bd4\u8f83\u5b8c\u6574\u7684\u8bbe\u8ba1\u601d\u8def\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"508\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-1024x508.png\" alt=\"\" class=\"wp-image-16635\" style=\"width:496px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-1024x508.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-300x149.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-768x381.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-830x412.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-230x114.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-350x174.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136-480x238.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-136.png 1124w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p><strong>\u5206\u5e93\u5206\u8868<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5173\u4e8e\u77ed\u94fe\u548c\u957f\u94fe\u6620\u5c04\u5173\u7cfb\u8868\u7684\u5206\u5e93\u5206\u8868\u662f\u4e00\u4e2a\u91cd\u70b9\uff0c\u8fd9\u91cc\u9700\u8981\u8be6\u7ec6\u5206\u6790\u3002<\/p>\n\n\n\n<p><strong>\u662f\u5426\u9700\u8981\u5206\u5e93\u5206\u8868<\/strong><\/p>\n\n\n\n<p>\u5728\u505a\u6280\u672f\u67b6\u6784\u65f6\uff0c\u5f88\u5fcc\u8bb3\u8fc7\u5ea6\u8bbe\u8ba1\uff0c\u56e0\u6b64\uff0c\u5bf9\u4e8e\u9ad8\u5e76\u53d1\u573a\u666f\uff0c\u662f\u5426\u9700\u8981\u5206\u5e93\u5206\u8868\uff0c\u5206\u591a\u5c11\u4e2a\u5e93\uff0c\u5206\u591a\u5c11\u4e2a\u8868\uff0c\u5206\u5e93\u5206\u8868\u952e\u5982\u4f55\u9009\u62e9\u7b49\u95ee\u9898\u90fd\u5e94\u8be5\u6839\u636e\u5177\u4f53\u4e1a\u52a1\u6570\u636e\u91cf\u8fdb\u884c\u8bc4\u4f30\u3002<\/p>\n\n\n\n<p><strong>\u5206\u5e93\u5206\u8868\u952e\u9700\u8981\u5982\u4f55\u9009\u62e9<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5206\u5e93\u5206\u8868\uff0c\u5e93\u548c\u8868\u7684 PartitionKey \u8be5\u5982\u4f55\u9009\u62e9\uff1f<\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u4e00\uff1a\u77ed\u94fe\u7801\u8fdb\u884c hash\u53d6\u6a21<\/strong><\/p>\n\n\n\n<p>\u5982\u4e0b\u7b97\u6cd5\uff0c\u786e\u8ba4\u5e93\u548c\u8868\u7684\u8def\u7531\u89c4\u5219\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u5e93ID = \u77ed\u94fe\u7684 hash\u503c % \u5e93\u6570\u91cf\n\u8868ID = \u77ed\u94fe\u7684 hash\u503c \/ \u5e93\u6570\u91cf  % \u8868\u6570\u91cf<\/pre>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u9700\u8981\u6839\u636e\u4e1a\u52a1\u7684\u6570\u636e\u91cf\u4ee5\u53ca\u5e93\u8868\u8bbe\u8ba1\u9700\u8981\u652f\u6301\u51e0\u5e74\u7684\u6570\u636e\u603b\u91cf\u6765\u8bc4\u4f30\u51fa\u5e93\u7684\u6570\u91cf\u548c\u8868\u7684\u6570\u91cf\uff0c\u53e6\u5916\uff0c\u56e0\u4e3a\u77ed\u94fe\u6570\u636e\u7edd\u5927\u591a\u6570\u90fd\u662f\u4e00\u6b21\u6027\u7684\uff0c\u6240\u4ee5\u53ef\u4ee5\u5bf9\u5b58\u91cf\u6570\u636e\u8fdb\u884c\u5f52\u6863\uff0c\u8fd9\u6837\u53ef\u4ee5\u89e3\u51b3\u6570\u636e\u8fc7\u591a\u9700\u8981\u6269\u5bb9\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p><strong>\u8be5\u65b9\u6848\u7684\u4f18\u7f3a\u70b9\uff1a<\/strong><\/p>\n\n\n\n<p>\u4f18\u70b9\uff1a<\/p>\n\n\n\n<p>\u5206\u5e93\u5206\u8868\u65b9\u5f0f\u6e05\u6670\u6613\u61c2<\/p>\n\n\n\n<p>\u7f3a\u70b9\uff1a<\/p>\n\n\n\n<ul>\n<li>\u6269\u5bb9\u6bd4\u8f83\u56f0\u96be\uff0c\u6269\u5bb9\u65f6\u9700\u8981\u8fc1\u79fb\u5927\u91cf\u7684\u6570\u636e\uff1b<\/li>\n\n\n\n<li>\u6700\u5f00\u59cb\u65f6\u5c31\u9700\u8981\u628a\u5e93\u548c\u8868\u5168\u90e8\u521b\u5efa\u597d\uff0c\u5bf9\u4e8e\u524d\u671f\u6570\u636e\u91cf\u4e0d\u591a\u7684\u65f6\u5019\uff0c\u662f\u4e00\u79cd\u6d6a\u8d39\uff1b<\/li>\n<\/ul>\n\n\n\n<p>\u90a3\u4e48\uff0c\u6709\u6ca1\u6709\u4e00\u79cd\u597d\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u652f\u6301\u52a8\u6001\u6269\u5bb9\u800c\u4e14\u5c3d\u91cf\u4e0d\u7275\u6d89\u5230\u6570\u636e\u7684\u8fc1\u79fb\u5462\uff1f\u8fd9\u91cc\u6211\u4eec\u5c31\u8981\u770b\u7b2c\u4e8c\u79cd\u65b9\u6848\u3002<\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u4e8c\uff1a\u652f\u6301\u52a8\u6001\u6269\u5bb9<\/strong><\/p>\n\n\n\n<p>\u901a\u8fc7\u65b9\u6cd5\u4e00\uff0c\u6211\u4eec\u53ef\u4ee5\u77e5\u9053\uff0c\u5e93\u548c\u8868\u662f\u52a8\u6001\u8ba1\u7b97\u51fa\u6765\u7684\uff0c\u80fd\u4e0d\u80fd\u6211\u4eec\u56fa\u5b9a\u8bbe\u7f6e\u5e93\u548c\u8868\u7684\u6807\u53f7\u5462\uff1f\u57fa\u4e8e\u8fd9\u4e2a\u60f3\u6cd5\uff0c\u6211\u4eec\u8bbe\u8ba1\u4e86\u5982\u4e0b\u7684\u65b9\u6848\uff0c\u5728\u968f\u673a\u7801\u7684\u524d\u9762\u589e\u52a0\u4e00\u4f4d\u4ee3\u8868\u5e93\u7684\u6807\u53f7\uff0c\u5728\u968f\u673a\u7801\u7684\u540e\u9762\u589e\u52a0\u4e00\u4f4d\u4ee3\u8868\u8868\u7684\u6807\u53f7\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"616\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137.png\" alt=\"\" class=\"wp-image-16636\" style=\"width:364px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137.png 820w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137-300x225.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137-768x577.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137-230x173.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137-350x263.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-137-480x361.png 480w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/figure><\/div>\n\n\n<p>\u8fd9\u6837\u6570\u636e\u5e93\u53ef\u4ee5\u652f\u630162\u4e2a\uff0c\u6bcf\u4e2a\u5e93\u7684\u8868\u53ef\u4ee5\u652f\u630162\u5f20\u8868\uff0c\u6309\u7167\u6bcf\u5f20\u8868 2000\u4e07\u6761\u6570\u636e\uff0c\u652f\u6301\u7684\u603b\u6570\u636e = 62 * 62 * 2000w = 768.8\u4ebf\uff0c\u5982\u679c\u8fd8\u4e0d\u591f\u7528\u7684\u8bdd\uff0c\u90a3\u53ef\u4ee5\u5728\u968f\u673a\u7801\u7684\u524d\u540e\u5404\u589e\u52a0\u4e24\u4f4d\u6765\u8868\u793a\u5e93\u548c\u8868\uff0c\u8fd9\u6837\u5c31\u8db3\u591f\u4e86\u3002<\/p>\n\n\n\n<p><strong>\u5b9e\u73b0\u7ec6\u8282<\/strong><\/p>\n\n\n\n<p>\u9884\u5148\u914d\u7f6e\u5206\u5e93\u5206\u8868\u4e2d\u5e93\u548c\u8868\u7684\u6807\u53f7\uff0c\u6bd4\u5982\uff1a\u5e93\u6807\u53f7 [0,1,2]\uff0c\u8868\u6807\u53f7 [0,1,2,3]\uff0c\u901a\u8fc7\u4e0a\u9762\u7684\u65b9\u6cd5\u83b7\u53d6\u5230\u4e00\u4e2a\u968f\u673a\u7801\u4e4b\u540e\uff0c\u7136\u540e\u4ece\u5e93\u6807\u53f7 [0,1,2]\u968f\u673a\u83b7\u53d6\u4e00\u4e2a\u6807\u53f7\uff0c\u62fc\u63a5\u5728\u968f\u673a\u7801\u7684\u524d\u9762\u4f5c\u4e3a\u5e93\u6807\u8bc6\uff0c\u4ece\u8868\u6807\u53f7 [0,1,2,3]\u968f\u673a\u83b7\u53d6\u4e00\u4e2a\u6807\u53f7\uff0c\u62fc\u63a5\u5728\u968f\u673a\u7801\u7684\u540e\u9762\u4f5c\u4e3a\u8868\uff0c\u7136\u540e\u5728\u505a\u5206\u5e93\u5206\u8868\u8def\u7531\u7684\u65f6\u5019\uff0c\u5206\u522b\u622a\u53d6\u7b2c\u4e00\u4f4d\u548c\u6700\u540e\u4e00\u4f4d\u4f5c\u4e3a\u5e93\u548c\u8868\u7684\u8def\u7531\u7f16\u53f7\u3002\u6ce8\u610f\uff0c\u8fd9\u91cc\u662f\u968f\u673a\u83b7\u53d6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u8f6e\u8be2\u7b97\u6cd5\u83b7\u53d6\u5e93\u6807\u53f7\u548c\u8868\u6807\u53f7\u3002<\/p>\n\n\n\n<p><strong>\u6269\u5bb9<\/strong><\/p>\n\n\n\n<p>\u5047\u5982\uff0c\u9700\u8981\u5bf9\u5e93\u6807\u53f7 [0,1,2]\uff0c\u8868\u6807\u53f7 [0,1,2,3]\u8fdb\u884c\u6269\u5bb9\uff0c\u53ea\u9700\u8981\u5c06\u6807\u53f7\u6dfb\u52a0\u8fdb\u53bb\uff0c\u6bd4\u5982\uff1a\u5e93\u6807\u53f7[0,1,2,3]\uff0c\u8868\u6807\u53f7 [0,1,2,3,4,5]\uff0c\u8fd9\u6837\u539f\u59cb\u7684\u6570\u636e\u4e0d\u9700\u8981\u8fdb\u884c\u8fc1\u79fb\u5c31\u5b8c\u6210\u4e86\u5e93\u5bb9\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p><strong>\u8be5\u65b9\u6848\u7684\u4f18\u7f3a\u70b9<\/strong><\/p>\n\n\n\n<p>\u4f18\u70b9\uff1a<\/p>\n\n\n\n<ul>\n<li>\u652f\u6301\u52a8\u6001\u6269\u5bb9<\/li>\n\n\n\n<li>\u52a8\u6001\u6269\u5bb9\u65f6\u4e0d\u9700\u8981\u8fc1\u79fb\u6570\u636e<\/li>\n<\/ul>\n\n\n\n<p>\u7f3a\u70b9<\/p>\n\n\n\n<ul>\n<li>\u9700\u8981\u5728\u968f\u673a\u7801\u524d\u540e\u589e\u52a0\u5e93\u548c\u8868\u7684\u6807\u8bc6\uff0c\u589e\u52a0\u4e86\u77ed\u94fe\u7684\u957f\u5ea6<\/li>\n\n\n\n<li>\u5e93\u6807\u8bc6\u548c\u8868\u6807\u8bc6\u6dfb\u52a0\u7684\u7b97\u6cd5\uff0c\u76f4\u63a5\u5f71\u54cd\u6570\u636e\u7684\u79bb\u6563\u6027<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u672c\u6587\u4ece\u4e00\u6761\u5ba2\u670d\u8bc4\u4ef7\u7684\u77ed\u4fe1\u5f00\u59cb\uff0c\u5206\u6790\u4e86\u77ed\u94fe\u7684\u6784\u6210\uff0c\u77ed\u94fe\u8df3\u8f6c\u7684\u539f\u7406\uff0c\u540c\u65f6\u4e5f\u7ed9\u51fa\u4e86\u4e1a\u5185\u7684\u4e00\u4e9b\u5b9e\u73b0\u7b97\u6cd5\uff0c\u4ee5\u53ca\u4e00\u4e9b\u67b6\u6784\u4e0a\u7684\u5efa\u8bae\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u4e1a\u52a1\u4f53\u91cf\u5c0f\u7684\u516c\u53f8\uff0c\u53ef\u4ee5\u6839\u636e\u6210\u672c\u6765\u642d\u5efa\u670d\u52a1\uff08\u5355\u673a\u6216\u8005\u5c11\u91cf\u670d\u52a1\u5668\u505a\u8d1f\u8f7d\uff09\uff0c\u5bf9\u4e8e\u4e1a\u52a1\u4f53\u91cf\u6bd4\u8f83\u5927\u7684\u516c\u53f8\uff0c\u66f4\u591a\u9700\u8981\u8003\u8651\u5230\u9ad8\u5e76\u53d1\u7684\u573a\u666f\uff0c\u5982\u4f55\u4fdd\u8bc1\u670d\u52a1\u7684\u7a33\u5b9a\u6027\uff0c\u5982\u4f55\u652f\u6301\u6c34\u5e73\u6269\u5c55\uff0c\u5f53\u670d\u52a1\u51fa\u73b0\u95ee\u9898\u65f6\u5982\u4f55\u5177\u5907\u4e00\u5957\u5b8c\u5584\u7684\u76d1\u63a7\u548c\u9884\u8b66\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<p>\u5176\u5b9e\uff0c\u5f88\u591a\u7cfb\u7edf\u90fd\u662f\u5728\u4e00\u6b21\u53c8\u4e00\u6b21\u7684\u4e1a\u52a1\u6d41\u91cf\u6311\u6218\u4e0b\u6210\u957f\u8d77\u6765\u7684\uff0c\u6211\u4eec\u9700\u8981\u4e0d\u65ad\u6253\u78e8\u81ea\u5df1\u5b8f\u89c2\u770b\u67b6\u6784\uff0c\u5fae\u89c2\u770b\u4ee3\u7801\u7684\u80fd\u529b\uff0c\u8fd9\u6837\u81ea\u5df1\u4e5f\u5c31\u8ddf\u7740\u4e1a\u52a1\uff0c\u7cfb\u7edf\u4e00\u8d77\u6210\u957f\u8d77\u6765\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u53d1\uff1a\u5982\u4f55\u8bbe\u8ba1\u4e00\u5957\u9ad8\u6027\u80fd\u7684\u77ed\u94fe\u7cfb\u7edf\uff1f \u4ec0\u4e48\u662f\u77ed\u94fe\u7cfb\u7edf\uff1f\u5148\u8ba9\u6211\u4eec\u6765\u770b\u4e00\u5f20\u8033\u719f\u80fd\u8be6\u7684\u56fe\u7247\uff1a \u70b9\u51fb\u77ed\u4fe1\u91cc\u201c\u84dd\u8272\u5b57\u4f53\u201d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16627"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16627"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16627\/revisions"}],"predecessor-version":[{"id":16637,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16627\/revisions\/16637"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}