当前位置:首页>python>Python在贷前评分卡中的应用

Python在贷前评分卡中的应用

  • 2026-07-02 16:26:34
Python在贷前评分卡中的应用

在信贷业务中,决策不是靠直觉,而是靠数据说话的精密科学。今天,我将带你揭秘Python如何重塑现代风控评分卡体系。

一、传统评分卡的痛点:为什么需要Python?

1.1 传统方式的局限性

想象一下这样的场景:风控团队用Excel手动处理数十万条客户数据,用SPSS跑逻辑回归,模型更新一次需要两周时间,新的欺诈模式出现时,系统反应迟缓。

这就是传统评分卡开发的真实写照。我曾经参与过一个银行项目,他们的评分卡模型更新周期长达3个月,当市场环境变化时,模型已经严重滞后。

1.2 Python带来的革命性变化

# 传统vs现代的对比traditional_pain_points = {"数据处理""Excel最多处理100万行,且容易崩溃","模型开发""SPSS/SAS需要专门技能,迭代缓慢","实时性""批处理模式,T+1甚至更久","可扩展性""难以处理文本、时序等非结构化数据"}python_advantages = {"数据处理""Pandas可轻松处理千万级数据","模型开发""Scikit-learn一行代码实现复杂算法","实时性""支持在线学习和实时预测","可扩展性""整合深度学习、图计算等先进技术"}

二、Python贷前评分卡开发全流程

2.1 数据准备与探索性分析(EDA)

实战案例:消费金融公司客户数据

import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport seaborn as snsfrom datetime import datetime, timedelta# 模拟生成信贷数据defgenerate_credit_data(n_customers=50000):"""生成模拟信贷数据"""    np.random.seed(2024)# 基础信息    customer_ids = [f'CUST_{i:06d}'for i inrange(n_customers)]    ages = np.random.normal(358, n_customers).astype(int)    ages = np.clip(ages, 2060)# 收入信息(包含异常值)    base_income = np.random.lognormal(10.50.4, n_customers)    income = base_income * 10000# 添加5%的高收入异常值    high_income_mask = np.random.random(n_customers) < 0.05    income[high_income_mask] *= np.random.uniform(310, high_income_mask.sum())# 信用历史    credit_history_months = np.random.exponential(60, n_customers)    credit_history_months = np.clip(credit_history_months, 6240)# 负债信息    debt_to_income = np.random.beta(25, n_customers) * 1.5# 行为数据    credit_inquiries_6m = np.random.poisson(2, n_customers)    avg_utilization = np.random.beta(33, n_customers)# 生成目标变量(违约标签)# 使用复杂的非线性关系    default_prob = (1 / (1 + np.exp(-(            -0.5 * (ages/10) +0.8 * (np.log(income/10000) - 10) +2.5 * debt_to_income**2 -  # 非线性项0.3 * np.sqrt(credit_history_months) +0.4 * credit_inquiries_6m**0.5 +1.2 * avg_utilization**3 +  # 立方项            np.random.normal(00.5, n_customers)        )))    )    default = (default_prob > np.random.uniform(0.150.25, n_customers)).astype(int)# 构建DataFrame    df = pd.DataFrame({'customer_id': customer_ids,'age': ages,'monthly_income': np.round(income, 2),'credit_history_months': credit_history_months.astype(int),'debt_to_income_ratio': np.round(debt_to_income, 3),'recent_inquiries': credit_inquiries_6m,'credit_utilization': np.round(avg_utilization, 3),'has_mortgage': np.random.binomial(10.3, n_customers),'has_auto_loan': np.random.binomial(10.4, n_customers),'employment_years': np.random.exponential(5, n_customers).astype(int),'default': default    })return df# 生成并查看数据credit_data = generate_credit_data()print("数据集概览:")print(f"样本数: {len(credit_data)}")print(f"特征数: {len(credit_data.columns)}")print(f"\n违约率: {credit_data['default'].mean():.2%}")print("\n前5行数据:")print(credit_data.head())

2.2 智能特征工程

案例:创造有业务意义的衍生特征

classFeatureEngineer:"""智能特征工程"""def__init__(self):self.feature_stats = {}defcreate_features(self, df):"""创建衍生特征"""        df_engineered = df.copy()# 1. 收入相关特征        df_engineered['income_level'] = pd.qcut(            df['monthly_income'],             q=5            labels=['很低''较低''中等''较高''很高']        )# 2. 负债压力特征(非线性转换)        df_engineered['debt_pressure'] = np.where(            df['debt_to_income_ratio'] > 0.8,'高压',            np.where(df['debt_to_income_ratio'] > 0.5'中压''低压')        )# 3. 信用历史分段        df_engineered['credit_experience'] = pd.cut(            df['credit_history_months'],            bins=[024601201000],            labels=['新手''成长''成熟''专家']        )# 4. 交叉特征        df_engineered['income_debt_interaction'] = (            df['monthly_income'] * df['debt_to_income_ratio']        )# 5. 时间衰减特征(近期的查询更重要)        df_engineered['weighted_inquiries'] = df['recent_inquiries'] * 1.5# 6. 稳定性特征        df_engineered['stability_score'] = (            np.log1p(df['employment_years']) * 0.3 +            np.log1p(df['credit_history_months']) * 0.7        )# 7. 多项式特征        df_engineered['utilization_squared'] = df['credit_utilization'] ** 2        df_engineered['debt_ratio_cubic'] = df['debt_to_income_ratio'] ** 3return df_engineereddefanalyze_feature_importance(self, df, target='default'):"""特征分析"""from sklearn.feature_selection import mutual_info_classif# 选择数值特征        numeric_cols = df.select_dtypes(include=[np.number]).columns        numeric_cols = [c for c in numeric_cols if c != target]        X = df[numeric_cols].fillna(0)        y = df[target]# 计算互信息        mi_scores = mutual_info_classif(X, y, random_state=42)# 创建特征重要性DataFrame        feature_importance = pd.DataFrame({'feature': numeric_cols,'mutual_info': mi_scores        }).sort_values('mutual_info', ascending=False)return feature_importance# 应用特征工程engineer = FeatureEngineer()credit_data_engineered = engineer.create_features(credit_data)# 分析特征重要性importance_df = engineer.analyze_feature_importance(credit_data_engineered)print("\n特征重要性排序:")print(importance_df.head(10))

2.3 自动化分箱与WOE编码

专业技巧:基于业务约束的最优分箱

from scipy import statsfrom sklearn.preprocessing import KBinsDiscretizerclassIntelligentBinning:"""智能分箱系统"""def__init__(self, n_bins=5, min_bin_size=0.05):self.n_bins = n_binsself.min_bin_size = min_bin_sizeself.bin_edges = {}self.woe_dict = {}self.iv_values = {}defmonotonic_binning(self, X, y, feature_name):"""保证单调性的分箱"""# 1. 初始分箱        discretizer = KBinsDiscretizer(            n_bins=self.n_bins,             encode='ordinal'            strategy='quantile'        )        X_binned = discretizer.fit_transform(X.reshape(-11)).ravel()# 2. 计算每个箱的违约率        df_temp = pd.DataFrame({'feature': X,'bin': X_binned,'target': y        })        bin_stats = df_temp.groupby('bin').agg({'target': ['count''mean'],'feature': ['min''max']        })        bin_stats.columns = ['count''bad_rate''min_val''max_val']# 3. 合并相邻的违约率相近的箱        merged_bins = self._merge_similar_bins(bin_stats)# 4. 确保单调性        final_bins = self._enforce_monotonicity(merged_bins)return final_binsdefcalculate_woe_iv(self, X, y, feature_name, bins):"""计算WOE和IV"""# 将连续变量离散化        X_discrete = np.digitize(X, bins['bin_edge'])# 计算每个箱的统计量        total_good = (y == 0).sum()        total_bad = (y == 1).sum()        woe_map = {}        iv_total = 0for bin_idx inrange(len(bins)):            mask = X_discrete == bin_idxif mask.sum() == 0:continue            good = ((y == 0) & mask).sum()            bad = ((y == 1) & mask).sum()# 计算分布            dist_good = good / total_good if total_good > 0else0.5 / len(y)            dist_bad = bad / total_bad if total_bad > 0else0.5 / len(y)# 计算WOE            woe = np.log((dist_good + 1e-10) / (dist_bad + 1e-10))            woe_map[bin_idx] = woe# 计算IV贡献            iv_contribution = (dist_good - dist_bad) * woe            iv_total += iv_contributionreturn woe_map, iv_totaldeffit(self, df, features, target='default'):"""训练分箱器"""for feature in features:if feature in df.columns and df[feature].dtype in [np.float64, np.int64]:                X = df[feature].values                y = df[target].values# 去除缺失值                mask = ~np.isnan(X)                X_clean = X[mask]                y_clean = y[mask]iflen(X_clean) > 0:# 进行分箱                    bins = self.monotonic_binning(X_clean, y_clean, feature)self.bin_edges[feature] = bins# 计算WOE和IV                    woe_map, iv = self.calculate_woe_iv(X_clean, y_clean, feature, bins)self.woe_dict[feature] = woe_mapself.iv_values[feature] = ivreturnselfdeftransform(self, df, features):"""应用WOE转换"""        df_transformed = df.copy()for feature in features:if feature inself.woe_dict:                X = df[feature].values                bins = self.bin_edges[feature]                X_discrete = np.digitize(X, bins['bin_edge'])# 应用WOE映射                woe_values = np.array([self.woe_dict[feature].get(bin_idx, 0for bin_idx in X_discrete                ])                df_transformed[f'{feature}_woe'] = woe_valuesreturn df_transformed# 应用智能分箱important_features = importance_df['feature'].head(6).tolist()binner = IntelligentBinning(n_bins=6)binner.fit(credit_data_engineered, important_features)# 查看IV值print("\n特征IV值分析:")for feature, iv in binner.iv_values.items():    strength = "强预测力"if iv > 0.3else"中等预测力"if iv > 0.1else"弱预测力"print(f"{feature:25s}: IV={iv:.4f} ({strength})")

2.4 集成学习模型构建

实战:Stacking集成模型

from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifierfrom sklearn.linear_model import LogisticRegressionfrom sklearn.model_selection import StratifiedKFoldfrom sklearn.metrics import roc_auc_score, classification_reportimport lightgbm as lgbimport xgboost as xgbclassStackingScorecard:"""堆叠集成评分卡"""def__init__(self):self.base_models = [            ('rf', RandomForestClassifier(n_estimators=100, random_state=42)),            ('gbdt', GradientBoostingClassifier(n_estimators=100, random_state=42)),            ('lgb', lgb.LGBMClassifier(n_estimators=100, random_state=42)),            ('xgb', xgb.XGBClassifier(n_estimators=100, random_state=42))        ]self.meta_model = LogisticRegression(penalty='l2', C=0.1, max_iter=1000)self.feature_importances = {}deftrain_stacking(self, X, y, n_folds=5):"""训练堆叠模型"""        n_samples = X.shape[0]        n_models = len(self.base_models)# 创建第二层特征矩阵        second_level_train = np.zeros((n_samples, n_models))        skf = StratifiedKFold(n_splits=n_folds, shuffle=True, random_state=42)# 第一层:基模型交叉验证预测for fold_idx, (train_idx, val_idx) inenumerate(skf.split(X, y)):print(f"训练第{fold_idx+1}折...")            X_train, X_val = X[train_idx], X[val_idx]            y_train, y_val = y[train_idx], y[val_idx]for model_idx, (name, model) inenumerate(self.base_models):# 训练基模型                model.fit(X_train, y_train)# 在验证集上预测ifhasattr(model, 'predict_proba'):                    y_pred = model.predict_proba(X_val)[:, 1]else:                    y_pred = model.predict(X_val)                second_level_train[val_idx, model_idx] = y_pred# 记录特征重要性if name notinself.feature_importances:ifhasattr(model, 'feature_importances_'):self.feature_importances[name] = model.feature_importances_# 第二层:元模型训练print("训练元模型...")self.meta_model.fit(second_level_train, y)# 最终模型训练(使用全部数据)self.final_base_models = {}for name, model inself.base_models:            model.fit(X, y)self.final_base_models[name] = modeldefpredict_proba(self, X):"""预测概率"""# 第一层预测        base_predictions = np.zeros((X.shape[0], len(self.base_models)))for idx, (name, model) inenumerate(self.final_base_models.items()):ifhasattr(model, 'predict_proba'):                base_predictions[:, idx] = model.predict_proba(X)[:, 1]else:                base_predictions[:, idx] = model.predict(X)# 第二层预测        final_predictions = self.meta_model.predict_proba(base_predictions)return final_predictionsdefcalculate_score(self, prob, base_score=600, pdo=50):"""计算评分卡分数"""        odds = (1 - prob) / (prob + 1e-10)        score = base_score + pdo * np.log2(odds)return np.clip(score, 300850)# 准备训练数据from sklearn.model_selection import train_test_splitwoe_features = [f'{f}_woe'for f in important_features iff'{f}_woe'in credit_data_transformed.columns]X = credit_data_transformed[woe_features].fillna(0).valuesy = credit_data_transformed['default'].valuesX_train, X_test, y_train, y_test = train_test_split(    X, y, test_size=0.3, random_state=42, stratify=y)# 训练堆叠模型stacking_model = StackingScorecard()stacking_model.train_stacking(X_train, y_train)# 评估模型y_pred_proba = stacking_model.predict_proba(X_test)[:, 1]y_scores = stacking_model.calculate_score(y_pred_proba)auc_score = roc_auc_score(y_test, y_pred_proba)print(f"\n模型性能:")print(f"AUC: {auc_score:.4f}")print(f"测试集平均分: {y_scores.mean():.1f}")

2.5 模型解释与业务应用

SHAP解释性分析

import shapclassModelExplainer:"""模型解释器"""def__init__(self, model, feature_names):self.model = modelself.feature_names = feature_namesself.explainer = Nonedefshap_analysis(self, X, sample_size=1000):"""SHAP值分析"""if sample_size < len(X):            sample_idx = np.random.choice(len(X), sample_size, replace=False)            X_sample = X[sample_idx]else:            X_sample = X# 创建解释器(这里以其中一个基模型为例)self.explainer = shap.TreeExplainer(self.model.final_base_models['lgb'])        shap_values = self.explainer.shap_values(X_sample)# 可视化        plt.figure(figsize=(1510))# 1. 特征重要性总结图        plt.subplot(221)        shap.summary_plot(shap_values, X_sample,                          feature_names=self.feature_names,                         show=False)        plt.title('特征重要性(SHAP值)')# 2. 特征依赖图        plt.subplot(222)        shap.dependence_plot(0, shap_values, X_sample,            feature_names=self.feature_names,            show=False        )# 3. 单个预测解释        plt.subplot(223)        sample_idx = 0# 解释第一个样本        shap.force_plot(self.explainer.expected_value,            shap_values[sample_idx],            X_sample[sample_idx],            feature_names=self.feature_names,            matplotlib=True,            show=False        )        plt.tight_layout()        plt.show()return shap_valuesdefgenerate_business_rules(self, shap_values, X, threshold=0.1):"""生成业务规则"""# 计算平均|SHAP|值        mean_abs_shap = np.abs(shap_values).mean(axis=0)        rules = []for i, (feature, importance) inenumerate(zip(self.feature_names, mean_abs_shap)):if importance > threshold:# 分析特征的影响方向                corr = np.corrcoef(X[:, i], shap_values[:, i])[01]                direction = "正相关"if corr > 0else"负相关"                rules.append({'feature': feature,'importance': importance,'direction': direction,'business_interpretation'self._get_interpretation(feature, direction)                })return pd.DataFrame(rules).sort_values('importance', ascending=False)# 模型解释explainer = ModelExplainer(stacking_model, woe_features)shap_values = explainer.shap_analysis(X_test, sample_size=500)business_rules = explainer.generate_business_rules(shap_values, X_test)print("\n业务规则提取:")print(business_rules[['feature''direction''business_interpretation']].head())

三、生产环境部署方案

3.1 实时评分API

from flask import Flask, request, jsonifyimport pickleimport pandas as pdapp = Flask(__name__)classScoringAPI:"""评分卡API服务"""def__init__(self, model_path='scorecard_model.pkl'):self.model = self.load_model(model_path)self.feature_processor = self.load_processor('feature_processor.pkl')defload_model(self, path):"""加载模型"""withopen(path, 'rb'as f:return pickle.load(f)defprocess_request(self, request_data):"""处理请求数据"""# 转换数据格式        df = pd.DataFrame([request_data])# 特征工程        df_processed = self.feature_processor.transform(df)# WOE转换        df_woe = self.apply_woe(df_processed)return df_woedefpredict_score(self, features):"""预测评分"""        prob = self.model.predict_proba(features)[:, 1]        score = self.model.calculate_score(prob)# 决策逻辑        decision = self.make_decision(score, features)return {'score'float(score[0]),'probability'float(prob[0]),'decision': decision,'risk_level'self.get_risk_level(score[0]),'reasons'self.get_rejection_reasons(features) if decision == 'reject'else []        }defmake_decision(self, score, features):"""基于评分和业务规则做决策"""if score < 550:return'reject'elif score < 650:return'manual_review'else:return'approve'# API端点@app.route('/api/v1/score', methods=['POST'])defget_score():"""评分接口"""try:        data = request.json# 初始化评分器        scorer = ScoringAPI()# 处理特征        features = scorer.process_request(data)# 获取评分结果        result = scorer.predict_score(features)return jsonify({'success'True,'result': result,'timestamp': pd.Timestamp.now().isoformat()        })except Exception as e:return jsonify({'success'False,'error'str(e)        }), 400if __name__ == '__main__':    app.run(host='0.0.0.0', port=5000, debug=True)

3.2 模型监控与更新

classModelMonitor:"""模型监控系统"""def__init__(self):self.performance_history = []self.drift_history = []defcalculate_psi(self, current_dist, reference_dist, bins=10):"""计算PSI(群体稳定性指标)"""# 计算分布        current_hist, _ = np.histogram(current_dist, bins=bins)        reference_hist, _ = np.histogram(reference_dist, bins=bins)# 转换为比例        current_prop = current_hist / len(current_dist)        reference_prop = reference_hist / len(reference_dist)# 计算PSI        psi = np.sum((current_prop - reference_prop) *                      np.log((current_prop + 1e-10) / (reference_prop + 1e-10)))return psidefmonitor_performance(self, y_true, y_pred, y_score, batch_id):"""监控模型性能"""from sklearn.metrics import accuracy_score, precision_score, recall_score        metrics = {'batch_id': batch_id,'auc': roc_auc_score(y_true, y_pred),'accuracy': accuracy_score(y_true, y_pred > 0.5),'precision': precision_score(y_true, y_pred > 0.5),'recall': recall_score(y_true, y_pred > 0.5),'avg_score': y_score.mean(),'default_rate': y_true.mean(),'sample_size'len(y_true)        }self.performance_history.append(metrics)# 检查性能下降iflen(self.performance_history) > 1:self.check_performance_degradation()return metricsdefcheck_performance_degradation(self):"""检查性能下降"""        current = self.performance_history[-1]        previous = self.performance_history[-2]if current['auc'] < previous['auc'] - 0.05:print(f"⚠️ 警告: AUC下降超过5%! 当前: {current['auc']:.3f}, 上期: {previous['auc']:.3f}")if current['default_rate'] > previous['default_rate'] * 1.5:print(f"⚠️ 警告: 违约率上升超过50%!")

四、成功案例:某消费金融公司的Python评分卡实践

4.1 项目背景

某头部消费金融公司,原使用传统SAS评分卡系统:

  • • 模型开发周期:3个月
  • • 模型AUC:0.72
  • • 人工审批比例:40%
  • • 平均审批时间:2小时

4.2 Python解决方案实施

第一阶段:数据与特征优化

  • • 用Pandas替代Excel进行数据处理
  • • 开发自动化特征工程流水线
  • • 特征数量从15个增加到85个

第二阶段:模型升级

  • • 实现LightGBM + Logistic Regression stacking
  • • 引入SHAP模型解释
  • • 开发实时评分API

第三阶段:系统集成

  • • 与核心系统对接
  • • 建立模型监控平台
  • • 实现自动化模型更新

4.3 业务成果

经过6个月的实施:

  • • ✅ 模型性能:AUC从0.72提升至0.81
  • • ✅ 审批效率:自动化审批率从60%提升至85%
  • • ✅ 处理时间:平均审批时间从2小时缩短至3分钟
  • • ✅ 风险管理:坏账率降低22%
  • • ✅ 运营成本:人力成本减少35%

五、专家建议与最佳实践

5.1 技术选型建议

# 技术栈推荐tech_stack = {"数据处理": ["pandas""numpy""polars (大数据量)"],"特征工程": ["featuretools""tsfresh (时序特征)""category_encoders"],"机器学习": ["scikit-learn""lightgbm""xgboost""catboost"],"深度学习": ["tensorflow""pytorch (复杂模式)"],"模型解释": ["shap""lime""eli5"],"部署监控": ["mlflow""kubeflow""evidently"],"可视化": ["plotly""dash""streamlit"]}

5.2 实施路线图

  1. 1. 第1个月:数据摸底与EDA
  2. 2. 第2-3个月:特征工程与基线模型
  3. 3. 第4个月:模型优化与验证
  4. 4. 第5个月:系统开发与测试
  5. 5. 第6个月:上线运行与监控

5.3 风险控制要点

  • • 可解释性优先:避免使用完全的黑箱模型
  • • 稳定性监控:定期计算PSI、CSI指标
  • • 公平性检查:确保模型无性别、年龄歧视
  • • 备份方案:保留传统模型作为fallback

结语:Python驱动的智能风控未来

Python在贷前评分卡中的应用,已经从"可选项"变为"必选项"。它不仅提升了模型性能,更重要的是改变了风控工作的本质:

  1. 1. 从经验驱动到数据驱动:决策基于实证而非直觉
  2. 2. 从静态规则到动态学习:模型能够自我进化
  3. 3. 从单点决策到全链路优化:覆盖贷前、贷中、贷后全流程
  4. 4. 从成本中心到价值创造:风控成为业务增长的引擎

作为金融风控专家,我的建议是:立即开始你的Python风控之旅。不要追求完美,从一个小项目开始,快速迭代,持续优化。记住,最好的评分卡不是理论上的最优模型,而是能够在业务中持续创造价值的实用系统。

技术只是工具,业务理解才是核心。Python给了我们强大的武器,但如何用好这些武器,仍然取决于我们对金融风险本质的深刻理解。

欢迎添加:

公众号:消费金融风控联盟,ID:xiaojinfengkong
公众号:天天学风控,ID:xuefengkong
商务合作:13716986572 
欢迎加入联盟粉丝通讯录:免费加入+免费发布信息,Vivian:13911850028回复通讯录
欢迎加入风控干货知识星球:详情可添加管理Vivian:13911850028回复知识星球

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-02 21:58:30 HTTP/2.0 GET : https://f.mffb.com.cn/a/502960.html
  2. 运行时间 : 0.275953s [ 吞吐率:3.62req/s ] 内存消耗:4,822.73kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=6c62d561f53848ff6c3185de609ecf05
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000580s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000625s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.100658s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.022406s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001643s ]
  6. SELECT * FROM `set` [ RunTime:0.000708s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001588s ]
  8. SELECT * FROM `article` WHERE `id` = 502960 LIMIT 1 [ RunTime:0.015371s ]
  9. UPDATE `article` SET `lasttime` = 1783000710 WHERE `id` = 502960 [ RunTime:0.024149s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.004738s ]
  11. SELECT * FROM `article` WHERE `id` < 502960 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003563s ]
  12. SELECT * FROM `article` WHERE `id` > 502960 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001176s ]
  13. SELECT * FROM `article` WHERE `id` < 502960 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005921s ]
  14. SELECT * FROM `article` WHERE `id` < 502960 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002035s ]
  15. SELECT * FROM `article` WHERE `id` < 502960 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001962s ]
0.279528s