feat: Add recent performance stability stats (matches/days) to player profile
This commit is contained in:
BIN
database/L3/L3_Features.sqlite
Normal file
BIN
database/L3/L3_Features.sqlite
Normal file
Binary file not shown.
75
database/L3/README.md
Normal file
75
database/L3/README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
## basic、个人基础数据特征
|
||||
1. 平均Rating(每局)
|
||||
2. 平均KD值(每局)
|
||||
3. 平均KAST(每局)
|
||||
4. 平均RWS(每局)
|
||||
5. 每局爆头击杀数
|
||||
6. 爆头率(爆头击杀/总击杀)
|
||||
7. 每局首杀次数
|
||||
8. 每局首死次数
|
||||
9. 首杀率(首杀次数/首遇交火次数)
|
||||
10. 首死率(首死次数/首遇交火次数)
|
||||
11. 每局2+杀/3+杀/4+杀/5杀次数(多杀)
|
||||
12. 连续击杀累计次数(连杀)
|
||||
15. **(New) 助攻次数 (assisted_kill)**
|
||||
16. **(New) 无伤击杀 (perfect_kill)**
|
||||
17. **(New) 复仇击杀 (revenge_kill)**
|
||||
18. **(New) AWP击杀数 (awp_kill)**
|
||||
19. **(New) 总跳跃次数 (jump_count)**
|
||||
|
||||
---
|
||||
|
||||
## 挖掘能力维度:
|
||||
### 1、时间稳定序列特征 STA
|
||||
1. 近30局平均Rating(长期Rating)
|
||||
2. 胜局平均Rating
|
||||
3. 败局平均Rating
|
||||
4. Rating波动系数(近10局Rating计算)
|
||||
5. 同一天内比赛时长与Rating相关性(每2小时Rating变化率)
|
||||
6. 连续比赛局数与表现衰减率(如第5局后vs前4局的KD变化)
|
||||
|
||||
### 2、局内对抗能力特征 BAT
|
||||
1. 对位最高Rating对手的KD差(自身击杀-被该对手击杀)
|
||||
2. 对位最低Rating对手的KD差(自身击杀-被该对手击杀)
|
||||
3. 对位所有对手的胜率(自身击杀>被击杀的对手占比)
|
||||
4. 平均对枪成功率(对所有对手的对枪成功率求平均)
|
||||
|
||||
* ~~A. 对枪反应时间(遇敌到开火平均时长,需录像解析)~~ (Phase 5)
|
||||
* B. 近/中/远距对枪占比及各自胜率 (仅 Classic 可行)
|
||||
|
||||
|
||||
### 3、高压场景表现特征 HPS (High Pressure Scenario)
|
||||
1. 1v1/1v2/1v3+残局胜率
|
||||
2. 赛点(12-12、12-11等)残局胜率
|
||||
3. 人数劣势时的平均存活时间/击杀数(少打多能力)
|
||||
4. 队伍连续丢3+局后自身首杀率(压力下突破能力)
|
||||
5. 队伍连续赢3+局后自身2+杀率(顺境多杀能力)
|
||||
6. 受挫后状态下滑率(被刀/被虐泉后3回合内Rating下降值)
|
||||
7. 起势后状态提升率(关键残局/多杀后3回合内Rating上升值)
|
||||
8. 翻盘阶段KD提升值(同上场景下,自身KD与平均差值)
|
||||
9. 连续丢分抗压性(连续丢4+局时,自身KD与平均差值)
|
||||
|
||||
### 4、手枪局专项特征 PTL (Pistol Round)
|
||||
1. 手枪局首杀次数
|
||||
2. 手枪局2+杀次数(多杀)
|
||||
3. 手枪局连杀次数
|
||||
4. 参与的手枪局胜率(round1 round13)
|
||||
5. 手枪类武器KD
|
||||
6. 手枪局道具使用效率(烟雾/闪光帮助队友击杀数/投掷次数)
|
||||
|
||||
### 5、阵营倾向(T/CT)特征 T/CT
|
||||
1. CT方平均Rating
|
||||
2. T方平均Rating
|
||||
3. CT方首杀率
|
||||
4. T方首杀率
|
||||
5. CT方守点成功率(负责区域未被突破的回合占比)
|
||||
6. T方突破成功率(成功突破敌方首道防线的回合占比)
|
||||
7. CT/T方KD差值(CT KD - T KD)
|
||||
8. **(New) 下包次数 (planted_bomb)**
|
||||
9. **(New) 拆包次数 (defused_bomb)**
|
||||
|
||||
### 6、道具特征 UTIL
|
||||
1. 手雷伤害 (`throw_harm`)
|
||||
2. 闪光致盲时间 (`flash_time`, `flash_enemy_time`, `flash_team_time`)
|
||||
3. 闪光致盲人数 (`flash_enemy`, `flash_team`)
|
||||
4. 每局平均道具数量与使用率(烟雾、闪光、燃烧弹、手雷)
|
||||
251
database/L3/schema.sql
Normal file
251
database/L3/schema.sql
Normal file
@@ -0,0 +1,251 @@
|
||||
|
||||
-- L3 Schema: Player Features Data Mart
|
||||
-- Based on FeatureRDD.md
|
||||
-- Granularity: One row per player (Aggregated Profile)
|
||||
-- Note: Some features requiring complex Demo parsing (Phase 5) are omitted or reserved.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS dm_player_features (
|
||||
steam_id_64 TEXT PRIMARY KEY,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
total_matches INTEGER DEFAULT 0,
|
||||
|
||||
-- ==========================================
|
||||
-- 0. Basic Features (Avg per match)
|
||||
-- ==========================================
|
||||
basic_avg_rating REAL,
|
||||
basic_avg_kd REAL,
|
||||
basic_avg_adr REAL,
|
||||
basic_avg_kast REAL,
|
||||
basic_avg_rws REAL,
|
||||
basic_avg_headshot_kills REAL,
|
||||
basic_headshot_rate REAL, -- Headshot kills / Total kills
|
||||
basic_avg_first_kill REAL,
|
||||
basic_avg_first_death REAL,
|
||||
basic_first_kill_rate REAL, -- FK / (FK + FD) or FK / Opening Duels
|
||||
basic_first_death_rate REAL,
|
||||
basic_avg_kill_2 REAL,
|
||||
basic_avg_kill_3 REAL,
|
||||
basic_avg_kill_4 REAL,
|
||||
basic_avg_kill_5 REAL,
|
||||
basic_avg_assisted_kill REAL,
|
||||
basic_avg_perfect_kill REAL,
|
||||
basic_avg_revenge_kill REAL,
|
||||
basic_avg_awp_kill REAL,
|
||||
basic_avg_jump_count REAL,
|
||||
basic_avg_knife_kill REAL,
|
||||
basic_avg_zeus_kill REAL,
|
||||
basic_zeus_pick_rate REAL,
|
||||
basic_avg_mvps REAL,
|
||||
basic_avg_plants REAL,
|
||||
basic_avg_defuses REAL,
|
||||
basic_avg_flash_assists REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 1. STA: Stability & Time Series
|
||||
-- ==========================================
|
||||
sta_last_30_rating REAL,
|
||||
sta_win_rating REAL,
|
||||
sta_loss_rating REAL,
|
||||
sta_rating_volatility REAL, -- StdDev of last 10 ratings
|
||||
sta_time_rating_corr REAL, -- Correlation between match duration/time and rating
|
||||
sta_fatigue_decay REAL, -- Perf drop in later matches of same day
|
||||
|
||||
-- ==========================================
|
||||
-- 2. BAT: Battle / Duel Capabilities
|
||||
-- ==========================================
|
||||
bat_kd_diff_high_elo REAL,
|
||||
bat_kd_diff_low_elo REAL,
|
||||
-- bat_win_rate_vs_all REAL, -- Removed
|
||||
bat_avg_duel_win_rate REAL,
|
||||
bat_avg_duel_freq REAL,
|
||||
-- Distance based stats (Placeholder for Classic data)
|
||||
bat_win_rate_close REAL,
|
||||
bat_win_rate_mid REAL,
|
||||
bat_win_rate_far REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 3. HPS: High Pressure Scenarios
|
||||
-- ==========================================
|
||||
hps_clutch_win_rate_1v1 REAL,
|
||||
hps_clutch_win_rate_1v2 REAL,
|
||||
hps_clutch_win_rate_1v3_plus REAL,
|
||||
hps_match_point_win_rate REAL,
|
||||
hps_undermanned_survival_time REAL,
|
||||
hps_pressure_entry_rate REAL, -- FK rate when team losing streak
|
||||
hps_momentum_multikill_rate REAL, -- Multi-kill rate when team winning streak
|
||||
hps_tilt_rating_drop REAL, -- Rating drop after getting knifed/BM'd
|
||||
hps_clutch_rating_rise REAL, -- Rating rise after clutch
|
||||
hps_comeback_kd_diff REAL,
|
||||
hps_losing_streak_kd_diff REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 4. PTL: Pistol Round Specialist
|
||||
-- ==========================================
|
||||
ptl_pistol_kills REAL, -- Avg per pistol round? Or Total? Usually Avg per match or Rate
|
||||
ptl_pistol_multikills REAL,
|
||||
ptl_pistol_win_rate REAL, -- Personal win rate in pistol rounds
|
||||
ptl_pistol_kd REAL,
|
||||
ptl_pistol_util_efficiency REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 5. T/CT: Side Preference
|
||||
-- ==========================================
|
||||
side_rating_ct REAL, -- Currently calculated as K/D
|
||||
side_rating_t REAL,
|
||||
side_kd_ct REAL, -- Explicit K/D
|
||||
side_kd_t REAL,
|
||||
side_win_rate_ct REAL, -- Round Win %
|
||||
side_win_rate_t REAL,
|
||||
side_first_kill_rate_ct REAL,
|
||||
side_first_kill_rate_t REAL,
|
||||
side_kd_diff_ct_t REAL, -- CT KD - T KD
|
||||
|
||||
-- New Side Comparisons
|
||||
side_rating_diff_ct_t REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 6. Party Size Performance
|
||||
-- ==========================================
|
||||
party_1_win_rate REAL,
|
||||
party_1_rating REAL,
|
||||
party_1_adr REAL,
|
||||
|
||||
party_2_win_rate REAL,
|
||||
party_2_rating REAL,
|
||||
party_2_adr REAL,
|
||||
|
||||
party_3_win_rate REAL,
|
||||
party_3_rating REAL,
|
||||
party_3_adr REAL,
|
||||
|
||||
party_4_win_rate REAL,
|
||||
party_4_rating REAL,
|
||||
party_4_adr REAL,
|
||||
|
||||
party_5_win_rate REAL,
|
||||
party_5_rating REAL,
|
||||
party_5_adr REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 7. Rating Distribution (Performance Tiers)
|
||||
-- ==========================================
|
||||
rating_dist_carry_rate REAL, -- > 1.5
|
||||
rating_dist_normal_rate REAL, -- 1.0 - 1.5
|
||||
rating_dist_sacrifice_rate REAL, -- 0.6 - 1.0
|
||||
rating_dist_sleeping_rate REAL, -- < 0.6
|
||||
|
||||
-- ==========================================
|
||||
-- 8. ELO Stratification (Performance vs ELO)
|
||||
-- ==========================================
|
||||
elo_lt1200_rating REAL,
|
||||
elo_1200_1400_rating REAL,
|
||||
elo_1400_1600_rating REAL,
|
||||
elo_1600_1800_rating REAL,
|
||||
elo_1800_2000_rating REAL,
|
||||
elo_gt2000_rating REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 9. More Side Stats (Restored)
|
||||
-- ==========================================
|
||||
side_kast_ct REAL,
|
||||
side_kast_t REAL,
|
||||
side_rws_ct REAL,
|
||||
side_rws_t REAL,
|
||||
side_first_death_rate_ct REAL,
|
||||
side_first_death_rate_t REAL,
|
||||
side_multikill_rate_ct REAL,
|
||||
side_multikill_rate_t REAL,
|
||||
side_headshot_rate_ct REAL,
|
||||
side_headshot_rate_t REAL,
|
||||
side_defuses_ct REAL,
|
||||
side_plants_t REAL,
|
||||
side_planted_bomb_count INTEGER,
|
||||
side_defused_bomb_count INTEGER,
|
||||
|
||||
-- ==========================================
|
||||
-- 6. UTIL: Utility Usage
|
||||
-- ==========================================
|
||||
util_avg_nade_dmg REAL,
|
||||
util_avg_flash_time REAL,
|
||||
util_avg_flash_enemy REAL,
|
||||
util_avg_flash_team REAL,
|
||||
util_usage_rate REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 7. Scores (0-100)
|
||||
-- ==========================================
|
||||
score_bat REAL,
|
||||
score_sta REAL,
|
||||
score_hps REAL,
|
||||
score_ptl REAL,
|
||||
score_tct REAL,
|
||||
score_util REAL,
|
||||
score_eco REAL,
|
||||
score_pace REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 8. ECO: Economy Efficiency
|
||||
-- ==========================================
|
||||
eco_avg_damage_per_1k REAL,
|
||||
eco_rating_eco_rounds REAL,
|
||||
eco_kd_ratio REAL,
|
||||
eco_avg_rounds REAL,
|
||||
|
||||
-- ==========================================
|
||||
-- 9. PACE: Aggression & Trade
|
||||
-- ==========================================
|
||||
pace_avg_time_to_first_contact REAL,
|
||||
pace_trade_kill_rate REAL,
|
||||
pace_opening_kill_time REAL,
|
||||
pace_avg_life_time REAL,
|
||||
rd_phase_kill_early_share REAL,
|
||||
rd_phase_kill_mid_share REAL,
|
||||
rd_phase_kill_late_share REAL,
|
||||
rd_phase_death_early_share REAL,
|
||||
rd_phase_death_mid_share REAL,
|
||||
rd_phase_death_late_share REAL,
|
||||
rd_phase_kill_early_share_t REAL,
|
||||
rd_phase_kill_mid_share_t REAL,
|
||||
rd_phase_kill_late_share_t REAL,
|
||||
rd_phase_kill_early_share_ct REAL,
|
||||
rd_phase_kill_mid_share_ct REAL,
|
||||
rd_phase_kill_late_share_ct REAL,
|
||||
rd_phase_death_early_share_t REAL,
|
||||
rd_phase_death_mid_share_t REAL,
|
||||
rd_phase_death_late_share_t REAL,
|
||||
rd_phase_death_early_share_ct REAL,
|
||||
rd_phase_death_mid_share_ct REAL,
|
||||
rd_phase_death_late_share_ct REAL,
|
||||
rd_firstdeath_team_first_death_rounds INTEGER,
|
||||
rd_firstdeath_team_first_death_win_rate REAL,
|
||||
rd_invalid_death_rounds INTEGER,
|
||||
rd_invalid_death_rate REAL,
|
||||
rd_pressure_kpr_ratio REAL,
|
||||
rd_pressure_perf_ratio REAL,
|
||||
rd_pressure_rounds_down3 INTEGER,
|
||||
rd_pressure_rounds_normal INTEGER,
|
||||
rd_matchpoint_kpr_ratio REAL,
|
||||
rd_matchpoint_perf_ratio REAL,
|
||||
rd_matchpoint_rounds INTEGER,
|
||||
rd_comeback_kill_share REAL,
|
||||
rd_comeback_rounds INTEGER,
|
||||
rd_trade_response_10s_rate REAL,
|
||||
rd_weapon_top_json TEXT,
|
||||
rd_roundtype_split_json TEXT,
|
||||
map_stability_coef REAL
|
||||
);
|
||||
|
||||
-- Optional: Detailed per-match feature table for time-series analysis
|
||||
CREATE TABLE IF NOT EXISTS fact_match_features (
|
||||
match_id TEXT,
|
||||
steam_id_64 TEXT,
|
||||
|
||||
-- Snapshots of the 6 dimensions for this specific match
|
||||
basic_rating REAL,
|
||||
sta_trend_pre_match REAL, -- Rating trend entering this match
|
||||
bat_duel_win_rate REAL,
|
||||
hps_clutch_success INTEGER,
|
||||
ptl_performance_score REAL,
|
||||
|
||||
PRIMARY KEY (match_id, steam_id_64)
|
||||
);
|
||||
Reference in New Issue
Block a user