
一个现代化的双色球数据展示系统,支持历史开奖数据查看和多模型 AI 预测展示。
# 进入项目目录
cd Double-Color-Ball-AI
# 运行启动脚本
./start_server.sh
# 双击运行 start_server.bat
# 或在命令行中运行
start_server.bat
然后在浏览器中打开:http://localhost:8000
# 使用 Python 启动 HTTP 服务器
python3 -m http.server 8000
# 或使用 Python 2
python -m SimpleHTTPServer 8000
然后在浏览器中打开:http://localhost:8000
每个 AI 模型会生成 5 组预测,分别采用不同策略:
| 策略 | 说明 |
|---|---|
| 热号追随者 | 选择最近 30 期高频号码,追踪热门趋势 |
| 冷号逆向者 | 选择最近 30 期低频号码,期待均值回归 |
| 平衡策略师 | 综合奇偶比、大小比、和值、连号等多维度平衡 |
| 周期理论家 | 选择短期频率上穿长期频率的号码 |
| 综合决策者 | 融合以上所有策略的综合方案 |
Double-Color-Ball-AI/
├── index.html # 主页面
├── css/
│ └── style.css # 样式文件
├── js/
│ ├── app.js # 主应用逻辑
│ ├── data-loader.js # 数据加载模块
│ └── components.js # UI 组件
├── data/
│ ├── lottery_history.json # 历史开奖数据
│ └── ai_predictions.json # AI 预测数据
├── fetch_history/
│ ├── fetch_lottery_history.py # 数据爬取脚本
│ └── lottery_data.json # 原始爬取数据
├── doc/
│ └── prompt.md # AI 预测 Prompt 模板
├── generate_ai_prediction.py # 🆕 AI 预测自动生成脚本
├── add_gpt5_prediction.py # 辅助脚本:添加历史预测
├── start_server.sh # 启动脚本 (macOS/Linux)
├── start_server.bat # 启动脚本 (Windows)
├── AI_PREDICTION_GUIDE.md # 🆕 AI 预测自动化指南
└── README.md # 项目说明
cd fetch_history
python3 fetch_lottery_history.py
脚本会:
data/lottery_history.json一键生成多模型预测:
python3 generate_ai_prediction.py
脚本功能:
首次使用需配置 API:
pip install openai
export AI_API_KEY="your-api-key"
export AI_BASE_URL="https://your-api-endpoint.com/v1" # 可选,有默认值
或创建 .env 文件(参考 .env.example)。
AI_API_KEY — 你的 API KeyAI_BASE_URL — API 端点地址(可选)如果需要手动编辑,可以直接修改 data/ai_predictions.json 文件,格式如下:
{
"prediction_date": "2025-10-21",
"target_period": "25121",
"models": [
{
"model_id": "model-id",
"model_name": "模型名称",
"predictions": [
{
"group_id": 1,
"strategy": "策略名称",
"red_balls": ["01", "02", "03", "04", "05", "06"],
"blue_ball": "07",
"description": "策略描述"
}
]
}
]
}
点击右上角的主题切换按钮(太阳/月亮图标)可以在亮色和暗色主题之间切换。主题偏好会自动保存到浏览器本地存储。
{
"last_updated": "2025-10-21T10:00:00Z",
"data": [
{
"period": "25120",
"date": "2025-10-19",
"red_balls": ["01", "02", "04", "07", "13", "32"],
"blue_ball": "07"
}
]
}
{
"prediction_date": "2025-10-21",
"target_period": "25121",
"models": [...]
}
浏览器安全限制:
index.html 打开(会遇到 CORS 错误)这是因为浏览器的同源策略限制,使用 file:// 协议无法加载本地 JSON 文件。
本网站展示的 AI 预测数据仅供参考和研究使用,不构成任何购彩建议。彩票开奖结果具有随机性,任何预测都无法保证中奖。请理性购彩,量力而行。
本项目已配置好 Vercel 部署,详细步骤请查看 DEPLOYMENT.md
npm install -g vercelvercel loginvercel不会有跨域问题! Vercel 提供标准的 HTTP 服务,所有资源都从同一域名加载。