最近在跟一些圈内朋友聊天,发现每个人都有一套自己的玩球逻辑,比如有些人看亚盘,有些看欧盘,有些玩绝杀,有些看盘口,是否可以自定义的去玩球?结合多年的经验,把分析的过程大概写了一下。
数据爬取
采集汇聚全球各大足球赛事的即时比赛数据。从进球瞬间到红黄牌警告,每一刻赛场动态都捕捉
采用先进的数据清洗与校验技术,确保每一条即时比赛数据都精准无误。
无论是球队控球率、射门次数还是传球成功率,力求做到分秒不差。
获取实时滚球数据
这里简单用python爬取某站的滚球数据
t = int(time.time() * 1000)
liveUrl = "https://xxx.com/"
# 全天比赛信息
match_url = liveUrl + "/xxxx" + str(t)
response = requests.get(match_url, headers=headers)
match_content = ''
# print('---正在获取比赛信息---')
if response.status_code == 200:
match_content = response.content.decode('utf-8')
print(response.text)
print(match_content)
if response.status_code != 200:
print('---赔率获取结果异常---', response.status_code)
数据清洗
这里简单的计算球队的elo,将多余数据简化
"""
计算elo
:param match:
:param elo_cache:
:param info:
:return:
"""
home_id = match['home_id']
away_id = match['away_id']
match_res = match['sfp_res']
if home_id in elo_cache.keys():
home_info = elo_cache[home_id]
home_po = home_info['new_elo']
else:
home_po = 2000
home_info = {
"old_elo": 0,
"new_elo": home_po,
}
if away_id in elo_cache.keys():
away_info = elo_cache[away_id]
away_po = away_info['new_elo']
else:
away_po = 2000
away_info = {
"old_elo": 0,
"new_elo": away_po,
}
home_pn = get_pn(home_po, away_po, HOME_MATCH_RES_ELO[match_res])
away_pn = get_pn(away_po, home_po, AWAY_MATCH_RES_ELO[match_res])
home_info['old_elo'] = home_po
home_info['new_elo'] = home_pn
away_info['old_elo'] = away_pn
away_info['new_elo'] = away_po
elo_cache[home_id] = home_info
elo_cache[away_id] = away_info
home_team_info = {f"home_{key}": val for key, val in home_info.items()}
info.update(home_team_info)
home_team_info = {f"away_{key}": val for key, val in away_info.items()}
info.update(home_team_info)
清洗之后的数据显示
自定义条件设置
比如说:如果即时盘中未进球(70分钟前),降盘1个球以上,选大球,赔率大于1.9
想要拆选这种数据,那么先写个SQL验证一下
select *From fb_roll where mins<=70
and daGA1>=0.9
and overallGoals=0
and (daDbCA2-daDbGA2)>=1
得到结果
分析结果
需要对这一结果进行历史验证
看了一下,57%的胜率,勉强能盈利,完结撒花!!!
select *From fb_roll_his where mins<=70
and daGA1>=0.9
and overallGoals=0
and (daDbCA2-daDbGA2)>=1
写到最后,推荐一款基于大模型+条件预测的平台,有兴趣可以了解一下:http://lcsjfx.com/web/sjfxpt.html