{"id":6988,"date":"2025-07-02T09:02:55","date_gmt":"2025-07-02T01:02:55","guid":{"rendered":"https:\/\/www.xinyixx.com\/?p=6988"},"modified":"2025-07-02T09:02:55","modified_gmt":"2025-07-02T01:02:55","slug":"coding","status":"publish","type":"post","link":"https:\/\/www.xinyixx.com\/index.php\/2025\/07\/02\/coding\/","title":{"rendered":"\u7a7a\u8c03\u98ce\u673a\u542f\u505c\u65f6\u957f\u7edf\u8ba1\u7684\u7cfb\u7edf\u5f00\u53d1"},"content":{"rendered":"<h2 class=\"wp-block-heading\">\u65b9\u68481\uff1a\u56fe\u5f62\u8bc6\u522b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528 Python \u56fe\u50cf\u8bc6\u522b + \u81ea\u52a8\u5316\u64cd\u4f5c \u6765\u5b9e\u73b0\u98ce\u673a\u65f6\u957f\u7684\u76d1\u63a7\u4e0e\u7edf\u8ba1\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.1\u7528python \u7f16\u7a0b\u601d\u60f3\u5b9e\u73b0\u601d\u8def<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u603b\u4f53\u5b9e\u73b0\u76ee\u6807\u62c6\u89e3<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfaf \u4f60\u7684\u76ee\u6807\uff1a 1. \u8bc6\u522b\u6240\u6709\u98ce\u673a\u5f53\u524d\u72b6\u6001\uff08\u7eff\u8272 = \u5f00\uff0c\u7070\u8272 = \u5173\uff09\uff1b 2. \u5b9a\u65f6\u68c0\u6d4b\u72b6\u6001\u53d8\u66f4\u5e76\u8bb0\u5f55\u8d77\u6b62\u65f6\u95f4\uff1b 3. \u81ea\u52a8\u7ffb\u9875\u5207\u6362\u4e0d\u540c\u697c\u5c42\uff08\u53f3\u4e0a\u89d2\u70b9\u51fb\uff09\uff1b 4. \u5468\u671f\u6027\u6c47\u603b\u7edf\u8ba1\u5f00\u673a\u65f6\u95f4\u5e76\u5bfc\u51fa Excel\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u5efa\u8bae\u65b9\u6848\uff1a\u4f7f\u7528 Python \u81ea\u52a8\u5316\u6846\u67b6<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6280\u672f\u6a21\u5757<\/th><th>\u5de5\u5177\/\u5e93<\/th><\/tr><\/thead><tbody><tr><td>\u56fe\u50cf\u8bc6\u522b\uff08\u989c\u8272\u8bc6\u522b\uff09<\/td><td>PIL \u6216 OpenCV<\/td><\/tr><tr><td>\u5c4f\u5e55\u622a\u56fe<\/td><td>pyautogui \u6216 mss<\/td><\/tr><tr><td>\u81ea\u52a8\u70b9\u51fb\u697c\u5c42\u5207\u6362\u6309\u94ae<\/td><td>pyautogui<\/td><\/tr><tr><td>\u6570\u636e\u5b58\u50a8\/\u5bfc\u51fa<\/td><td>pandas + openpyxl<\/td><\/tr><tr><td>\u540e\u53f0\u5b9a\u65f6\u8fd0\u884c<\/td><td>threading + schedule\uff08\u53ef\u9009\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde0 \u57fa\u7840\u539f\u7406\u8bf4\u660e 1. \u6bcf\u4e2a\u98ce\u673a\u662f\u4e00\u4e2a\u201c\u5361\u7247\u201d\uff0c\u4e2d\u95f4\u662f\u4e00\u4e2a \u98ce\u6247\u56fe\u6807\uff0c\u989c\u8272\u4e3a\u7eff\u6216\u7070\uff1b 2. \u6bcf\u9875\u56fe\u6807\u6570\u91cf\u56fa\u5b9a\u3001\u6392\u5e03\u6574\u9f50\uff0c\u56e0\u6b64\u53ef\u4ee5\u7528\u7f51\u683c\u65b9\u5f0f\u8ba1\u7b97\u6bcf\u4e2a\u56fe\u6807\u7684\u5750\u6807\u4e2d\u5fc3\u70b9\uff1b 3. \u6bcf\u9694 1 \u5206\u949f\u622a\u56fe\uff0c\u68c0\u6d4b\u6bcf\u4e2a\u70b9\u7684\u989c\u8272\u53d8\u5316\uff0c\u5e76\u66f4\u65b0\u8fd0\u884c\u65f6\u95f4\u8bb0\u5f55\uff1b 4. \u6bcf\u9875\u76d1\u6d4b\u5b8c\u540e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7bad\u5934\uff08\u4f60\u63d0\u4f9b\u56fe\u4e2d\u90a3\u4e2a \u84dd\u8272\u5706\u5f62\u56fe\u6807\uff09\uff0c\u8fdb\u5165\u4e0b\u4e00\u9875\u7ee7\u7eed\u8bc6\u522b\uff1b 5. \u6240\u6709\u9875\u5b8c\u6210\u540e\uff0c\u7b49\u5f85\u4e00\u5206\u949f\u7ee7\u7eed\u4e0b\u4e00\u8f6e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u6838\u5fc3\u6d41\u7a0b\u4e0e\u4ee3\u7801\u6846\u67b6<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\uddbc\ufe0f 1. \u83b7\u53d6\u98ce\u673a\u4f4d\u7f6e\u5750\u6807\uff08\u624b\u52a8\u6807\u4e00\u6b21\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ea\u9700\u5728\u5c4f\u5e55\u5206\u8fa8\u7387\u4e00\u81f4\u7684\u524d\u63d0\u4e0b\uff0c\u7528\u622a\u56fe\u5de5\u5177\u6807\u51fa\u7b2c\u4e00\u6392\u7b2c\u4e00\u4e2a\u98ce\u673a\u56fe\u6807\u4e2d\u5fc3\u5750\u6807\uff0c\u6bd4\u5982\uff1a(120, 240)\uff0c\u6bcf\u4e2a\u98ce\u673a\u5bbd\u7ea6 120px\uff0c\u9ad8\u7ea6 100px\uff0c\u5219\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5047\u8bbe\u754c\u9762\u67096\u884c \u00d7 8\u5217\u98ce\u673a\u5361\u7247<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;fan_positions = []<br>&nbsp;start_x, start_y = 120, 240<br>&nbsp;x_spacing, y_spacing = 120, 100<br>&nbsp;rows, cols = 6, 8<br>&nbsp;\u200b<br>&nbsp;for r in range(rows):<br>&nbsp; &nbsp; &nbsp;for c in range(cols):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fan_positions.append((<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;start_x + c * x_spacing,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;start_y + r * y_spacing<br>&nbsp; &nbsp; &nbsp; &nbsp;  ))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfa8 2. \u5224\u65ad\u56fe\u6807\u989c\u8272\u662f\u5426\u4e3a\u7eff\u8272<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;from PIL import ImageGrab<br>&nbsp;\u200b<br>&nbsp;def is_fan_on(pixel):<br>&nbsp; &nbsp; &nbsp;r, g, b = pixel<br>&nbsp; &nbsp; &nbsp;return g &gt; 180 and r &lt; 100 and b &lt; 100 &nbsp;# \u7eff\u8272<br>&nbsp;\u200b<br>&nbsp;def check_fan_status(x, y):<br>&nbsp; &nbsp; &nbsp;screenshot = ImageGrab.grab()<br>&nbsp; &nbsp; &nbsp;pixel = screenshot.getpixel((x, y))<br>&nbsp; &nbsp; &nbsp;return \"ON\" if is_fan_on(pixel) else \"OFF\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\uddb1\ufe0f 3. \u81ea\u52a8\u70b9\u51fb\u53f3\u4e0a\u89d2\u7ffb\u9875\u6309\u94ae<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;import pyautogui<br>&nbsp;\u200b<br>&nbsp;def click_next_floor():<br>&nbsp; &nbsp; &nbsp;pyautogui.moveTo(990, 140) &nbsp;# \u6b64\u4e3a\u53f3\u4e0a\u89d2\u6309\u94ae\u7684\u5927\u81f4\u4f4d\u7f6e\uff0c\u8bf7\u7528 pyautogui.position() \u7cbe\u8c03<br>&nbsp; &nbsp; &nbsp;pyautogui.click()<br>&nbsp;\u200b<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u5148\u8fd0\u884c\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>pyautogui.position()<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u9f20\u6807\u79fb\u52a8\u5230\u4f60\u622a\u56fe\u4e2d\u90a3\u4e2a \u201c\u53f3\u4e0a\u89d2\u7ffb\u9875\u7bad\u5934\u6309\u94ae\u201d \u4e0a\uff0c\u8bb0\u5f55\u5176\u5750\u6807\u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcca 4. \u8bb0\u5f55\u72b6\u6001\u5207\u6362\u4e0e\u6301\u7eed\u65f6\u95f4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;from datetime import datetime<br>&nbsp;\u200b<br>&nbsp;status_log = {}<br>&nbsp;run_records = []<br>&nbsp;\u200b<br>&nbsp;def update_fan_status(fan_id, new_status):<br>&nbsp; &nbsp; &nbsp;now = datetime.now()<br>&nbsp; &nbsp; &nbsp;last_status, start_time = status_log.get(fan_id, (None, None))<br>&nbsp;\u200b<br>&nbsp;if new_status != last_status:<br>&nbsp; &nbsp; &nbsp;if new_status == \"ON\":<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status_log[fan_id] = (\"ON\", now)<br>&nbsp; &nbsp; &nbsp;elif new_status == \"OFF\" and start_time:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;duration = (now - start_time).total_seconds() \/ 60<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;run_records.append({<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"FanID\": fan_id,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"StartTime\": start_time,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"EndTime\": now,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"Duration(min)\": duration<br>&nbsp; &nbsp; &nbsp; &nbsp;  })<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status_log[fan_id] = (\"OFF\", None)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udce6 5. \u5bfc\u51fa\u4e3a Excel<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;import pandas as pd<br>&nbsp;def export_to_excel():<br>&nbsp; &nbsp; &nbsp;df = pd.DataFrame(run_records)<br>&nbsp; &nbsp; &nbsp;df.to_excel(\"fan_log.xlsx\", index=False)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd01 6. \u603b\u5faa\u73af\uff08\u591a\u9875\u8f6e\u8be2\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;def monitor_all_pages(total_pages=8):<br>&nbsp; &nbsp; &nbsp;for page in range(total_pages):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for idx, (x, y) in enumerate(fan_positions):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fan_id = f\"P{page+1}-F{idx+1}\"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status = check_fan_status(x, y)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update_fan_status(fan_id, status)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;click_next_floor()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time.sleep(3) &nbsp;# \u7b49\u9875\u9762\u5237\u65b0<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.2\u5b8c\u6574\u5b9e\u73b0\u65b9\u6848\u4e0e\u4e0b\u4e00\u6b65\u8ba1\u5212<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u9879\u76ee\u76ee\u6807\u6982\u8ff0<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u529f\u80fd\u6a21\u5757<\/th><th>\u5185\u5bb9<\/th><\/tr><\/thead><tbody><tr><td>\u2460 \u56fe\u50cf\u8bc6\u522b<\/td><td>\u81ea\u52a8\u8bc6\u522b\u5c4f\u5e55\u4e0a\u98ce\u673a\u7684\u72b6\u6001\uff08\u7eff=\u5f00\uff0c\u7070=\u5173\uff09<\/td><\/tr><tr><td>\u2461 \u72b6\u6001\u76d1\u63a7<\/td><td>\u5b9a\u65f6\u8bc6\u522b\u5404\u98ce\u673a\u72b6\u6001\u53d8\u5316\uff0c\u8bb0\u5f55\u5f00\u5173\u65f6\u95f4<\/td><\/tr><tr><td>\u2462 \u697c\u5c42\u5207\u6362<\/td><td>\u81ea\u52a8\u70b9\u51fb\u53f3\u4e0a\u89d2\u6309\u94ae\uff0c\u8f6e\u8be28\u4e2a\u697c\u5c42<\/td><\/tr><tr><td>\u2463 \u6570\u636e\u5b58\u50a8<\/td><td>\u8bb0\u5f55\u6bcf\u6b21\u98ce\u673a\u5f00\u5173\u7684\u6301\u7eed\u65f6\u95f4<\/td><\/tr><tr><td>\u2464 \u7edf\u8ba1\u5206\u6790<\/td><td>\u6309\u6708\/\u5b63\u5ea6\/\u5e74\u7edf\u8ba1\u5f00\u673a\u65f6\u957f<\/td><\/tr><tr><td>\u2465 \u5bfc\u51fa Excel<\/td><td>\u5c06\u8bb0\u5f55\u5bfc\u51fa\u4e3a .xlsx \u62a5\u8868<\/td><\/tr><tr><td>\u2466 GUI \u9762\u677f<\/td><td>\u63d0\u4f9b\u53ef\u89c6\u5316\u6309\u94ae\u4e0e\u542f\u52a8\u3001\u67e5\u770b\u72b6\u6001\u7b49\u529f\u80fd\uff08\u53ef\u9009\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udee0\ufe0f \u63a5\u4e0b\u6765\u7684\u6b65\u9aa4\u5b89\u6392<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Step 1\uff1a\u56fe\u50cf\u8bc6\u522b\u5750\u6807 &amp; \u521d\u59cb\u6d4b\u8bd5\u811a\u672c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u5148\u751f\u6210\uff1a \u2022 \u57fa\u4e8e\u4f60\u56fe\u4e2d\u9875\u9762\u8bc6\u522b\u7684 48 \u4e2a\u98ce\u673a\u4f4d\u7f6e\u5750\u6807\uff1b \u2022 \u63d0\u4f9b\u4e00\u4e2a\u53ef\u8fd0\u884c\u7684 .py \u811a\u672c\uff0c\u5b9a\u65f6\u622a\u56fe\u8bc6\u522b\u98ce\u673a\u72b6\u6001\uff0c\u5e76\u8f93\u51fa\u5f53\u524d\u9875\u98ce\u673a\u72b6\u6001\u5217\u8868\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Step 2\uff1a\u72b6\u6001\u53d8\u5316\u8bb0\u5f55\u903b\u8f91<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u4e0b\u6765\u6211\u5c06\u5b9e\u73b0\u4ee5\u4e0b\u529f\u80fd\uff1a \u2022 \u6bcf\u4e2a\u98ce\u673a\u72b6\u6001\u4ece\u201c\u7070\u2192\u7eff\u2192\u7070\u201d\u7b97\u4e00\u6b21\u8fd0\u884c\uff1b \u2022 \u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4\u3001\u7ed3\u675f\u65f6\u95f4\u3001\u6301\u7eed\u5206\u949f\uff1b \u2022 \u4fdd\u5b58\u5728 CSV\/Excel \u4e2d\uff0c\u5e76\u53ef\u5b9a\u671f\u6c47\u603b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Step 3\uff1a\u697c\u5c42\u8f6e\u8be2 &amp; \u81ea\u52a8\u70b9\u51fb<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7cfb\u7edf\u4f1a\uff1a \u2022 \u8bc6\u522b\u5f53\u524d\u9875\u98ce\u673a\uff1b \u2022 \u81ea\u52a8\u70b9\u51fb\u53f3\u4e0a\u89d2\u6309\u94ae\uff1b \u2022 \u7ee7\u7eed\u8bc6\u522b\u4e0b\u4e00\u9875\uff0c\u76f4\u5230\u5168\u90e8\u9875\u5b8c\u6210\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Step 4\uff1a\u7edf\u8ba1\u6c47\u603b\u4e0e\u5bfc\u51fa<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u63d0\u4f9b\uff1a \u2022 \u6708\u5ea6\u3001\u5b63\u5ea6\u3001\u5e74\u5ea6\u7edf\u8ba1\u6c47\u603b\u51fd\u6570\uff1b \u2022 \u6bcf\u53f0\u98ce\u673a\u7684\u5f00\u673a\u65f6\u957f\u3001\u9891\u6b21\u3001\u56fe\u8868\uff08\u53ef\u9009\uff09\uff1b \u2022 \u5bfc\u51fa\u4e3a Excel \u62a5\u8868\u683c\u5f0f\uff08EPPlus or pandas\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Step 5\uff08\u53ef\u9009\uff09\uff1a\u5e26 GUI \u7684\u76d1\u63a7\u5de5\u5177<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u62e5\u6709\uff1a \u2022 \u56fe\u5f62\u754c\u9762\u5e26\u6309\u94ae\u542f\u52a8\u76d1\u63a7\uff1b \u2022 \u53ef\u89c6\u5316\u72b6\u6001\u663e\u793a\uff08\u4f8b\u5982\u7eff\u7ea2\u706f\u6807\u5fd7\uff09\uff1b \u2022 \u5bfc\u51fa\u4e00\u952e\u70b9\u51fb\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.3\u751f\u6210\u4e00\u4e2a\u5b8c\u6574\u53ef\u8fd0\u884c\u7684 Python \u811a\u672c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u56fe\u50cf\u8bc6\u522b\u98ce\u673a\u72b6\u6001 \u2705 \u6bcf5\u5206\u949f\u81ea\u52a8\u8f6e\u8be2\u8bc6\u522b\u6240\u6709\u9875\u9762\uff088\u9875\uff09 \u2705 \u81ea\u52a8\u70b9\u51fb\u53f3\u4e0a\u89d2\u5207\u9875\u6309\u94ae \u2705 \u8bb0\u5f55\u6bcf\u53f0\u98ce\u673a\u5f00\u542f\uff08\u7eff\u8272\uff09\u6301\u7eed\u65f6\u95f4 \u2705 \u5bfc\u51fa\u8fd0\u884c\u8bb0\u5f55\u4e3a Excel \u8868\u683c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde0 \u5b9e\u73b0\u524d\u63d0 \u2022 \u754c\u9762\u6392\u5e03\u4e3a 6 \u884c \u00d7 8 \u5217\uff08\u5171 48 \u53f0\u98ce\u673a\uff09\uff1b \u2022 \u6bcf\u9875\u98ce\u673a\u4f4d\u7f6e\u4e00\u81f4\uff1b \u2022 \u9f20\u6807\u81ea\u52a8\u70b9\u51fb\u53f3\u4e0a\u89d2\u7bad\u5934\u7ffb\u9875\uff08\u6211\u9ed8\u8ba4\u5176\u5750\u6807\u4e3a (1840, 140)\uff0c\u4f60\u53ef\u5fae\u8c03\uff09\uff1b \u2022 \u72b6\u6001\u5224\u65ad\u57fa\u4e8e\u4e2d\u5fc3\u50cf\u7d20\u662f\u5426\u4e3a\u7eff\u8272\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udce6 \u6587\u4ef6\u7ed3\u6784<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;fan_monitor\/<br>&nbsp;\u251c\u2500\u2500 fan_monitor.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # \u4e3b\u7a0b\u5e8f\uff08\u8f6e\u8be2+\u8bc6\u522b+\u8bb0\u5f55+\u5bfc\u51fa\uff09<br>&nbsp;\u251c\u2500\u2500 fan_log.xlsx &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # \u5bfc\u51fa\u7684\u8fd0\u884c\u65e5\u5fd7<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u5b8c\u6574\u811a\u672c\uff08fan_monitor.py\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;import pyautogui<br>&nbsp;import time<br>&nbsp;from datetime import datetime<br>&nbsp;from PIL import ImageGrab<br>&nbsp;import pandas as pd<br>&nbsp;import os<br>&nbsp;\u200b<br>&nbsp;========== \u914d\u7f6e\u90e8\u5206 ==========<br>&nbsp;\u200b<br>&nbsp;ROWS = 6<br>&nbsp;COLS = 8<br>&nbsp;PAGES = 8<br>&nbsp;X0, Y0 = 190, 270 &nbsp;# \u7b2c\u4e00\u4e2a\u98ce\u673a\u56fe\u6807\u4e2d\u5fc3\u5750\u6807\uff08\u53c2\u8003\u622a\u56fe\uff09<br>&nbsp;X_GAP = 172 &nbsp; &nbsp; &nbsp; &nbsp;# \u6a2a\u5411\u95f4\u8ddd<br>&nbsp;Y_GAP = 120 &nbsp; &nbsp; &nbsp; &nbsp;# \u7eb5\u5411\u95f4\u8ddd<br>&nbsp;NEXT_BUTTON_POS = (1840, 140) &nbsp;# \u7ffb\u9875\u6309\u94ae\u5750\u6807\uff08\u53f3\u4e0a\u89d2\uff09<br>&nbsp;SCREEN_REGION = (0, 0, 1920, 1080)<br>&nbsp;CHECK_INTERVAL = 300 &nbsp;# \u8f6e\u8be2\u95f4\u9694\uff08\u79d2\uff09<br>&nbsp;\u200b<br>&nbsp;========== \u6570\u636e\u7ed3\u6784 ==========<br>&nbsp;\u200b<br>&nbsp;status_log = {} &nbsp;# {fan_id: (\"ON\"\/\"OFF\", start_time)}<br>&nbsp;run_records = [] &nbsp;# \u8fd0\u884c\u65f6\u95f4\u6bb5\u8bb0\u5f55\u5217\u8868<br>&nbsp;\u200b<br>&nbsp;def get_fan_positions():<br>&nbsp; &nbsp; &nbsp;positions = []<br>&nbsp; &nbsp; &nbsp;for row in range(ROWS):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for col in range(COLS):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x = X0 + col * X_GAP<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;y = Y0 + row * Y_GAP<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;positions.append((x, y))<br>&nbsp; &nbsp; &nbsp;return positions<br>&nbsp;\u200b<br>&nbsp;def is_green(pixel):<br>&nbsp; &nbsp; &nbsp;r, g, b = pixel<br>&nbsp; &nbsp; &nbsp;return g &gt; 180 and r &lt; 100 and b &lt; 100<br>&nbsp;\u200b<br>&nbsp;def check_status(screenshot, pos):<br>&nbsp; &nbsp; &nbsp;pixel = screenshot.getpixel(pos)<br>&nbsp; &nbsp; &nbsp;return \"ON\" if is_green(pixel) else \"OFF\"<br>&nbsp;\u200b<br>&nbsp;def update_status(fan_id, new_status):<br>&nbsp; &nbsp; &nbsp;now = datetime.now()<br>&nbsp; &nbsp; &nbsp;last_status, start_time = status_log.get(fan_id, (None, None))<br>&nbsp; &nbsp; &nbsp;if new_status != last_status:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if new_status == \"ON\":<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status_log[fan_id] = (\"ON\", now)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif new_status == \"OFF\" and start_time:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;duration = (now - start_time).total_seconds() \/ 60<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;run_records.append({<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"FanID\": fan_id,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"StartTime\": start_time,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"EndTime\": now,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"Duration(min)\": duration<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  })<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status_log[fan_id] = (\"OFF\", None)<br>&nbsp;\u200b<br>&nbsp;def click_next_page():<br>&nbsp; &nbsp; &nbsp;pyautogui.moveTo(*NEXT_BUTTON_POS)<br>&nbsp; &nbsp; &nbsp;pyautogui.click()<br>&nbsp; &nbsp; &nbsp;time.sleep(2) &nbsp;# \u7b49\u5f85\u9875\u9762\u5237\u65b0<br>&nbsp;\u200b<br>&nbsp;def monitor_once():<br>&nbsp; &nbsp; &nbsp;fan_positions = get_fan_positions()<br>&nbsp; &nbsp; &nbsp;for page in range(PAGES):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;screenshot = ImageGrab.grab(SCREEN_REGION)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for idx, pos in enumerate(fan_positions):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fan_id = f\"P{page+1}-F{idx+1}\"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status = check_status(screenshot, pos)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update_status(fan_id, status)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if page &lt; PAGES - 1:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;click_next_page()<br>&nbsp;\u200b<br>&nbsp;def export_log():<br>&nbsp; &nbsp; &nbsp;if not run_records:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return<br>&nbsp; &nbsp; &nbsp;df = pd.DataFrame(run_records)<br>&nbsp; &nbsp; &nbsp;os.makedirs(\"export\", exist_ok=True)<br>&nbsp; &nbsp; &nbsp;df.to_excel(f\"export\/fan_log_{datetime.now().strftime('%Y%m%d_%H%M%S')}.xlsx\", index=False)<br>&nbsp;\u200b<br>&nbsp;def run_monitor():<br>&nbsp; &nbsp; &nbsp;print(\"\u542f\u52a8\u98ce\u673a\u76d1\u63a7...\")<br>&nbsp; &nbsp; &nbsp;try:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while True:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] \u8f6e\u8be2\u4e2d...\")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;monitor_once()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;export_log()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time.sleep(CHECK_INTERVAL)<br>&nbsp; &nbsp; &nbsp;except KeyboardInterrupt:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(\"\u76d1\u63a7\u4e2d\u65ad\uff0c\u5bfc\u51fa\u8bb0\u5f55...\")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;export_log()<br>&nbsp;\u200b<br>&nbsp;if __name__ == \"__main__\":<br>&nbsp; &nbsp; &nbsp;run_monitor()<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u4f7f\u7528\u8bf4\u660e 1. \u5b89\u88c5\u4f9d\u8d56\uff08\u786e\u4fdd\u7528 Python 3.9+\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install pyautogui pillow pandas openpyxl<\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>\u8fd0\u884c\u811a\u672c\uff08\u8bb0\u5f97\u5148\u6253\u5f00\u98ce\u673a\u76d1\u63a7\u754c\u9762\uff09\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">python fan_monitor.py<\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>\u7ed3\u679c\u5bfc\u51fa\uff1a<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u2022 \u6bcf\u8f6e\u8fd0\u884c\u540e\uff0c\u4f1a\u5728 export\/ \u6587\u4ef6\u5939\u4e2d\u751f\u6210 fan_log_*.xlsx \u6587\u4ef6\uff1b \u2022 \u6587\u4ef6\u5305\u542b\u6bcf\u4e2a\u98ce\u673a\u7684\u8fd0\u884c\u65f6\u95f4\u6bb5\u53ca\u6301\u7eed\u65f6\u95f4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u540e\u7eed\u53ef\u52a0\u529f\u80fd\uff08\u53ef\u6309\u9700\u6dfb\u52a0\uff09<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u529f\u80fd<\/th><th>\u5b9e\u73b0\u65b9\u5f0f<\/th><\/tr><\/thead><tbody><tr><td>GUI \u53ef\u89c6\u5316\u76d1\u63a7\u754c\u9762<\/td><td>\u4f7f\u7528 Tkinter or PyQt<\/td><\/tr><tr><td>\u5f02\u5e38\u62a5\u8b66\uff08\u8fde\u7eed\u8fd0\u884c\u8d85\u65f6\uff09<\/td><td>\u52a0\u9608\u503c\u5224\u65ad<\/td><\/tr><tr><td>\u5206\u6790\u56fe\u8868\uff08\u8fd0\u884c\u8d8b\u52bf\uff09<\/td><td>\u7528 matplotlib \u7ed8\u56fe<\/td><\/tr><tr><td>\u6309\u6708\/\u5b63\u5ea6\/\u5e74\u7edf\u8ba1<\/td><td>\u7528 groupby \u7edf\u8ba1\u6c47\u603b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.4\u4e3a\u73b0\u6709\u7684\u811a\u672c\u6dfb\u52a0\u529f\u80fd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u7edf\u8ba1\u6bcf\u53f0\u98ce\u673a\u7684\u603b\u8fd0\u884c\u65f6\u957f\uff08\u6309\u6708\u3001\u5b63\u5ea6\u3001\u5e74\uff09 \u2705 \u81ea\u52a8\u5728\u5bfc\u51fa Excel \u4e2d\u52a0\u5165\u7edf\u8ba1\u6c47\u603b\u9875<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u4fee\u6539\u6b65\u9aa4\u6982\u89c8<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde9 \u76ee\u6807\u6548\u679c\uff1a \u2022 \u6bcf\u8f6e\u5bfc\u51fa\u65e5\u5fd7\u65f6\uff0c\u81ea\u52a8\u65b0\u589e\u4e00\u4e2a \u6c47\u603b \u5de5\u4f5c\u8868\uff1b \u2022 \u6c47\u603b\u5305\u542b\u6bcf\u53f0\u98ce\u673a\u5728\u8be5\u65f6\u95f4\u6bb5\u5185\u7684\uff1a \u2022 \u6708\u8fd0\u884c\u65f6\u957f \u2022 \u5b63\u5ea6\u8fd0\u884c\u65f6\u957f \u2022 \u5e74\u8fd0\u884c\u65f6\u957f\uff08\u5f53\u524d\u5e74\u5ea6\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u4ee3\u7801\u4fee\u6539\u90e8\u5206<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66ff\u6362\u539f\u811a\u672c\u4e2d\u7684 export_log() \u51fd\u6570\u4e3a\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def export_log():<br>    if not run_records:<br>        return<br>    df = pd.DataFrame(run_records)<br>    df['StartTime'] = pd.to_datetime(df['StartTime'])<br>    df['Year'] = df['StartTime'].dt.year<br>    df['Month'] = df['StartTime'].dt.to_period('M')<br>    df['Quarter'] = df['StartTime'].dt.to_period('Q')<br># \u5206\u7ec4\u7edf\u8ba1\u603b\u8fd0\u884c\u65f6\u957f\uff08\u5206\u949f\uff09<br>df_month = df.groupby(['FanID', 'Month'])['Duration(min)'].sum().reset_index()<br>df_quarter = df.groupby(['FanID', 'Quarter'])['Duration(min)'].sum().reset_index()<br>df_year = df.groupby(['FanID', 'Year'])['Duration(min)'].sum().reset_index()<br><br># \u521b\u5efa\u5de5\u4f5c\u7c3f<br>now = datetime.now().strftime('%Y%m%d_%H%M%S')<br>out_path = f\"export\/fan_log_{now}.xlsx\"<br>with pd.ExcelWriter(out_path, engine='openpyxl') as writer:<br>    df.to_excel(writer, sheet_name='\u8fd0\u884c\u8bb0\u5f55', index=False)<br>    df_month.to_excel(writer, sheet_name='\u6708\u7edf\u8ba1', index=False)<br>    df_quarter.to_excel(writer, sheet_name='\u5b63\u5ea6\u7edf\u8ba1', index=False)<br>    df_year.to_excel(writer, sheet_name='\u5e74\u5ea6\u7edf\u8ba1', index=False)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.5\u6700\u7ec8\u751f\u6210 Excel \u5185\u5bb9\u7ed3\u6784\u793a\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcc4 Sheet 1\uff1a\u8fd0\u884c\u8bb0\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>FanID<\/th><th>StartTime<\/th><th>EndTime<\/th><th>Duration(min)<\/th><\/tr><\/thead><tbody><tr><td>P1-F01<\/td><td>2025-07-01 10:00<\/td><td>2025-07-01 11:30<\/td><td>90<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcc4 Sheet 2\uff1a\u6708\u7edf\u8ba1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>FanID<\/th><th>Month<\/th><th>Duration(min)<\/th><\/tr><\/thead><tbody><tr><td>P1-F01<\/td><td>2025-07<\/td><td>300<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcc4 Sheet 3\uff1a\u5b63\u5ea6\u7edf\u8ba1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>FanID<\/th><th>Quarter<\/th><th>Duration(min)<\/th><\/tr><\/thead><tbody><tr><td>P1-F01<\/td><td>2025Q3<\/td><td>300<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcc4 Sheet 4\uff1a\u5e74\u5ea6\u7edf\u8ba1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>FanID<\/th><th>Year<\/th><th>Duration(min)<\/th><\/tr><\/thead><tbody><tr><td>P1-F01<\/td><td>2025<\/td><td>300<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \u4e0b\u4e00\u6b65\u5efa\u8bae\uff08\u53ef\u9009\u6269\u5c55\uff09<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u529f\u80fd<\/th><th>\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td>\u56fe\u8868\u53ef\u89c6\u5316\uff08\u67f1\u72b6\/\u6298\u7ebf\uff09<\/td><td>\u7528 matplotlib \u6216 openpyxl \u7ed8\u56fe<\/td><\/tr><tr><td>GUI \u4ea4\u4e92\u754c\u9762<\/td><td>\u542f\u52a8\/\u505c\u6b62\/\u67e5\u770b\u8fd0\u884c\u72b6\u6001\u6309\u94ae<\/td><\/tr><tr><td>\u5f00\u5173\u65e5\u5fd7\u5206\u79bb\u6309\u9875\u4fdd\u5b58<\/td><td>\u6bcf\u9875\u4e00\u4e2a\u65e5\u5fd7\u6587\u4ef6\u66f4\u6613\u5ba1\u8ba1<\/td><\/tr><tr><td>\u81ea\u52a8\u5b9a\u65f6\u542f\u52a8<\/td><td>\u52a0\u5165 Windows \u4efb\u52a1\u8ba1\u5212\u6216\u7528 PyInstaller \u6253\u5305\u670d\u52a1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2e3b<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">\u65b9\u68482\uff1a\u53cd\u7f16\u8bd1<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528dnspy\u53cd\u7f16\u8bd1\u8f6f\u4ef6\u5c1d\u8bd5\u5bf9\u3010touchvew\u3011\u5b9e\u73b0\u5728\u539f\u6709\u7cfb\u7edf\u4e0a\u8fdb\u884c\u529f\u80fd\u589e\u6dfb\uff0c\u770b\u6e90\u7a0b\u5e8f\u754c\u9762\u662f\u57fa\u4e8ewinform\u6846\u67b6\u5f00\u53d1\u7684\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"925\" height=\"539\" src=\"http:\/\/101.42.96.217:21080\/wp-content\/uploads\/2025\/07\/image-20250701102508033.png\" alt class=\"wp-image-6990\" srcset=\"https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033.png 925w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033-300x175.png 300w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033-768x448.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\"><\/noscript><img decoding=\"async\" width=\"925\" height=\"539\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20925%20539%22%3E%3C%2Fsvg%3E\" alt class=\"wp-image-6990 lazyload\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20925%20539%22%3E%3C%2Fsvg%3E 925w\" sizes=\"(max-width: 925px) 100vw, 925px\" data-srcset=\"https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033.png 925w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033-300x175.png 300w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102508033-768x448.png 768w\" data-src=\"http:\/\/101.42.96.217:21080\/wp-content\/uploads\/2025\/07\/image-20250701102508033.png\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5dnspy\u8fdb\u884c\u8f6f\u4ef6\u53cd\u7f16\u8bd1\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"1011\" height=\"693\" src=\"http:\/\/101.42.96.217:21080\/wp-content\/uploads\/2025\/07\/image-20250701102546259.png\" alt class=\"wp-image-6991\" srcset=\"https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259.png 1011w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259-300x206.png 300w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259-768x526.png 768w\" sizes=\"(max-width: 1011px) 100vw, 1011px\"><\/noscript><img decoding=\"async\" width=\"1011\" height=\"693\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201011%20693%22%3E%3C%2Fsvg%3E\" alt class=\"wp-image-6991 lazyload\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201011%20693%22%3E%3C%2Fsvg%3E 1011w\" sizes=\"(max-width: 1011px) 100vw, 1011px\" data-srcset=\"https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259.png 1011w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259-300x206.png 300w, https:\/\/www.xinyixx.com\/wp-content\/uploads\/2025\/07\/image-20250701102546259-768x526.png 768w\" data-src=\"http:\/\/101.42.96.217:21080\/wp-content\/uploads\/2025\/07\/image-20250701102546259.png\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e0\u6cd5\u6b63\u5e38\u7834\u89e3\uff0c\u65b9\u68482\u5931\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u68481\uff1a\u56fe\u5f62\u8bc6\u522b \u7528 Python \u56fe\u50cf\u8bc6\u522b + \u81ea\u52a8\u5316\u64cd\u4f5c \u6765\u5b9e\u73b0\u98ce\u673a\u65f6\u957f\u7684\u76d1\u63a7\u4e0e\u7edf\u8ba1\uff1a 1.1\u7528pytho [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[14,9],"tags":[77],"class_list":["post-6988","post","type-post","status-publish","format-standard","hentry","category-teacher","category-system","tag-coding","entry"],"_links":{"self":[{"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/posts\/6988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/comments?post=6988"}],"version-history":[{"count":1,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/posts\/6988\/revisions"}],"predecessor-version":[{"id":6992,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/posts\/6988\/revisions\/6992"}],"wp:attachment":[{"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/media?parent=6988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/categories?post=6988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xinyixx.com\/index.php\/wp-json\/wp\/v2\/tags?post=6988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}