Commit Graph
44 Commits
Author SHA1 Message Date
CodexandClaude Opus 4.7 818c3139b1 docs: 收尾 DEBUG_IMAGE_SYSTEM + ocr_engine_decision 路径
- DEBUG_IMAGE_SYSTEM.md: 'path_config.py' → 'douyin/core/path_config.py'
- ocr_engine_decision.md: 'Underlying_Operations.py' → 'douyin/core/underlying_operations.py'

至此活文档(除 docs/完整技术文档.md 头部对照表里的旧→新示例外)已无
裸路径残留。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:38:47 +08:00
CodexandClaude Opus 4.7 941bbc2475 docs: 命令行示例与核显说明改新路径
- docs/完整技术文档.md:7 处 'python run_cli.py …' 命令统一改为
  'python bin/run_cli.py …',与重构后入口位置对齐(头部小贴士那
  一行的示例字符串保留作为对照说明)
- docs/核显GPU加速说明.md:'修改 Underlying_Operations.py' 改为
  'douyin/core/underlying_operations.py'

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:35:19 +08:00
CodexandClaude Opus 4.7 c802f62796 docs/完整技术文档: 批量替换叙述性旧路径为新路径
把全文(除头部"路径迁移说明"对照表外)所有反引号包裹的旧路径标识符
更新为重构后位置:

- \`Underlying_Operations.py\` → \`douyin/core/underlying_operations.py\` (23 处)
- \`path_config.py\` → \`douyin/core/path_config.py\` (7 处)
- \`run_cli.py\` → \`bin/run_cli.py\` (15 处)
- \`unified_logger.py\` → \`douyin/logging/unified_logger.py\` (1 处)
- \`Underlying_Operations.<method>()\` → \`underlying_operations.<method>()\` (6 处)

头部 "⚠️ 路径迁移说明" 对照表内的旧路径作为示例保留。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:32:35 +08:00
CodexandClaude Opus 4.7 b6d2836e84 docs/完整技术文档: 可执行 import 示例改为新路径
8 处 from Underlying_Operations / from path_config / python -c "..."
示例改为 douyin.core.underlying_operations / douyin.core.path_config,
确保读者复制粘贴能跑通。

文档头部"路径迁移说明"表里左侧"旧"列保留旧路径作为对照;正文叙述性
提及(如 "见 Underlying_Operations.get_screenshot() 实现")暂保留,
读者依靠头部表对照即可。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:30:14 +08:00
CodexandClaude Opus 4.7 af4fc9168b docs/完整技术文档: fudai_detail_modules → douyin/fudai/core/fudai_detail_orchestrator
main PR b137aea 把 fudai_detail_modules/ 6 个模块合并到 douyin/fudai/core/,
其中 fudai_detail_reader.py 因与 core/ 已有同名文件冲突,重命名为
fudai_detail_orchestrator.py。

修订文档里 5 处旧引用:
- L155、L236:变更记录里的 fudai_detail_reader.py 改为新位置 + 标注旧路径
- L209:python -c 示例 import 改为新模块路径
- L256:py_compile 示例改为新文件路径
- L523:get_fudai_contain 调用位置改为新位置(顺手把"具体行号"改为
  "以代码当前状态为准",因为行号会随重构持续变化,硬编码价值低)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:26:24 +08:00
CodexandClaude Opus 4.7 a84ec29145 docs/DEBUG_IMAGE_SYSTEM: Underlying_Operations.py → douyin/core/underlying_operations.py
文件已迁移到 douyin/core/,文档里两处"实现位置"的路径修正为新位置。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:21:36 +08:00
CodexandClaude Opus 4.7 a46901ef5d docs: 修正"根目录有 launcher 转发"的错误说明 + 入口命令改为 bin/
实际情况:根目录已不再保留 run_cli.py / gui_app.py / webgui_launcher.py /
manage_logs.py 的 launcher 转发,这些入口脚本统一在 bin/ 下,必须以
'python bin/run_cli.py ...' 形式调用。

之前的提交里我把"路径迁移说明"写成"入口仍可从仓库根直接运行"是错的,
本提交修正:

- README.md
  - 项目架构段末尾的"历史小贴士"改为完整的迁移表,明确入口在 bin/ 下
  - 5 处 'python run_cli.py' / 'python gui_app.py' / 'python webgui_launcher.py'
    全部改为 'python bin/...' 形式(分别在快速开始、命令行用法、Web GUI 启动、
    Issue 模板、测试模式段)

- docs/完整技术文档.md
  - 头部"路径迁移说明"末尾的"仍可从仓库根直接运行"改为"必须用 bin/ 前缀"

文档里其他正文中的 'python run_cli.py …' 命令属于历史正文,迁移说明已在文档头部
统一指引读者改读为 bin/ 前缀,不再逐句修订(避免改动 7000+ 行文档主体)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:10:07 +08:00
CodexandClaude Opus 4.7 c92af75d02 docs/完整技术文档: 头部加路径迁移说明
文档主体(7363 行)撰写于项目大重构之前,正文中仍存在大量旧路径
(Underlying_Operations.py / path_config.py 在根目录,run_cli.py / gui_app.py
不在 bin/ 等)。全面改写风险高,改为在文档头部加一段醒目的"路径迁移说明",
列出新旧路径映射,让读者遇到旧路径时能查得到对应位置。

收益:
  - 不破坏现有内部链接 / 锚点
  - 读者一眼就能找到新旧路径对照
  - 入口脚本(bin/)仍有根目录 launcher,文档里 python run_cli.py 命令仍可用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 12:18:58 +08:00
CodexandClaude Opus 4.7 6ac99530d6 docs/README: 补登 ocr_engine_decision.md
main PR #6 新增了 docs/ocr_engine_decision.md(OCR 引擎选型决策记录),
但 docs/README.md 索引未同步。补到「系统说明(活文档)」分组。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 12:15:51 +08:00
zzz 10ad6575c7 Merge branch 'main' into claude/compassionate-sammet-469997 2026-05-21 11:36:48 +08:00
CodexandClaude Opus 4.7 9a51b41c3d docs: 归档过期报告 + 整体迁移 docs/optimization → docs/archive/optimization
A. docs/ 根目录下 5 篇过期/迁移类文档归档到 docs/archive/
  - LOGGING_IMPROVEMENTS.md         (日志系统迭代报告,与 archive/日志系统优化说明.md 重复)
  - OCR性能分析报告.md              (历史性能分析)
  - 统一截图和分数记录说明.md        (重构方案,已合并到代码)
  - AI_PROJECT_SUMMARY.md           (提到的 Underlying_Operations.py / path_config.py 路径已与 main 重构后不一致)
  - param_usage.md                  (模块使用说明,零引用,模块本身有 docstring)

B. docs/optimization/ 整目录归档为 docs/archive/optimization/(7 篇)
  - ADB_EXECOUT_OPTIMIZATION / OCR_PERFORMANCE_OPTIMIZATION
  - SCREENSHOT_PERFORMANCE_DIAGNOSIS / SCREENSHOT_VERIFICATION_GUIDE
  - STREAMING_SCREENSHOT_DISABLED / STREAMING_SCREENSHOT_COMPLETELY_DISABLED
  - optimize_file_replace
  全部是优化报告 / 已禁用功能记录,属于历史迭代而非活文档

C. docs/README.md 重写为按主题分组的索引,明确"活文档 vs 归档"边界

保留为活文档:
  - 日志系统规范文档.md(被 3 处引用)
  - 日志轮转功能说明.md(描述当前在用的轮转策略)
  - 截图服务日志说明.md(描述当前服务行为)
  - 完整技术文档.md / 流程图.md / 预约系统详细流程.md / 高价值房间重访功能说明.md

回归:纯文档归档不影响代码;140 .py 全量编译通过;
test_filter_logging / check_web_gui_config_sync 通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 11:19:28 +08:00
Codex 0131be7869 切换 OCR 默认引擎到 PaddleOCR v4-mobile 并简化预处理
- 默认引擎改为 PaddleOCR PP-OCRv4_mobile(实测 369ms/张,比 EasyOCR 629ms 更快且精度大幅提升,coupon 等关键图错字一片 -> 全对)
- EasyOCR 仅作回退,移除"小图自动放大+锐化+对比度增强"预处理(实测对 Paddle 是负优化,会引入伪影/重复字)
- analyse_pic_word 加 LRU 内容哈希缓存(256 条),重复读图直接命中
- analyse_pic_digits 从 200 行重复实现精简成 30 行委托 + 数字过滤
- 统一两处 OCR 初始化为 _build_paddle / _build_easyocr 工厂,消除重复
- 设置 FLAGS_use_mkldnn=false 绕开 Win + Paddle 3.x 的 oneDNN+PIR 不兼容 bug(实测 FLAGS_enable_pir_in_executor=0 也修不掉,关 oneDNN 是当前唯一可行解)
- 决策依据/速度数据/已知问题归档到 docs/ocr_engine_decision.md
- 业务接口完全向后兼容
2026-05-21 10:50:30 +08:00
CodexandClaude Opus 4.7 7fb0c3849c P0 死代码清理:删 .backup / 空文件 / GUI 占位桩 / 占位目录 / 失效测试
A. 删除 3 个 .backup 文件(约 3.4K 行)
  - douyin/detection/douyin_pixel.py.backup
  - douyin/stage/douyin_stage_handler.py.backup
  - gui/components/log_color_config.py.backup

B. 删除 0 字节文件
  - douyin/other/douyin_stuck_guard.py
  - docs/功能差异对比.md
  - docs/archive/模块化代码对比说明.md

C. 删除 9 个 TODO + pass 占位组件(全仓零外部引用)
  - gui/components/{config_manager,image_viewer,stats_display,
    reservation_display,high_value_rooms_display,ocr_panel,main_window}.py
  - gui/web_components/{proc_runner,http_handler}.py

D. 删除占位目录与失效测试入口
  - douyin/detection/core/  仅 re-export 占位
  - douyin/fudai/finder/    仅 re-export 占位
  - tests/run_test.py       指向已删的 deleted_tests_backup/

附加:tools/diagnostics/check_web_gui_config_sync.py --help 字符串里
      tools/web_gui_config_manifest.json 旧路径修正为 tools/dev/...

回归:154 → 141 个 .py,全量 compileall 通过;AST 扫描 0 处 import 残留;
gui.gui_app/web_gui/gui_core 仍可加载;fudai_analyse / should_skip_fudai_by_config
业务函数链路正常;test_filter_logging / check_web_gui_config_sync 通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 10:36:59 +08:00
CodexandClaude Opus 4.5 a2d6bd2cc3 chore: 归档过时迭代报告到 docs/archive/
将 15 份历史性的修复/审查/优化迭代报告归档:
- *_REPORT.md / *_FIXES.md(一次性修复总结)
- 多线程优化/日志系统优化等迭代说明(已被新版替代)
- 真机测试报告(具体某次测试的快照)

保留在 docs/ 下的是仍然有用的当前文档:
使用指南、技术文档、规范、功能说明等。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-20 23:14:30 +08:00
CodexandClaude Opus 4.5 31d4102696 chore: 删除 docs/reports 中的临时文件
config.json.bak / git_lsremote_trace.txt / log_filter_result.txt /
time_analysis_result.txt 都是运行/调试产生的临时输出,
已在 .gitignore 中忽略,本次将历史误提交的版本一并清理。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-20 23:12:50 +08:00
Codex 1fdec7a548 整理项目文件分类 2026-05-20 20:49:19 +08:00
Codex 13b1f2150c Fix launcher paths and remove local hardcoding 2026-05-20 19:18:34 +08:00
Your Name 4903e50ff2 优化:调整代码格式,增强可读性 2026-01-23 15:29:09 +08:00
Your Name 191edf9f28 docs: V4.4 (2026-01-18) — add shopping_redpacket threshold GUI/config; document OCR recheck, mapping write-to-disk, reservation backtrack fixes, attend retry fix, swipe handler fix 2026-01-18 14:49:21 +08:00
Your Name 716567dbb0 feat: 优化预约福袋参与逻辑,修复锁定期处理和映射表记录,新增重复标题去重功能 2026-01-17 08:43:21 +08:00
Your Name db75248b98 feat: 优化滑动重置回退延迟,从2秒减少到0.1秒;完善预约系统二次回退机制 2026-01-16 21:54:09 +08:00
Your Name 54f9b39d2e feat: 优化滑动重置和返回键回退逻辑,完善预约系统二次回退机制 2026-01-16 21:53:05 +08:00
Your Name ea1e3dd876 Refactor fudai detection and logging mechanisms
- Improved logging for task count retrieval and warnings in `douyin_fudai_core.py` and `douyin_stage.py`.
- Enhanced error handling and logging in `fudai_detail_reader.py` to provide clearer insights when task counts are not saved.
- Updated template matching logic in `douyin_detection.py` to include detailed logging and error handling for template loading and matching processes.
- Refactored screenshot handling and debugging paths to ensure better traceability and error reporting.
- Adjusted default task count values to zero where applicable to prevent unintended behavior.
2026-01-16 02:08:01 +08:00
Your Name 073ad13781 feat: 添加房间位置映射文件,更新房间标题信息 2026-01-15 16:51:11 +08:00
Your Name b3011dd9ce feat: Implement high-value room revisit feature and enhance fudai tracking
- Added tracking for previously seen fudai in Runner and ProcRunner classes to avoid duplicate recognition.
- Extracted room title during fudai recognition for better tracking.
- Updated high_value_rooms.json with new room entries and adjusted total count.
- Introduced new GUI elements for configuring icon coordinates in webui.
- Created comprehensive documentation for the high-value room revisit functionality.
- Added tests for delay settings and icon detection logic to ensure functionality.
- Implemented a tool for analyzing step times in logs to identify performance bottlenecks.
2026-01-08 14:27:38 +08:00
Your Name 93d47a16d6 Refactor reservation preemption handling and logging
- Removed the reservation preempt minimum value from the Runner and GUI components.
- Updated logging mechanism to streamline log message handling and improve readability.
- Introduced a new method for appending log lines in the Runner class.
- Cleaned up related GUI elements and configuration options in web interface.
- Deleted obsolete simulation scripts related to reservation preemption checks.
2026-01-07 21:24:10 +08:00
Your Name c6b6745e3e feat: 优化日志记录格式,增强循环次数和运行时间限制的可读性 2026-01-07 19:06:10 +08:00
Your Name e42e6e6d3b feat: 更新配置文件,禁用养号相关功能并修复相关逻辑;优化文档和代码可读性 2026-01-04 20:33:55 +08:00
Your Name 95b4517bdd feat: Enhance logging and parameter tracking capabilities
- Refactor `gui_core.py` to improve code readability and maintainability by adding line breaks for long statements.
- Introduce `inspect_lines.py` script for inspecting specific line ranges in files.
- Add `generate_param_locations.py` to scan the repository and generate a report of function definitions, argparse parameters, and tracking calls.
- Implement `param_usage_tool.py` for analyzing `param_usage.json` records and scanning code for tracking calls.
- Create `simulate_reservation_preempted_flow.py` and `simulate_reservation_preempted_flow_dynamic.py` to validate behavior of reservation logic under specific conditions.
- Add global parameter tracking feature in `run_cli.py` to enable detailed usage tracing.
2026-01-03 19:12:58 +08:00
Your Name 2aa0aec99a feat: 添加任务列表OCR开关,更新配置与日志记录功能 2026-01-03 11:34:24 +08:00
Your Name 4f74a5e95a chore: remove generated reports and logs from repo, update .gitignore 2026-01-03 11:22:41 +08:00
Your Name 9e08ed3bd0 chore: remove OCR archive, delete collect_ocr_failures, update docs 2026-01-03 03:50:45 +08:00
Your Name 3d93f7f723 feat(logging): enhance logging configuration and file handling
- Updated the maximum log file size to 10MB and reduced backup count to 5.
- Introduced a `per_run` option to generate independent log files for each run.
- Improved log file naming conventions based on the `per_run` setting.
- Added support for both size-based and time-based log rotation configurations.
- Implemented error handling for OCR click execution in `douyin_helpers.py`.
- Added new CSV report for OCR regions and updated logging for click actions.
- Introduced a temporary script to check logging configurations and handlers.
- Added a new log file for unified logs dated 2025-12-27.
- Updated reservations timestamp in JSON state file.
2026-01-03 01:06:49 +08:00
Your Name 25ed50cc3c feat: Add AI project summary and coordinate constants for Douyin Fudai
- Created AI_PROJECT_SUMMARY.md for quick understanding of project structure, data flow, key interfaces, and verification points.
- Added key modules and data flow overview for automated participation in Douyin Fudai lottery.
- Introduced a JSON schema example for configuration and provided quick validation steps.
- Updated coordinate constants in coords.py for various cropping areas related to Fudai details, ensuring centralized management of coordinates.
- Generated a new actions log file for tracking actions performed by the application.
2026-01-03 00:06:59 +08:00
Your Name 9131c48633 Refactor screenshot service for improved performance and error handling; add simplified version to avoid linter issues. Update tests and documentation accordingly. 2026-01-02 02:17:33 +08:00
Your Name a0aad21835 feat: Optimize ADB exec-out and OCR performance
- Introduced performance enhancements for ADB exec-out, reducing execution time by 10-20% through the use of Popen with streaming reads, increased buffer sizes, and removal of unnecessary fsync calls.
- Implemented optimizations in OCR processing, cutting recognition time by 50% by refining button recognition logic and improving image loading and preprocessing methods.
- Added detailed performance diagnostics and configuration options to facilitate further optimizations.
- Created new documentation files outlining the performance improvements and recommendations for future enhancements.
2026-01-02 02:06:01 +08:00
Your Name c7b5d6be0f 后台保存debug图像 2026-01-01 13:25:50 +08:00
Your Name 7b93413af7 回退到直接截图 2026-01-01 11:30:59 +08:00
Your Name 478ae69052 chore: Clean up blank lines and enhance code organization
- Removed excessive blank lines from multiple Python scripts and configuration files to improve readability and maintainability.
- Ensured consistent formatting across the project, contributing to a more organized codebase.
- Added new files for testing and analysis, including `test_screenshot_error_handling.py` and `test_screenshot_reuse_optimization.py`, to improve testing coverage and functionality.
2026-01-01 10:04:32 +08:00
Your Name 07c387751d chore: Clean up blank lines across multiple files to enhance readability
- Removed excessive blank lines in various Python scripts, markdown files, and configuration files to improve overall code clarity and maintainability.
- Ensured consistent formatting throughout the project, contributing to a more organized codebase.
2025-12-31 17:00:58 +08:00
Your Name ace3bbfa04 优化后台截图功能 2025-12-31 11:55:01 +08:00
Your Name 223c127e11 chore: Clean up and refactor codebase for improved maintainability
- Removed obsolete command-line test parameters from `run_cli.py` to streamline functionality.
- Introduced a new `ocr_preprocess.py` module for unified OCR image preprocessing, enhancing recognition stability.
- Updated various components to utilize the new preprocessing function, improving code organization and readability.
- Adjusted configuration values in `config.json` for better performance and consistency.
- Added comprehensive technical documentation for the Douyin project, detailing code modification standards and operational guidelines.
- Cleaned up excessive blank lines across multiple files to enhance overall readability.
2025-12-30 23:11:34 +08:00
Your Name 26df350755 feat: Implement 30-minute timeout protection and unify path configurations
- Introduced a 30-minute timeout mechanism to prevent the script from getting stuck in invalid states, with configurable timeout settings.
- Unified path configurations across the project to enhance maintainability and avoid hardcoded paths.
- Updated documentation and flowcharts to reflect the new timeout feature and improved path management.
- Fixed issues with template and screenshot path configurations to ensure consistency across the project.
2025-12-28 14:47:31 +08:00
Your Name c67f22f76f feat: Refactor and reorganize project structure with new modules and files
- Deleted obsolete files including test scripts and configuration files to streamline the project.
- Introduced new modules for handling Douyin functionalities, including core operations, logging, and GUI components.
- Updated import paths to reflect the new module structure, enhancing code organization and maintainability.
- Added configuration files and documentation to support the new structure and improve user guidance.
2025-12-28 14:16:40 +08:00