当前位置:首页>python>期刊图片复现|Python绘制RF重要性分析与相关性热力图

期刊图片复现|Python绘制RF重要性分析与相关性热力图

  • 2026-08-18 23:11:46
期刊图片复现|Python绘制RF重要性分析与相关性热力图

代码绘制成果展示

论文:Deficit irrigation alleviates the increase in soil salinity content in  saline-alkali regions of China and improves irrigation water productivity: A  meta-analysis
多种配色
利用随机森林模型(a-c)与皮尔逊相关性分析(d-f),综合揭示了灌溉措施(紫色)、土壤条件(灰色)及气候条件(橙色)对盐碱地土壤盐分含量、作物产量和灌溉水生产力的相对重要性及其相互关联。分析结果表明,SIW是决定这三个目标变量的最核心驱动因子,处于绝对主导地位,同时也是影响IWP和土壤盐分的首要因素;紧随其后的是土壤条件,而气候条件的整体影响力相对较弱。相关性热力图进一步印证了这一点
注意,此为个人理解,可能存在错误,具体内容还请阅读原文进行理解。
多种配色
多种配色

代码解释

第一部分

库的导入以及字体设置
# =========================================================================================# ====================================== 1. 环境设置 =======================================# =========================================================================================import matplotlib.pyplot as pltimport seaborn as snsimport pandas as pdimport numpy as npimport matplotlib.patches as mpatchesfrom sklearn.ensemble import RandomForestRegressorfrom sklearn.model_selection import train_test_split, GridSearchCVfrom sklearn.metrics import r2_scorefrom scipy.stats import pearsonr, spearmanr, kendalltau

第二部分

相关性分析方法与变量信息配置,通过数字 1, 2, 3 控制使用哪种相关性计算方法,同时通过一个数据字典映射了变量简称到全称,还定义了每个变量的类别。用于在后续绘制条形图时,决定了条形图的颜色分组。
# =========================================================================================# ======================================2.相关性分析方法设置=======================================# =========================================================================================# 相关性方法库method_map = {1'pearson',              2'spearman',              3'kendall'}CORRELATION_METHOD = 1  # 定义相关性分析的方法# 获取当前选择的方法名称selected_method = method_map.get(CORRELATION_METHOD, 'pearson')

第三部分

颜色库的设置以及配色方案的选择
# =========================================================================================# ======================================3.颜色库=======================================# =========================================================================================COLOR_SCHEMES = {    1: {        'colors': {'Irrigation practices''#800080''Climatic conditions''#FF8C00''Soil conditions''#808080'},        'heatmap''viridis',        'title_bg''#BFBFBF'    },}CURRENT_SCHEME_ID = 40 # 定义当前使用的配色方案

第四部分

特征重要性条形图绘制函数:数据准备,负责将输入的特征重要性字典转换为可视化的 DataFrame,并分配颜色。

# =========================================================================================# ======================================4.条形图绘制函数======================================# =========================================================================================def draw_bar_chart(ax, imp_dict, title, label_char, color_palette, title_bg_color):    plot_data = []  # 初始化绘图数据列表    for abbr, value in imp_dict.items():  # 遍历特征重要性字典        info = VAR_INFO.get(abbr)  # 获取变量的类别信息        if info:            plot_data.append({                'Variable': info['name'],  # 变量                'Value': value,  # 重要性                'Category': info['cat']  # 类别            })    df_plot = pd.DataFrame(plot_data)  #转换为 DataFrame    df_plot['Color'] = df_plot['Category'].map(color_palette)  # 根据类别映射颜色

第五部分

特征重要性条形图绘制函数:绘制水平条形图并添加自定义的标题背景。

    # 按照重要性数值排序    df_plot = df_plot.sort_values('Value'ascending=True)    # 绘制水平条形图    bars = ax.barh(df_plot['Variable'],  #y轴                   df_plot['Value'],  #x轴                   color=df_plot['Color'],  # 颜色                   height=0.7,  # 高度                   zorder=3)    # 标题    ax.text(0.5,  #x            1.05,  #y            title,  # 文本            transform=ax.transAxes,  # 轴坐标系            ha='center',  # 水平            va='center',  # 垂直            fontsize=20,  # 字体大小            color='black',  # 字体颜色            zorder=5)

第六部分

特征重要性条形图绘制函数:图表的细节调整,包括去除默认坐标轴、添加数值标签、设置子图编号等。

    ax.set_yticks([])  # 去掉 y 轴刻度线    for bar, label in zip(bars, df_plot['Variable']):  # 遍历每个条形和标签        # 添加特征名称        ax.text(0.05# x                bar.get_y() + bar.get_height() / 2,  # y                label,  # 标签文本                ha='left',  # 左对齐                va='center',  # 垂直                fontsize=11,  # 字体大小                color='black')  # 字体颜色    #子图编号    ax.text(0.02,  #x 坐标            1.05,  #y 坐标            f'({label_char})',  #子图编号文本            transform=ax.transAxes,  # 轴坐标系            fontsize=20,  # 字体大小            fontweight='normal',  # 字体粗细            va='center',  # 垂直居中            ha='left',  # 左对齐            zorder=6)

第七部分

特征重要性条形图绘制函数:图例设置

if label_char == 'a':  # 仅在第一个子图中添加图例        patches = [mpatches.Patch(color=v, label=k) for k, v in color_palette.items()]  # 创建图例色块        ax.legend(handles=patches,  # 图例句柄                  loc='lower right',  # 位置                  fontsize=10,  # 字体大小                  frameon=False,  # 不显示图例边框                  bbox_to_anchor=(1.00.0))  #位置

第八部分

热力图绘制函数: 创建下三角掩膜,遮盖下三角,只显示上三角部分,绘制热图

# =========================================================================================# ======================================5.热力图的绘制函数======================================# =========================================================================================def draw_heatmap(ax, corr_df, p_val_df, label_char, cmap_name):    mask = np.tril(np.ones_like(corr_df, dtype=bool), k=-1)  # 创建下三角掩膜    # 绘制热图    sns.heatmap(corr_df,  # 据                mask=mask,  # 掩膜                annot=False,  # 不自动标注数值                fmt=".2f",  # 数值格式                cmap=cmap_name,  # 颜色映射                vmin=-1,  # 最小值                vmax=1,  # 最大值                center=0,  # 中心值                square=True,  # 单元格设为正方形                linewidths=0.5,  # 分隔线宽度                cbar=False,  # 不显示默认颜色条                ax=ax)  # 指定绘制的轴

第九部分

热力图绘制函数:显著性标注,遍历矩阵,根据 P 值在热图格子上添加星号 ,表示相关性的显著程度。

for i in range(corr_df.shape[0]):  # 遍历行        for j in range(corr_df.shape[1]):  # 遍历列                if text and i != j:  # 如果有标记且不是对角线                    ax.text(j + 0.5,  # x 坐标                            i + 0.6,  # y 坐标                            text,  # 文本内容                            ha='center',  # 水平居中                            va='center',  # 垂直居中                            color='white' if abs(corr_df.iloc[i, j]) > 0.5 else 'black',  # 根据背景深浅自动调整字体颜色                            fontsize=10,  # 字体大小                            fontweight='bold')  # 加粗

第十部分

热力图绘制函数:设置对角线变量名

    n = len(corr_df)  # 特征数量    for i in range(n):  # 遍历对角线位置        # 创建矩形,位置在对角线        rect = mpatches.Rectangle((i, i),  #位置                                  1,  # 宽度                                  1,  # 高度                                  fill=True,  # 填充                                  color='#000080',  # 填充颜色                i + 0.5,  # y 坐标                label,  # 文本内容                ha='center',  # 水平居中                va='center',  # 垂直居中                color='white',  # 字体颜色                fontsize=10,  # 字体大小                fontweight='bold')  # 字体加粗

第十一部分

热力图绘制函数:细节调整,整理坐标轴标签的位置,添加子图编号和显著性说明图例。

    ax.xaxis.tick_top()  # 将 x 轴刻度移至顶部    ax.xaxis.set_label_position('top')  # 设置 x 轴标签位置为顶部    # 设置 x 轴刻度标签    ax.set_xticklabels(corr_df.columns, rotation=45,ha='left',rotation_mode='anchor')    ax.yaxis.tick_right()  # 将 y 轴刻度移至右侧    ax.yaxis.set_label_position('right')  # 设置 y 轴标签位置为右侧    # 添加显著性的说明文本    sig_text = "* p<=0.05\n** p<=0.01\n*** p<=0.001"    ax.text(0.01,  # x 坐标            0.25,  # y 坐标            sig_text,  # 文本内容            transform=ax.transAxes,  # 使用轴坐标系            fontsize=14,  # 字体大小            ha='left',  # 左对齐            va='bottom',  # 底部对齐            linespacing=1.5)  # 行间距

第十二部分

主程序:数据加载与预处理,定义了三个目标变量对应的文件,并开始循环读取数据。

# =========================================================================================# ======================================6.执行部分======================================# =========================================================================================if __name__ == "__main__":    plot_results = []  # 初始化结果列表,用于存储绘图所需数据    # 目标变量    target_configs = [        {'name''Soil salinity''file''region_data_1.xlsx'},        {'name''Yield''file''region_data_2.xlsx'},        {'name''IWP''file''region_data_3.xlsx'}    ]    base_path = r'热力图'  #原始数据的路径    for config in target_configs:  # 遍历每个文件和目标        target_name = config['name']  # 目标变量        file_name = config['file']  # 文件名        file_path = os.path.join(base_path, file_name)  # 文件路径        df = pd.read_excel(file_path)  # 读取数据文件        features_cols = list(VAR_INFO.keys())  # 获取特征名        X = df[features_cols]  # 特征        y = df[target_name]  # 目标

第十三部分

主程序:随机森林建模与网格搜索,执行机器学习流程。使用网格搜索(GridSearchCV)来优化随机森林回归模型的超参数。通过 3 折交叉验证 ,尝试 所有参数组合,寻找性能最佳的模型。打印测试集上的 R2 分数,确认模型预测能力

       # 划分训练集和测试集        X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)        # 超参数网格        param_grid = {            'n_estimators': [100200],            'max_depth': [None1020],            'min_samples_leaf': [12],            'max_features': ['sqrt''log2'None]        }        # 初始化RF回归器        rf_base = RandomForestRegressor(random_state=42)        # 初始化网格搜索        grid_search = GridSearchCV(estimator=rf_base, param_grid=param_grid, cv=3, n_jobs=-1, verbose=0)        grid_search.fit(X_train, y_train)  # 在训练集上进行拟合        best_rf = grid_search.best_estimator_  # 最佳模型        #评估模型        score = r2_score(y_test, best_rf.predict(X_test))        print(f"    最佳模型 R2 Score: {score:.3f}")

第十四部分

主程序:计算特征重要性

        # 获取特征重要性        importances = best_rf.feature_importances_        # 将重要性归一化为百分比        importances = 100.0 * (importances / importances.sum())        # 创建特征名到重要性的字典        imp_dict = dict(zip(X.columns, importances))

第十五部分

主程序:计算特征与目标变量之间的相关系数矩阵,并计算对应的 P 值矩阵用于显著性检验。

        cols = features_cols + [target_name]  # 定义相关性分析的列        df_subset = df[cols].copy()  # 提取相关数据子集        corr_matrix = df_subset.corr(method=selected_method)  # 计算相关性矩阵        p_matrix = pd.DataFrame(np.zeros_like(corr_matrix), columns=colsindex=cols)  # 初始化 P 值矩阵                else:                    _, p = pearsonr(vec_xvec_y)                p_matrix.loc[c1c2] = p        plot_results.append({            'imp': imp_dict,  # 重要性            'corr': corr_matrix,  # 相关性            'p_val': p_matrix,  # P 值            'title': target_name  # 标题        })

第十六部分

主程序:组合图绘制与布局

    current_config = COLOR_SCHEMES.get(CURRENT_SCHEME_ID, COLOR_SCHEMES[1])  # 获取当前配色配置    current_palette = current_config['colors']  # 获取颜色调色板    current_heatmap_cmap = current_config['heatmap']  # 获取热力图颜色映射    current_title_bg = current_config['title_bg']  # 获取标题背景色    # 创建画布    fig = plt.figure(figsize=(1814))    # 创建网格布局    draw_heatmap(ax4, plot_results[0]['corr'], plot_results[0]['p_val'], "d", current_heatmap_cmap)    ax5 = fig.add_subplot(gs[11])    draw_heatmap(ax5, plot_results[1]['corr'], plot_results[1]['p_val'], "e", current_heatmap_cmap)    ax6 = fig.add_subplot(gs[12])    draw_heatmap(ax6, plot_results[2]['corr'], plot_results[2]['p_val'], "f", current_heatmap_cmap)

第十七部分

主程序:颜色条添加与主图保存

    cbar_axes = [ax4, ax5, ax6]  # 定义需要添加颜色条的轴列表    for ax in cbar_axes:  # 遍历这些轴        pos = ax.get_position()  # 获取轴的位置        cax = fig.add_axes([pos.x0, pos.y0, pos.width * 0.70.01])  # 创建颜色条的轴位置        norm = plt.Normalize(-11)  # 设置颜色条的归一化范围        sm = plt.cm.ScalarMappable(cmap=current_heatmap_cmap, norm=norm)  # 创建 ScalarMappable 对象        sm.set_array([])  # 设置空数组        cbar = fig.colorbar(sm, cax=cax, orientation='horizontal')  # 绘制水平颜色条        cbar.set_ticks([-1, -0.8, -0.6, -0.4, -0.200.20.40.60.81])  # 设置颜色条刻度        cbar.ax.tick_params(labelsize=9)  # 设置刻度标签大小        cbar.ax.xaxis.set_ticks_position('top')  # 设置刻度位置在顶部        cbar.ax.xaxis.set_label_position('top')  # 设置标签位置在顶部

第十八部分

主程序:子图单独保存

#================================================================子图保存部分============================================================================    labels_abc = ['a''b''c']  # 定义条形图编号    for i in range(3):  # 遍历前 3 个结果        fig_sub, ax_sub = plt.subplots(figsize=(86))  # 创建子图画布        draw_bar_chart(ax_sub, plot_results[i]['imp'], plot_results[i]['title'], labels_abc[i], current_palette, current_title_bg)  # 绘制单个条形图    labels_def = ['d''e''f']  # 定义热力图编号    for i in range(3):        fig_sub, ax_sub = plt.subplots(figsize=(87))  # 创建子图画布        draw_heatmap(ax_sub, plot_results[i]['corr'], plot_results[i]['p_val'], labels_def[i], current_heatmap_cmap)  # 绘制单个热力图        pos = ax_sub.get_position()  # 获取位置        cax = fig_sub.add_axes([pos.x0, pos.y0 - 0.05, pos.width * 0.70.02])  # 创建颜色条位置        norm = plt.Normalize(-11)  # 归一化        sm = plt.cm.ScalarMappable(cmap=current_heatmap_cmap, norm=norm)  # 映射        sm.set_array([])  # 空数组        cbar = fig_sub.colorbar(sm, cax=cax, orientation='horizontal')  # 绘制颜色条        cbar.set_ticks([-1, -0.8, -0.6, -0.4, -0.200.20.40.60.81])  # 设置刻度        cbar.ax.tick_params(labelsize=9)  # 设置参数        cbar.ax.xaxis.set_ticks_position('top')  # 设置刻度位置        cbar.ax.xaxis.set_label_position('top')  # 设置标签位置

如何应用到你自己的数据

1.选择要使用进行分析的相关性分析方法:

CORRELATION_METHOD = 1  # 定义相关性分析的方法

2.选择要使用的配色方案:

CURRENT_SCHEME_ID = 40 # 定义当前使用的配色方案

3.设置变量所属的类别:

VAR_INFO = {    'SIW': {'name''Salinity of irrigation water''cat''Irrigation practices'},

4.设置不同区域的数据文件以及目标变量:

target_configs = [    {'name''Soil salinity''file''region_data_1.xlsx'},

5.设置文件的路径地址:

base_path = r'热力图'  #原始数据的路径

6.设置超参数:

param_grid = {    'n_estimators': [100200],    'max_depth': [None, 1020],    'min_samples_leaf': [12],    'max_features': ['sqrt''log2', None]}

7.设置绘图结果的保存路径:

plt.savefig(fr'RF_analysis{CURRENT_SCHEME_ID}.png', dpi=300, bbox_inches='tight')plt.savefig(fr'RF_analysis{CURRENT_SCHEME_ID}.pdf',dpi=300, bbox_inches='tight')

推荐

期刊图片复现|Python绘制SHAP重要性玫瑰图+相关性网络图组合图
期刊图片复现|Python绘制XGB+SHAP特征重要性条形图+蜂巢图+玫瑰图组合图
期刊图片复现|Python绘制基于边缘分布与残差分析的回归拟合图
期刊图片复现|Python绘制XGB+SHAP特征重要性排序+依赖组合图
Python绘制GAM模型非线性交互效应等高线热力图(带有峰值区间和谷值区间)

获取方式

需要的后台私信我,注意只会分享练习数据和代码文件,不会提供答疑服务,代码文件中已经包含了每行代码的完整注释!!!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 22:51:19 HTTP/2.0 GET : https://f.mffb.com.cn/a/509146.html
  2. 运行时间 : 0.112564s [ 吞吐率:8.88req/s ] 内存消耗:5,318.60kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=25552df05b0373fb899130b6a5a9438c
  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.000421s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000638s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.005156s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000243s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000465s ]
  6. SELECT * FROM `set` [ RunTime:0.000254s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000488s ]
  8. SELECT * FROM `article` WHERE `id` = 509146 LIMIT 1 [ RunTime:0.007667s ]
  9. UPDATE `article` SET `lasttime` = 1787323879 WHERE `id` = 509146 [ RunTime:0.009610s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000239s ]
  11. SELECT * FROM `article` WHERE `id` < 509146 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.007490s ]
  12. SELECT * FROM `article` WHERE `id` > 509146 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002614s ]
  13. SELECT * FROM `article` WHERE `id` < 509146 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001598s ]
  14. SELECT * FROM `article` WHERE `id` < 509146 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.009139s ]
  15. SELECT * FROM `article` WHERE `id` < 509146 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001622s ]
0.114122s