README.md 7.4 KB
Newer Older
S
shi.zeyuan 已提交
1
## ‍🚀 AI足球大数据爬虫分析预测一体化项目(golang)
S
1.xxx  
shi.zeyuan 已提交
2

S
shi.zeyuan 已提交
3
## 📝 项目地址
M
monomania 已提交
4
* [https://gitee.com/aoe5188/foot](https://gitee.com/aoe5188/foot)
S
shi.zeyuan 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
***

![](https://img.shields.io/badge/build-go1.13.4-yeoll?style=for-the-badge&logo=appveyor)
![](https://img.shields.io/badge/build-python3.7-yellow?style=for-the-badge&logo=appveyor)
![](https://img.shields.io/badge/database-mysql5.7.28-red?style=for-the-badge&logo=appveyor)
![](https://img.shields.io/badge/ide-goland2018-blue?style=for-the-badge&logo=appveyor)
![](https://img.shields.io/badge/status-dev-green?style=for-the-badge&logo=appveyor)
***

## 🎉 项目简介 
> + ✂ 💉 ⚙ 🔨 📐 ☁ 📊 📦 📚 🌐 📈 📞
> + 👊 foot-parent 是一个集足球数据采集器,简单分析的项目.
> + 👍 程序采用golang开发,项目模块化结构清晰完整,非常容易入手并进行二次开发分析.
> + ⚙ AI球探为程序全自动处理,全程无人为参与干预足球分析预测程序.
> + ⚡️ 避免了人为分析的主观性及不稳定因素.
> + ✨ 程序根据各大指数多维度数据,结合作者多年足球分析经验,精雕细琢,
    集天地之灵气,汲日月之精华,历时七七四十九天,经Bug九九八十一个,编码而成.
> + 🎯 程序执行流程包括且不仅限于(数据自动获取-->分析学习-->自动推送发布).  
> + 😎 经近三个月的实验准确率一直能维持在一个较高的水平.
> + ☕ 同时也是一个学习golang的一个入门级项目.
***

## 🌰 项目来由
S
1.xxx  
shi.zeyuan 已提交
28 29 30 31 32
```
热衷于足球多年,之余也会去研究一下,时间久了,都会有自己的心得.
但不可能每次都那么费劲的自己人工去看盘分析,
所以结合所学,就有这个项目.
```
S
shi.zeyuan 已提交
33
***
S
1.xxx  
shi.zeyuan 已提交
34

S
shi.zeyuan 已提交
35 36 37 38
## 😎 如该项目对你有帮助,请给一个👉 star,谢谢!
## 😎 如该项目对你有帮助,请给一个👉 star,谢谢!
## 😎 如该项目对你有帮助,请给一个👉 star,谢谢!
***
S
1.xxx  
shi.zeyuan 已提交
39

S
shi.zeyuan 已提交
40
## 🙋‍ 公众号演示
S
1.xx  
shi.zeyuan 已提交
41
 * 公众号: AI球探(ai00268)
S
shi.zeyuan 已提交
42 43
 ![](https://oscimg.oschina.net/oscnet/up-e1c184e44f8f98c962274667d01f9670639.JPEG "go mod")
***
S
1.xx  
shi.zeyuan 已提交
44

S
shi.zeyuan 已提交
45
## 👏 目前程序已经完成了对很多足球相关数据的收集,包括且不仅限于:
S
1.xxx  
shi.zeyuan 已提交
46 47 48 49 50 51
* 所有的联赛信息,
* 球队信息,
* 今日比赛列表,
* 自动更新比赛结果,
* 所有亚指的数据,
* 所有的亚指的变化数据,
S
shi.zeyuan 已提交
52 53
* 所有的欧指数据,(可配置)
* 所有的欧指数据的变化过程(可配置),
S
1.xxx  
shi.zeyuan 已提交
54 55 56 57
* 对阵双方的积分榜收集,
* 对阵双方的对战历史,
* 对阵双方的近30场战绩,
* 对阵双方的未来三场赛事.
S
shi.zeyuan 已提交
58 59 60 61
* 必发交易量
* 大小球指数数据
* 大小球指数数据的变化数据
***
S
1.xxx  
shi.zeyuan 已提交
62

S
shi.zeyuan 已提交
63
## 🌰 技术选型
M
monomania 已提交
64 65 66
* [xorm](https://github.com/go-xorm/xorm)
* [go_spider](https://github.com/hu17889/go_spider)
* [beego](https://github.com/astaxie/beego)
M
monomania 已提交
67
* [walk](https://github.com/lxn/walk)
M
monomania 已提交
68
* [go版wechat sdk](https://github.com/chanxuehong/wechat)
S
shi.zeyuan 已提交
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
***


## 🌰 模块依赖
  
  | 模块名    |  依赖模块     |  说明     |
  |:----:    | :----:   |:----   |
  | foot-api      |无| 存放各载体struct|
  | foot-core    |foot-api| 提供CRUD能力逻辑处理|
  | foot-gui     |foot-core| windows桌面控制| 
  | foot-spider  |foot-core|爬虫数据源|
  | foot-web     |暂无| 可能会用于提供API|
***

## 🌰 使用教程
M
monomania 已提交
84

S
shi.zeyuan 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
* 配置环境
  * 安装 go
    * 配置GOPATH
  * 环境变量
    
  | 变量名称=值    |  说明     |
  | --------    | :----:   |
  | GO111MODULE=on  |开启go mod模块支持|
  | GOPROXY=https://goproxy.cn,direct     |依赖包下载代理地址|
  | GOSUMDB=sum.golang.google.cn     |包的哈希值校验地址|
  
* 导入项目到[JetBrains GoLand](https://www.jetbrains.com/go/)并启用go mod
  ![](https://oscimg.oschina.net/oscnet/265bf76794ead3bac4c19a38dc4dbbe8bbb.png "go mod")
  * 或可手动下载资源包
    ```
      cd ./foot-api && go mod tidy
      cd ../foot-core && go mod tidy
      cd ../foot-gui && go mod tidy
      cd ../foot-spider && go mod tidy
      cd ../foot-web && go mod tidy
    ```
* 手动创建数据库
  
  数据库名为: foot 
* 配置数据库连接
  * conf文件修改配置
    * ./conf/app.ini
     ~~~
     详情看配置文件内的说明
     ~~~
* 同步数据库表
     * FC001DBInit.go 
      
## 🌰 主要入口
  *  build_linux.bat            一键打包linux发布程序
  *  build_windows.bat          一键打包windows发布程序
  *  FC000.go                   运行beego
  *  FC001DBInit.go             数据库表同步初始化
  *  FC002Analy.go              运行结果分析    
  *  FOOT000.go                 linux入口(主要使用)
  *  FOOT000Cmd.go              windows入口(主要使用)
  *  FS000.go                   运行数据爬虫
S
1.xx  
shi.zeyuan 已提交
127

S
shi.zeyuan 已提交
128 129 130 131 132 133 134 135 136 137
## 🌰 本地调试运行
~~~
1. 创建数据库foot
2. FC001DBInit.go  同步数据库表
3. FS000.go 运行数据爬虫
4. FC002Analy.go 分析得出推荐列表
~~~
## 🌰打包部署
~~~
1.运行build_linux.bat 进行打包
S
shi.zeyuan 已提交
138
2.FOOT000 spider        启动
S
shi.zeyuan 已提交
139 140 141 142
~~~
***

## 🌰 项目结构
M
monomania 已提交
143
~~~
S
1.xxx  
shi.zeyuan 已提交
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
|-- assets 素材文件夹
|   |-- common
|   |   `-- template
|   |       `-- analycontent 主要用于生成推荐文字说明内容
|   |-- leisu
|   |   `-- html 
|   `-- wechat
|       |-- html  发布公众号使用到的素材html
|       `-- img   发布公众号使用到的素材图片
|-- bin     一键打包的存放目录
|   |-- assets
|   |   |-- common
|   |   |   `-- template
|   |   |       `-- analycontent
|   |   |-- leisu
|   |   |   `-- html
|   |   `-- wechat
|   |       |-- html
|   |       `-- img
|   `-- conf
|-- conf    配置文件夹
|-- foot-api  实体类项目,用于存放模块的载体类
|   |-- common
|   |   `-- base
|   |       `-- pojo
|   `-- module
|       |-- analy
|       |   |-- pojo
|       |   `-- vo
|       |-- core
|       |   `-- pojo
|       |-- elem
|       |   `-- pojo
|       |-- match
|       |   `-- pojo
|       |-- odds
|       |   `-- pojo
|       `-- suggest
|           |-- enums
|           |-- pojo
|           `-- vo
|-- foot-core  核心库,用于提供数据库CRUD的功能,及对接第三方网络的功能
|   |-- common 通用库
|   |   |-- base 
|   |   |   |-- controller
|   |   |   `-- service
|   |   |       `-- mysql
|   |   |-- fliters
|   |   |-- routers
|   |   `-- utils
|   |-- launch
|   |-- module
|   |   |-- analy  分析模型模块
|   |   |   |-- constants
|   |   |   `-- service
|   |   |-- check
|   |   |   `-- sql
|   |   |-- core
|   |   |   `-- service
|   |   |-- elem
|   |   |   `-- service
|   |   |-- index
|   |   |   `-- controller
|   |   |-- leisu
|   |   |   |-- constants
|   |   |   |-- controller
|   |   |   |-- service
|   |   |   |-- utils
|   |   |   `-- vo
|   |   |-- match 提供赛事的相关数据库操作
|   |   |   |-- controller
|   |   |   `-- service
|   |   |-- odds  提供指数的相关数据库操作
|   |   |   `-- service
|   |   |-- spider
|   |   |   `-- constants
|   |   |-- suggest  用于获取推荐的比赛列表
|   |   |   `-- service
|   |   |-- tesou  无用
|   |   |   |-- constants
|   |   |   |-- service
|   |   |   |-- utils
|   |   |   `-- vo
|   |   `-- wechat  微信发布相关
|   |       |-- constants
|   |       |-- controller
|   |       `-- service
|   `-- test
|       `-- bson
|-- foot-gui
|   `-- handler
|-- foot-robot
|   `-- helper
|-- foot-spider 足球相关赛事指数数据的爬虫模块
|   |-- common
|   |   `-- base
|   |       `-- down
|   |-- launch
|   `-- module
|       `-- win007
|           |-- down
|           |-- proc
|           `-- vo
|-- foot-web
`-- logs

S
shi.zeyuan 已提交
250
~~~