docs(quick-260425-w2i): 区域转移概率统计 — 计划与总结
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
description: "在控制台页面新增区域转移概率统计:1-49分5区,统计特码所在区下一期特码出现在各区的概率"
|
||||||
|
status: in-progress
|
||||||
|
---
|
||||||
|
# Quick Task 260425-w2i: 区域转移概率统计
|
||||||
|
|
||||||
|
## Plan
|
||||||
|
|
||||||
|
1. **Model** — Add `getZoneTransition($periods)` method to `app\admin\model\History`
|
||||||
|
- Query latest `$periods` periods ordered by openTime ASC
|
||||||
|
- Divide numbers 1-49 into 5 zones: 1-10, 11-20, 21-30, 31-40, 41-49
|
||||||
|
- For each consecutive pair of periods, record (current_zone → next_zone)
|
||||||
|
- Return: `{zones: ['1-10','11-20','21-30','31-40','41-49'], matrix: [[count...]], probabilities: [[prob...]], total_transitions: N}`
|
||||||
|
|
||||||
|
2. **Controller** — Add `zoneTransition()` method to `app\admin\controller\History`
|
||||||
|
- Accept `periods` param (default 100, range 10-500)
|
||||||
|
- Add to `$noNeedRight` list
|
||||||
|
- Call model method, return JSON response
|
||||||
|
|
||||||
|
3. **Dashboard** — Include `zoneTransition` in `getDashboardData()` response
|
||||||
|
|
||||||
|
4. **Frontend JS** — Add zone transition heatmap/table in `public/assets/js/backend/dashboard.js`
|
||||||
|
- Render as a 5×5 matrix table with color-coded cells showing count and percentage
|
||||||
|
- Append below existing heatmap section
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
status: complete
|
||||||
|
---
|
||||||
|
# Quick Task 260425-w2i Summary
|
||||||
|
|
||||||
|
## Description
|
||||||
|
在控制台页面新增区域转移概率统计功能:将1-49数字分为5个区域(每10个数一个区域),统计每一区域出现特码后下一期出现特码的区域概率。
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
- `application/admin/model/History.php` — 新增 `getZoneTransition($periods)` 方法,返回5×5转移矩阵和概率
|
||||||
|
- `application/admin/controller/History.php` — 新增 `zoneTransition()` AJAX接口,加入 `$noNeedRight`
|
||||||
|
- `application/admin/model/History.php` — `getDashboardData()` 增加 `zonetransition` 字段
|
||||||
|
- `public/assets/js/backend/dashboard.js` — 渲染区域转移概率彩色表格
|
||||||
|
|
||||||
|
## Commits
|
||||||
|
- `28415a1` feat(dashboard): 添加区域转移概率统计功能
|
||||||
|
- `6df33a6` docs(state): 记录区域转移概率统计 quick task 完成
|
||||||
Reference in New Issue
Block a user