{"id":1150,"date":"2026-07-11T00:24:43","date_gmt":"2026-07-11T00:24:43","guid":{"rendered":"https:\/\/blog.nimail.cn\/?p=1150"},"modified":"2026-07-11T00:24:43","modified_gmt":"2026-07-11T00:24:43","slug":"%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0","status":"publish","type":"post","link":"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/","title":{"rendered":"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670"},"content":{"rendered":"<h2>\u4e00\u3001 \u7a81\u7834\u5206\u8fa8\u7387\u7126\u8651\uff1a\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91<\/h2>\n<p>\u505a\u524d\u7aef\u5f00\u53d1\u548cUI\u8bbe\u8ba1\u4e45\u4e86\uff0c\u5927\u5bb6\u80af\u5b9a\u90fd\u9047\u5230\u8fc7\u8fd9\u79cd\u5934\u75bc\u7684\u573a\u666f\uff1a\u7528\u6237\u4f20\u4e0a\u6765\u7684\u539f\u56fe\u52a8\u4e0d\u52a8\u5c31\u51e0\u5341MB\uff0c\u670d\u52a1\u5668\u625b\u4e0d\u4f4f\uff0cCDN\u5e26\u5bbd\u4e5f\u5403\u7d27\u3002\u8fd9\u65f6\u5019<strong>\u5982\u4f55\u964d\u4f4e\u7167\u7247\u5927\u5c0fkb<\/strong>\u5c31\u6210\u4e86\u7b2c\u4e00\u9053\u5173\u5361\u3002\u5f88\u591a\u4eba\u7b2c\u4e00\u53cd\u5e94\u662f\u7c97\u66b4\u5730\u8c03\u4f4e\u50cf\u7d20\uff0c\u4f46\u5176\u5b9e<strong>\u56fe\u7247\u4f53\u79ef\u538b\u7f29<\/strong>\u7684\u6838\u5fc3\u5728\u4e8e\u6570\u636e\u5197\u4f59\u6e05\u7406\u548c\u7f16\u7801\u6548\u7387\u4f18\u5316\u3002\u73b0\u4ee3\u6d4f\u89c8\u5668\u5bf9JPG\u548cPNG\u7684\u89e3\u7801\u652f\u6301\u5df2\u7ecf\u5f88\u6210\u719f\uff0c\u6211\u4eec\u5b8c\u5168\u53ef\u4ee5\u901a\u8fc7\u66f4\u806a\u660e\u7684\u7b97\u6cd5\u6765\u5b9e\u73b0<strong>\u56fe\u7247\u7f29\u5c0f\u5c3a\u5bf8\u4fdd\u6301\u6e05\u6670<\/strong>\u3002<\/p>\n<div class=\"alert alert-info\">\n  <strong>\u5f00\u53d1\u7ecf\u9a8c\u63d0\u793a\uff1a<\/strong>\u76f4\u63a5\u62d6\u62fd\u8fdb\u7f51\u9875\u7684<strong>\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39<\/strong>\u65b9\u6848\uff0c\u901a\u5e38\u4f1a\u5728\u670d\u52a1\u7aef\u6267\u884c\u91cd\u91c7\u6837\uff08Resampling\uff09\u6216\u91cf\u5316\u8c03\u8272\u677f\u64cd\u4f5c\u3002\u5bf9\u4e8e<strong>\u6279\u91cf\u56fe\u7247\u538b\u7f29<\/strong>\u573a\u666f\uff0c\u5efa\u8bae\u4f18\u5148\u9009\u62e9\u652f\u6301WebP\u683c\u5f0f\u8f6c\u6362\u7684\u6d41\u6c34\u7ebf\uff0c\u80fd\u5728\u540c\u7b49\u89c6\u89c9\u8d28\u91cf\u4e0b\u518d\u780d\u638930%\u5de6\u53f3\u7684\u4f53\u79ef\u3002\n<\/div>\n<h3>\u5e38\u89c1\u538b\u7f29\u7b56\u7565\u5bf9\u6bd4<\/h3>\n<table class=\"table table-striped w-100\">\n<thead>\n<tr>\n<th>\u5904\u7406\u65b9\u5411<\/th>\n<th>\u9002\u7528\u573a\u666f<\/th>\n<th>\u753b\u8d28\u5f71\u54cd<\/th>\n<th>\u5178\u578b\u5de5\u5177\/\u534f\u8bae<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6709\u635f\u91cd\u7f16\u7801<\/td>\n<td><strong>jpg\u56fe\u7247\u538b\u7f29<\/strong>\u3001\u957f\u56fe\u5206\u4eab<\/td>\n<td>\u8f7b\u5fae\u566a\u70b9\uff0c\u8089\u773c\u96be\u8fa8<\/td>\n<td>MozJPEG, libvips<\/td>\n<\/tr>\n<tr>\n<td>\u65e0\u635f\u91cd\u6392<\/td>\n<td><strong>png\u538b\u7f29\u5728\u7ebf<\/strong>\u3001\u900f\u660e\u5e95\u7d20\u6750<\/td>\n<td>\u96f6\u635f\u8017\uff0c\u4ec5\u53bbMetadata<\/td>\n<td>PNGGauntlet, OxiPNG<\/td>\n<\/tr>\n<tr>\n<td>\u50cf\u7d20\u538b\u7f29<\/td>\n<td>\u79fb\u52a8\u7aef\u9996\u5c4f\u52a0\u8f7d\u3001<strong>\u8bc1\u4ef6\u7167\u538b\u7f29<\/strong><\/td>\n<td>\u9700\u63a7\u5236\u7f29\u653e\u6bd4\u4f8b(\u22640.8)<\/td>\n<td>Lanczos, Bicubic<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b9e\u9645\u8dd1\u9879\u76ee\u65f6\uff0c\u6211\u5f88\u5c11\u624b\u52a8\u53bb\u4e00\u4e2a\u4e2a\u70b9<strong>\u538b\u7f29\u56fe\u7247\u7f51\u7ad9<\/strong>\u3002\u9047\u5230\u51e0\u5341\u4e2a\u7f29\u7565\u56fe\u8981\u66ff\u6362\u7684\u60c5\u51b5\uff0c\u672c\u5730\u5199\u4e2a\u811a\u672c\u6216\u8005\u5bf9\u63a5<strong>i\u538b\u7f29\u5728\u7ebf\u5e73\u53f0<\/strong>\u7684API\u4f1a\u66f4\u7a33\u3002\u6bd4\u5982\u6700\u8fd1\u6211\u5728\u590d\u73b0\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u88c1\u526a\u6d41\u6c34\u7ebf\u65f6\uff0c\u53c2\u8003\u4e86\u7c7b\u4f3c <code>https:\/\/www.nimail.cn\/img-tools\/image-compress.html<\/code> \u7684\u4ea4\u4e92\u8bbe\u8ba1\uff0c\u5b83\u7684\u62d6\u62fd\u533a\u548c\u5b9e\u65f6\u9884\u89c8\u53cd\u9988\u505a\u5f97\u5f88\u7b26\u5408\u76f4\u89c9\uff0c\u524d\u7aef\u76f4\u63a5\u7528Canvas\u505a\u5ba2\u6237\u7aef\u9884\u538b\u7f29\uff0c\u518d\u8d70\u540e\u7aef\u4e8c\u6b21\u6821\u9a8c\uff0c\u5ef6\u8fdf\u538b\u5230\u4e86200ms\u4ee5\u5185\u3002<\/p>\n<h2>\u4e8c\u3001 \u5f00\u53d1\u8005\u89c6\u89d2\u7684\u6279\u91cf\u5904\u7406\u4e0e\u8d28\u91cf\u628a\u63a7<\/h2>\n<p>\u5f88\u591a\u65b0\u624b\u95ee<strong>\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f<\/strong>\uff0c\u5176\u5b9e\u7b54\u6848\u5f80\u5f80\u85cf\u5728\u8f93\u51fa\u53c2\u6570\u7684\u8c03\u6574\u91cc\u3002\u4e0d\u8981\u4e00\u5473\u8ffd\u6c42\u6781\u9650\u6570\u503c\uff0c<strong>\u5982\u4f55\u7f29\u5c0f\u56fe\u7247\u5927\u5c0f<\/strong>kb\u5fc5\u987b\u5efa\u7acb\u5728\u4e1a\u52a1\u5bb9\u5fcd\u5ea6\u4e4b\u4e0a\u3002\u6bd4\u5982\u7535\u5546\u4e3b\u56fe\u53ef\u4ee5\u63a5\u53d7\u4e00\u5b9a\u7a0b\u5ea6\u7684\u8272\u5f69\u5e73\u6ed1\uff0c\u4f46\u533b\u7597\u5f71\u50cf\u6216\u5408\u540c\u626b\u63cf\u4ef6\u7edd\u5bf9\u9700\u8981<strong>\u65e0\u635f\u538b\u7f29\u56fe\u7247<\/strong>\u3002\u638c\u63e1\u8fd9\u4e2a\u8fb9\u754c\uff0c\u624d\u80fd\u907f\u514d\u53cd\u590d\u5bfc\u51fa\u5bfc\u81f4\u7684\u201c\u4ee3\u9645\u5931\u771f\u201d\u3002<\/p>\n<div class=\"card mb-3\">\n<div class=\"card-body\">\n<h5 class=\"card-title\"><span class=\"badge bg-primary me-2\">\u6838\u5fc3\u53c2\u6570<\/span>\u5173\u952e\u8d28\u91cf\u63a7\u5236\u70b9<\/h5>\n<ul class=\"list-unstyled mb-0\">\n<li class=\"mb-1\">\u2022 \u8d28\u91cf\u9608\u503c(Quality)\uff1aJPG\u5efa\u8bae\u8bbe\u572875~85\u4e4b\u95f4\uff0c\u4f4e\u4e8e60\u4f1a\u51fa\u73b0\u660e\u663e\u8272\u5757\u3002<\/li>\n<li class=\"mb-1\">\u2022 \u6e10\u8fdb\u5f0f\u626b\u63cf(Progressive)\uff1a\u5f00\u542f\u540e\u5217\u8868\u9875\u52a0\u8f7d\u4f53\u9a8c\u63d0\u5347\u663e\u8457\uff0c\u6587\u4ef6\u5934\u4f1a\u591a\u5360\u51e0\u767e\u5b57\u8282\u3002<\/li>\n<li class=\"mb-1\">\u2022 \u5143\u6570\u636e\u5265\u79bb\uff1aEXIF\/GPS\u4fe1\u606f\u80fd\u7701\u4e0b10%~15%\u7a7a\u95f4\uff0c\u9690\u79c1\u654f\u611f\u573a\u666f\u52a1\u5fc5\u6e05\u7a7a\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<p>\u5982\u679c\u4f60\u4e60\u60ef\u5728\u7ec8\u7aef\u91cc\u5e72\u6d3b\uff0c\u7528Python\u914d\u5408Pillow\u5e93\u642d\u4e00\u5957\u81ea\u52a8\u5316\u7ba1\u7ebf\u662f\u6700\u7701\u5fc3\u7684\u3002\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\u6f14\u793a\u4e86\u5982\u4f55\u901a\u8fc7\u591a\u7ebf\u7a0b\u8bfb\u53d6\u76ee\u5f55\uff0c\u6309\u76ee\u6807\u4f53\u79ef\u81ea\u52a8\u964d\u7ea7\u8d28\u91cf\u56e0\u5b50\uff0c\u5e76\u4fdd\u7559\u539f\u59cb\u6587\u4ef6\u540d\u7ed3\u6784\u3002\u8dd1\u8d77\u6765\u4e4b\u540e\uff0c\u8fde<strong>\u6279\u91cf\u538b\u7f29\u56fe\u7247\u5927\u5c0f<\/strong>\u8fd9\u79cd\u4f53\u529b\u6d3b\u90fd\u80fd\u4e00\u952e\u6e05\u76d8\u3002<\/p>\n<pre class=\"p-3 bg-light rounded d-block\"><code>from PIL import Image\nimport os\nimport glob\n\ndef auto_compress(input_dir, target_kb=500):\n    for img_path in glob.glob(os.path.join(input_dir, \"*.jpg\")):\n        with Image.open(img_path) as img:\n            # \u8f6cRGB\u907f\u514d\u900f\u660e\u5ea6\u62a5\u9519\n            img = img.convert('RGB')\n            width, height = img.size\n            \n            # \u7b80\u5355\u4e8c\u5206\u6cd5\u903c\u8fd1\u76ee\u6807KB\n            quality = 90\n            while True:\n                buffer = io.BytesIO()\n                img.save(buffer, format='JPEG', quality=quality)\n                size_kb = len(buffer.getvalue()) \/ 1024\n                if abs(size_kb - target_kb) < 50:\n                    break\n                elif size_kb > target_kb:\n                    quality -= 5\n                else:\n                    quality += 5\n                quality = max(10, min(95, quality))\n                \n            out_name = f\"compressed_{os.path.basename(img_path)}\"\n            img.save(os.path.join(input_dir, out_name), format='JPEG', quality=quality)\n            print(f\"[OK] {img_path} -> {size_kb:.1f}KB\")<\/code><\/pre>\n<p>\u811a\u672c\u8dd1\u5b8c\u540e\uff0c\u751f\u6210\u7684\u6587\u4ef6\u76f4\u63a5\u4e22\u8fdb\u9759\u6001\u8d44\u6e90\u6876\u5c31\u884c\u3002\u5bf9\u4e8e<strong>\u56fe\u7247\u538b\u7f29\u5728\u7ebf\u514d\u8d39\u6307\u5b9a\u5927\u5c0f<\/strong>\u7684\u9700\u6c42\uff0c\u5176\u5b9e\u672c\u8d28\u5c31\u662f\u63a7\u5236\u71b5\u503c\u5206\u914d\u3002\u73b0\u5728\u5e02\u9762\u4e0a\u4e0d\u5c11<strong>\u7167\u7247\u538b\u7f29\u5de5\u5177<\/strong>\u628a\u754c\u9762\u505a\u5f97\u82b1\u91cc\u80e1\u54e8\uff0c\u4f46\u80cc\u540e\u8dd1\u7684\u4f9d\u7136\u662f\u8fd9\u5957\u57fa\u7840\u903b\u8f91\u3002\u641e\u61c2\u539f\u7406\u540e\uff0c\u65e0\u8bba\u662f\u7528<strong>\u6613\u53ef\u56fe<\/strong>\u8fd8\u662f<strong>\u718a\u732b\u538b\u7f29<\/strong>\uff0c\u4f60\u90fd\u80fd\u4e00\u773c\u770b\u7a7f\u5b83\u7684\u538b\u7f29\u5e95\u7ebf\u5728\u54ea\u91cc\u3002\u65e5\u5e38\u7ef4\u62a4\u4e2d\uff0c\u987a\u624b\u628a\u9ad8\u9891\u8bbf\u95ee\u7684Banner\u6362\u6210WebP\uff0c\u914d\u5408HTTP\/2\u7684\u591a\u8def\u590d\u7528\uff0c\u9996\u5c4f\u6e32\u67d3\u901f\u5ea6\u57fa\u672c\u80fd\u62c9\u6ee1\u3002\u9047\u5230\u7279\u6b8a\u6392\u7248\u9700\u6c42\uff0c\u518d\u624b\u52a8\u8c03\u4e00\u4e0b<strong>\u56fe\u7247\u5c3a\u5bf8\u538b\u7f29<\/strong>\u7684\u951a\u70b9\u4f4d\u7f6e\uff0c\u6574\u4f53\u6d41\u7a0b\u5c31\u987a\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[162,404,239],"class_list":["post-1150","post","type-post","status-publish","format-standard","hentry","category-best-articles","tag-png","tag-404","tag-239"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog<\/title>\n<meta name=\"description\" content=\"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.nimail.cn\/best-articles\/\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b-\u5982\u4f55\u7cbe\u51c6\u964d\u4f4ekb\u4fdd\u6e05\u6670\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog\" \/>\n<meta property=\"og:description\" content=\"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.nimail.cn\/best-articles\/\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b-\u5982\u4f55\u7cbe\u51c6\u964d\u4f4ekb\u4fdd\u6e05\u6670\/\" \/>\n<meta property=\"og:site_name\" content=\"nimail blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-11T00:24:43+00:00\" \/>\n<meta name=\"author\" content=\"\u4e00\u7ebf\u7801\u519c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u4e00\u7ebf\u7801\u519c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/\",\"url\":\"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/\",\"name\":\"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.nimail.cn\/#website\"},\"datePublished\":\"2026-07-11T00:24:43+00:00\",\"author\":{\"@id\":\"https:\/\/blog.nimail.cn\/#\/schema\/person\/0b0e15eb489135cbe0643e4f5e8839af\"},\"description\":\"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/blog.nimail.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.nimail.cn\/#website\",\"url\":\"https:\/\/blog.nimail.cn\/\",\"name\":\"nimail blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.nimail.cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.nimail.cn\/#\/schema\/person\/0b0e15eb489135cbe0643e4f5e8839af\",\"name\":\"\u4e00\u7ebf\u7801\u519c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/blog.nimail.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cabb5645eed3060ef0005d4a179e6422ed56568f78c1b5d2326a4976200739c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cabb5645eed3060ef0005d4a179e6422ed56568f78c1b5d2326a4976200739c?s=96&d=mm&r=g\",\"caption\":\"\u4e00\u7ebf\u7801\u519c\"},\"sameAs\":[\"http:\/\/blog.nimail.cn\"],\"url\":\"https:\/\/blog.nimail.cn\/author\/longzg\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog","description":"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.nimail.cn\/best-articles\/\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b-\u5982\u4f55\u7cbe\u51c6\u964d\u4f4ekb\u4fdd\u6e05\u6670\/","og_locale":"zh_CN","og_type":"article","og_title":"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog","og_description":"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002","og_url":"https:\/\/blog.nimail.cn\/best-articles\/\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b-\u5982\u4f55\u7cbe\u51c6\u964d\u4f4ekb\u4fdd\u6e05\u6670\/","og_site_name":"nimail blog","article_published_time":"2026-07-11T00:24:43+00:00","author":"\u4e00\u7ebf\u7801\u519c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u4e00\u7ebf\u7801\u519c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/","url":"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/","name":"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670 - nimail blog","isPartOf":{"@id":"https:\/\/blog.nimail.cn\/#website"},"datePublished":"2026-07-11T00:24:43+00:00","author":{"@id":"https:\/\/blog.nimail.cn\/#\/schema\/person\/0b0e15eb489135cbe0643e4f5e8839af"},"description":"\u9762\u5bf9\u56fe\u7247\u5185\u5b58\u592a\u5927\u600e\u4e48\u53d8\u5c0f\uff1f\u672c\u6587\u4ece\u5f00\u53d1\u8005\u89c6\u89d2\u62c6\u89e3\u624b\u673a\u538b\u7f29\u56fe\u7247\u4e0e\u7f51\u9875\u7aef\u56fe\u50cf\u5728\u7ebf\u538b\u7f29\u7684\u5e95\u5c42\u903b\u8f91\u3002\u7ed3\u5408\u771f\u5b9e\u5de5\u5177\u6848\u4f8b\u4e0ePython\u81ea\u52a8\u5316\u811a\u672c\uff0c\u6559\u4f60\u600e\u6837\u538b\u7f29\u56fe\u7247\u5927\u5c0f\u624d\u80fd\u5b9e\u73b0\u4f53\u79ef\u7626\u8eab\u4e0e\u753b\u8d28\u4fdd\u7559\u7684\u6700\u4f73\u5e73\u8861\uff0c\u9644\u8be6\u7ec6\u53c2\u6570\u914d\u7f6e\u8868\u3002","breadcrumb":{"@id":"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.nimail.cn\/best-articles\/%e7%85%a7%e7%89%87%e5%9c%a8%e7%ba%bf%e5%8e%8b%e7%bc%a9%e5%85%8d%e8%b4%b9%e5%ae%9e%e6%b5%8b-%e5%a6%82%e4%bd%95%e7%b2%be%e5%87%86%e9%99%8d%e4%bd%8ekb%e4%bf%9d%e6%b8%85%e6%99%b0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/blog.nimail.cn\/"},{"@type":"ListItem","position":2,"name":"\u7167\u7247\u5728\u7ebf\u538b\u7f29\u514d\u8d39\u5b9e\u6d4b\uff1a\u5982\u4f55\u7cbe\u51c6\u964d\u4f4eKB\u4fdd\u6e05\u6670"}]},{"@type":"WebSite","@id":"https:\/\/blog.nimail.cn\/#website","url":"https:\/\/blog.nimail.cn\/","name":"nimail blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.nimail.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/blog.nimail.cn\/#\/schema\/person\/0b0e15eb489135cbe0643e4f5e8839af","name":"\u4e00\u7ebf\u7801\u519c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/blog.nimail.cn\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cabb5645eed3060ef0005d4a179e6422ed56568f78c1b5d2326a4976200739c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cabb5645eed3060ef0005d4a179e6422ed56568f78c1b5d2326a4976200739c?s=96&d=mm&r=g","caption":"\u4e00\u7ebf\u7801\u519c"},"sameAs":["http:\/\/blog.nimail.cn"],"url":"https:\/\/blog.nimail.cn\/author\/longzg\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/posts\/1150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/comments?post=1150"}],"version-history":[{"count":0,"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/posts\/1150\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/media?parent=1150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/categories?post=1150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nimail.cn\/wp-json\/wp\/v2\/tags?post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}