From 161d2dd95b2081116bb114c61051767c16cad3a8 Mon Sep 17 00:00:00 2001 From: youpaishidifu Date: Mon, 3 Aug 2026 23:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9F=BA=E7=BA=BF=E6=8A=91?= =?UTF-8?q?=E5=88=B6=E5=90=8E=E6=88=AA=E5=9B=BE=20hash=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=B6=88=E6=81=AF=E8=A2=AB=E8=B7=B3=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=20-=20=E5=9F=BA=E7=BA=BF=E6=8A=91?= =?UTF-8?q?=E5=88=B6=E6=97=B6=E6=B8=85=E9=99=A4=E6=88=AA=E5=9B=BE=20hash?= =?UTF-8?q?=EF=BC=88=5Flast=5Fscreenshot=5Fhash.pop=EF=BC=89=20-=20?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E4=B8=8B=E6=AC=A1=E8=BD=AE=E8=AF=A2=E6=97=B6?= =?UTF-8?q?=20hash=20=E7=9B=B8=E5=90=8C=E7=9B=B4=E6=8E=A5=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=20OCR=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=B0=B8=E8=BF=9C=E7=AD=89=E4=B8=8D=E5=88=B0=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=20-=20=E6=9B=B4=E6=96=B0=E6=B3=A8=E9=87=8A=EF=BC=9A=E4=BB=8E'?= =?UTF-8?q?=E4=B8=89=E9=A1=B9=E5=85=B3=E9=94=AE=E5=A4=84=E7=BD=AE'?= =?UTF-8?q?=E6=94=B9=E4=B8=BA'=E5=9B=9B=E9=A1=B9=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=A4=84=E7=BD=AE'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- monitor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 062efc4..f5b7950 100644 --- a/monitor.py +++ b/monitor.py @@ -5166,15 +5166,18 @@ class MessageMonitor: is_baseline = self._last_new_msg_time.get(platform, 0) == 0 if is_baseline: # 基线轮:日志标记但不触发回复。 - # ⚠ 三项关键处置,防止"基线吞消息后永不回复": + # ⚠ 四项关键处置,防止"基线吞消息后永不回复": # 1. 从 seen 移除 item(4383 循环已 seen.add)——否则用户重发 # 相同内容 → ts in seen 永久拦截 # 2. 清空 _last_sig ——否则下一轮 sig 相同 → 4131 静默跳过, # 用户刚发的新消息被基线误吞后永远等不到回复 # 3. 不 seen.add ——防重复由 sig 静默跳过承担 + # 4. ⭐ 清除截图 hash——否则下次轮询时 hash 相同直接跳过 OCR, + # 消息永远等不到回复(截图内容没变但消息需要被处理) logger.info(f"[{platform}] 基线↺(不回复): {item[:60]}") seen.discard(item) self._last_sig[platform] = "" + self._last_screenshot_hash.pop(platform, None) self._last_new_msg_time[platform] = time.time() else: self._last_new_msg_time[platform] = time.time()