README.md 10.6 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
***

![](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)
***

## 🎉 项目简介 
S
shi.zeyuan 已提交
15 16 17 18
> + 🌹🍀🍎💰📱🌙🍁🍂🍃🌷💎🔪🔫🏀⚽⚡👄👍🔥
> + 😀😁😂😃😄😅😆😉😊😋😎😍😘😗😙😚☺😇😐😑😶😏😣😥😮😯😪😫😴😌😛😜😝😒😓😔😕😲😷😖😞😟😤😢😭😦😧😨😬😰😱😳😵😡😠😈👿👹👺💀👻👽👦👧👨👩👴👵👶👱👮👲👳👷👸💂🎅👰👼💆💇🙍🙎🙅🙆💁🙋🙇🙌🙏👤👥🚶🏃👯💃👫👬👭💏💑👪💪👈👉☝👆👇✌✋👌👍👎✊👊👋👏👐✍👣👀👂👃👅👄💋👓👔👕👖👗👘👙👚👛👜👝🎒💼👞👟👠👡👢👑👒🎩🎓💄💅💍🌂
> + 🙈🙉🙊🐵🐒🐶🐕🐩🐺🐱😺😸😹😻😼😽🙀😿😾🐈🐯🐅🐆🐴🐎🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🐭🐁🐀🐹🐰🐇🐻🐨🐼🐾🐔🐓🐣🐤🐥🐦🐧🐸🐊🐢🐍🐲🐉🐳🐋🐬🐟🐠🐡🐙🐚🐌🐛🐜🐝🐞🦋💐🌸💮🌹🌺🌻🌼🌷🌱🌲🌳🌴🌵🌾🌿🍀🍁🍂🍃🌍🌎🌏🌐🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜☀🌝🌞⭐🌟🌠☁⛅☔⚡❄🔥💧🌊💩🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🍆🌽🍄🌰🍞🍖🍗🍔🍟🍕🍳🍲🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼☕🍵🍶🍷🍸🍹🍺🍻🍴
> + 🎪🎭🎨🎰🚣🛀🎫🏆⚽⚾🏀🏈🏉🎾🎱🎳⛳🎣🎽🎿🏂🏄🏇🏊🚴🚵🎯🎮🎲🎷🎸🎺🎻🎬👾🌋🗻🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽⛪⛲🌁🌃🌆🌇🌉🌌🎠🎡🎢🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚏🚐🚑🚒🚓🚔🚕🚖🚗🚘🚚🚛🚜🚲⛽🚨🚥🚦🚧⚓⛵🚤🚢✈💺🚁🚟🚠🚡🚀🎑🗿🛂🛃🛄🛅💌💎🔪💈🚪🚽🚿🛁⌛⏳⌚⏰🎈🎉🎊🎎🎏🎐🎀🎁📯📻📱📲☎📞📟📠🔋🔌💻💽💾💿📀🎥📺📷📹📼🔍🔎🔬🔭📡💡🔦🏮📔📕📖📗📘📙📚📓📃📜📄📰📑🔖💰💴💵💶💷💸💳✉📧📨📩📤📥📦📫📪📬📭📮✏✒📝📁📂📅📆📇📈📉📊📋📌📍📎📏📐✂🔒🔓🔏🔐🔑🔨🔫🔧🔩🔗💉💊🚬🔮🚩🎌💦💨💣☠♠♥♦♣🀄🎴🔇🔈🔉🔊📢📣💤💢💬💭♨🌀🔔🔕✡✝🔯📛🔰🔱⭕✅☑✔✖❌❎➕➖➗➰➿〽✳✴❇‼⁉❓❔❕❗©®™🎦🔅🔆💯🔠🔡🔢🔣🔤🅰🆎🅱🆑🆒🆓ℹ🆔Ⓜ🆕🆖🅾🆗🅿🆘🆙🆚🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▪▫◻◼◽◾⬛⬜🔶🔷🔸🔹🔺🔻💠🔲🔳⚪⚫🔴🔵♈♉♊♋♌♍♎♏♐♑♒♓⛎💘❤💓💔💕💖💗💙💚💛💜💝💞💟❣🌿🚧💒☎📟💽⬆↗➡↘⬇↙⬅↖↕↔↩↪⤴⤵🔃🔄🔙🔚🔛🔜🔝🔀🔁🔂▶⏩◀⏪🔼⏫🔽⏬📱📶📳📴♻🏧🚮🚰♿🚹🚺🚻🚼🚾⚠🚸⛔🚫🚳🚭🚯🚱🚷🔞
S
shi.zeyuan 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31
> + ✂ 💉 ⚙ 🔨 📐 ☁ 📊 📦 📚 🌐 📈 📞
> + 👊 foot-parent 是一个集足球数据采集器,简单分析的项目.
> + 👍 程序采用golang开发,项目模块化结构清晰完整,非常容易入手并进行二次开发分析.
> + ⚙ AI球探为程序全自动处理,全程无人为参与干预足球分析预测程序.
> + ⚡️ 避免了人为分析的主观性及不稳定因素.
> + ✨ 程序根据各大指数多维度数据,结合作者多年足球分析经验,精雕细琢,
    集天地之灵气,汲日月之精华,历时七七四十九天,经Bug九九八十一个,编码而成.
> + 🎯 程序执行流程包括且不仅限于(数据自动获取-->分析学习-->自动推送发布).  
> + 😎 经近三个月的实验准确率一直能维持在一个较高的水平.
> + ☕ 同时也是一个学习golang的一个入门级项目.
***

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

M
monomania 已提交
39 40 41
# 😎 不要都是白瓢啊,请给一个👉 star,谢谢!
# 😎 不要都是白瓢啊,请给一个👉 star,谢谢!
# 😎 不要都是白瓢啊,请给一个👉 star,谢谢!
S
shi.zeyuan 已提交
42
***
S
1.xxx  
shi.zeyuan 已提交
43

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

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

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


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

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

S
shi.zeyuan 已提交
89 90 91 92 93 94 95 96 97 98 99
* 配置环境
  * 安装 go
    * 配置GOPATH
  * 环境变量
    
  | 变量名称=值    |  说明     |
  | --------    | :----:   |
  | GO111MODULE=on  |开启go mod模块支持|
  | GOPROXY=https://goproxy.cn,direct     |依赖包下载代理地址|
  | GOSUMDB=sum.golang.google.cn     |包的哈希值校验地址|
  
M
monomania 已提交
100 101
* 导入项目到[JetBrains GoLand](https://www.jetbrains.com/go/)并启用go mod
  ![](https://oscimg.oschina.net/oscnet/265bf76794ead3bac4c19a38dc4dbbe8bbb.png "go mod")
S
shi.zeyuan 已提交
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 127 128 129 130
  * 或可手动下载资源包
    ```
      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 已提交
131

S
shi.zeyuan 已提交
132 133
## 🌰 本地调试运行
~~~
S
1.xxx  
shi.zeyuan 已提交
134
(有变动需要自行查看源码)
S
shi.zeyuan 已提交
135 136 137 138 139
1. 创建数据库foot
2. FC001DBInit.go  同步数据库表
3. FS000.go 运行数据爬虫
4. FC002Analy.go 分析得出推荐列表
~~~
M
monomania 已提交
140 141 142 143 144 145
## 🌰打包部署
~~~
1.运行build_linux.bat 进行打包
2.FOOT000 spider        启动
~~~
***
S
shi.zeyuan 已提交
146 147

## 🌰 项目结构
M
monomania 已提交
148
~~~
S
1.xxx  
shi.zeyuan 已提交
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 250 251 252 253 254
|-- 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

M
monomania 已提交
255
~~~
S
shi.zeyuan 已提交
256 257 258


## QQ交流群
S
1.xx  
shi.zeyuan 已提交
259
  ![](https://oscimg.oschina.net/oscnet/up-c4deba2ac057219b15429d46ca8eed169e5.png "QQ交流群")