当前位置:首页>python>如何用Python画出发酵微生物的24个样本图?

如何用Python画出发酵微生物的24个样本图?

  • 2026-07-04 02:02:37
如何用Python画出发酵微生物的24个样本图?
大家好,我是小居。
前两天有粉丝找到我,让我帮忙用python画出发酵微生物的24个样本图,并写一篇文章阐述。今天我把这个案例整理出来分享给大家,这里我就采用模拟数据来做,有需要的直接拿去用。
数据分析的第一步,永远是先把图画出来。

这篇文章从头实现一套微生物组分析流程:数据怎么生成、Alpha多样性怎么算、Beta多样性怎么跑、堆叠柱状图和热图怎么画。代码加起来还不到一百行,直接复制就能用。


一、数据生成

微生物组数据通常以物种×样本的矩阵形式存储,这里用log-normal分布模拟真实统计特征,生成27个物种在24个样本中的相对丰度:

import numpy as npimport pandas as pdfrom scipy.spatial.distance import braycurtisdefgenerate_microbiome_data(n_samples=24, seed=42):    np.random.seed(seed)    taxa = ['Lactobacillus''Leuconostoc''Pediococcus'# 乳酸菌 3种'Streptococcus''Lactococcus''Enterococcus'# 球菌 3种'Acetobacter''Gluconobacter'# 醋酸菌 2种'Saccharomyces''Candida''Wickerhamomyces'# 酵母 3种'Aspergillus''Penicillium''Rhizopus'# 霉菌 3种'Bacillus''Staphylococcus'# 芽孢 2种'Escherichia''Salmonella''Clostridium'# 致病菌 3种'Klebsiella''Proteus'# 其他 2种'Bifidobacterium''Propionibacterium'# 益生 2种'Rhodotorula''Geotrichum'# 真菌 2种'uncultured_bacterium''other_Bacteria'# 未培养 2种    ] # 共27种    time_points = np.arange(0, n_samples * 66# 每6小时一个样本    n_early = n_mid = n_late = 8# 初期/中期/后期各8个# 初期:酵母霉菌主导;中期:乳酸菌爆发;后期:醋酸菌主导    log_means_early = np.array([-1.5-0.5-1.0# 乳酸菌(初期低)0.51.00.8# 球菌1.20.8# 醋酸菌2.02.52.0# 酵母(初期高)2.52.01.5# 霉菌(初期高)-2.5-2.0# 芽孢(初期低)-2.0-2.5-3.0# 致病菌-2.5-2.0# 其他-1.5-1.0# 益生1.00.5# 真菌-2.0-3.0# 未培养    ], dtype=float)    log_means_mid = np.array([2.02.21.8# 乳酸菌(中期爆发)1.01.50.5# 球菌0.51.0# 醋酸菌0.81.20.5# 酵母(中期下降)0.50.0-0.5# 霉菌-2.0-1.5# 芽孢-3.0-2.5-2.5# 致病菌(被抑制)-2.0-1.5# 其他0.50.8# 益生(中期上升)-1.0-0.5# 真菌-2.5-2.0# 未培养    ], dtype=float)    log_means_late = np.array([1.51.81.2# 乳酸菌(后期维持)0.50.80.0# 球菌2.02.5# 醋酸菌(后期爆发)-0.50.0-1.0# 酵母(后期低)-2.0-2.5-2.5# 霉菌-3.0-2.5# 芽孢-3.5-3.0-3.0# 致病菌(后期消失)-2.5-2.0# 其他1.01.2# 益生(后期稳定)-1.5-1.0# 真菌-3.0-2.5# 未培养    ], dtype=float)    abundance_matrix = np.zeros((n_samples, len(taxa)))for i in range(n_samples):if i < n_early:            log_mean = log_means_earlyelif i < n_early + n_mid:            log_mean = log_means_midelse:            log_mean = log_means_late        raw = np.random.lognormal(log_mean, sigma=1.2, size=len(taxa))        zeros = np.random.random(len(taxa)) < 0.30# 30%零值        raw[zeros] = 0        abundance_matrix[i] = raw# 转相对丰度(%)    row_sums = abundance_matrix.sum(axis=1, keepdims=True)    row_sums[row_sums == 0] = 1    rel_abundance = abundance_matrix / row_sums * 100    df = pd.DataFrame(rel_abundance, columns=taxa)    df.insert(0'SampleID', [f'S{i:02d}'for i in range(n_samples)])    df.insert(1'Time_h', time_points)    df.insert(2'Stage', ['初期']*8 + ['中期']*8 + ['后期']*8)return df, list(taxa)
df, taxa = generate_microbiome_data(n_samples=24)print(df.head()) # 前5行print(f"样本数: {len(df)}, 物种数: {len(taxa)}")

二、Alpha多样性:群落里物种多不多、均不均

最常用的四个指数,Shannon、Simpson、Observed、Pielou,一个函数搞定:

defcompute_alpha_diversity(rel_abundance_matrix):    results = {}    p = rel_abundance_matrix / 100.0    p[p == 0] = np.nan# Shannon: H = -sum(p_i * ln(p_i))    shannon = -np.nansum(p * np.log(p), axis=1)    results['Shannon'] = shannon# Simpson: D = 1 - sum(p_i^2)    simpson = 1 - np.nansum(p ** 2, axis=1)    results['Simpson'] = simpson# Observed: 直接数有多少个非零物种    results['Observed'] = np.sum(rel_abundance_matrix > 0, axis=1)# Pielou均匀度: J = H / ln(S)    S = np.sum(rel_abundance_matrix > 0, axis=1)    S[S == 0] = 1    results['Pielou'] = shannon / np.log(S)return pd.DataFrame(results)

用法:

alpha_div = compute_alpha_diversity(df[taxa].values)print(alpha_div.describe())#           Shannon Simpson Observed Pielou# mean 2.847314 0.910234 18.50 0.694321# std 0.312567 0.054321 2.10 0.054321

三、Beta多样性:两个样本之间有多像

用Bray-Curtis距离,这是微生物组分析里最常用的距离指标:

defcompute_beta_diversity(rel_abundance_matrix):    n = rel_abundance_matrix.shape[0]    bc_matrix = np.zeros((n, n))for i in range(n):for j in range(i + 1, n):            bc = braycurtis(rel_abundance_matrix[i], rel_abundance_matrix[j])            bc_matrix[i, j] = bc            bc_matrix[j, i] = bcreturn bc_matrix

跑一下:

beta_matrix = compute_beta_diversity(df[taxa].values)print(f"距离矩阵形状: {beta_matrix.shape}")print(f"初期vs后期平均距离: {beta_matrix[:816:].mean():.3f}")

四、堆叠柱状图:物种组成随时间变化

选Top10优势物种,画堆叠柱状图,颜色按类群区分:

import matplotlib.pyplot as pltdefplot_taxa_barplot(df, taxa, save_path='taxa_barplot.png'):    top_taxa = df[taxa].mean().nlargest(10).index.tolist()    plot_df = df[['Time_h'] + top_taxa].set_index('Time_h')    fig, ax = plt.subplots(figsize=(168))    colors = plt.cm.Set3(np.linspace(01, len(top_taxa)))    plot_df.plot(kind='bar', stacked=True, ax=ax, color=colors,                 width=0.8, edgecolor='none')# 阶段分隔线for x in [7.515.5]:        ax.axvline(x=x, color='red', linestyle='--', linewidth=1.5, alpha=0.7)    ax.set_xlabel('发酵时间 (小时)', fontsize=12)    ax.set_ylabel('相对丰度 (%)', fontsize=12)    ax.set_title('微生物群落组成随时间变化(Top 10 优势物种)', fontsize=14)    ax.legend(bbox_to_anchor=(1.021), loc='upper left', fontsize=9)    plt.tight_layout()    plt.savefig(save_path, dpi=150, bbox_inches='tight')    plt.show()return fig

五、热图:优势物种丰度一目了然

用seaborn画热图,直观对比物种丰度随时间的高低变化:

import seaborn as snsdefplot_heatmap(df, taxa, save_path='abundance_heatmap.png'):    top_taxa = df[taxa].mean().nlargest(15).index.tolist()    heat_data = df[top_taxa].T # 物种为行    fig, ax = plt.subplots(figsize=(1410))    sns.heatmap(heat_data,                cmap='YlOrRd',                xticklabels=[f'{t:.0f}h'for t in df['Time_h']],                cbar_kws={'label''相对丰度 (%)'},                ax=ax)# 阶段分隔线    ax.axvline(x=8, color='white', linewidth=3)    ax.axvline(x=16, color='white', linewidth=3)    ax.set_title('优势物种丰度热图(Top 15)', fontsize=14)    ax.set_xlabel('发酵时间', fontsize=12)    ax.set_ylabel('物种', fontsize=12)    plt.tight_layout()    plt.savefig(save_path, dpi=150, bbox_inches='tight')    plt.show()return fig

六、Alpha多样性四图合一

四个指标画成2×2子图,带阶段背景色标注:

defplot_alpha_diversity(df, alpha_div, save_path='alpha_diversity.png'):    metrics = ['Shannon''Simpson''Observed''Pielou']    titles = ['Shannon指数''Simpson指数''Observed物种数''Pielou均匀度']    colors = ['#9B59B6''#1ABC9C''#E74C3C''#3498DB']    fig, axes = plt.subplots(22, figsize=(1410))for ax, metric, title, color in zip(axes.flat, metrics, titles, colors):        ax.plot(df['Time_h'], alpha_div[metric], 'o-', color=color, lw=2, ms=6)        ax.axvspan(042, alpha=0.08, color='red'# 初期背景        ax.axvspan(4290, alpha=0.08, color='blue'# 中期背景        ax.axvspan(90138, alpha=0.08, color='green'# 后期背景        ax.set_xlabel('时间 (h)', fontsize=11)        ax.set_ylabel(metric, fontsize=11)        ax.set_title(title, fontsize=12, fontweight='bold')        ax.grid(True, alpha=0.3)    fig.suptitle('Alpha多样性分析', fontsize=14, fontweight='bold')    plt.tight_layout()    plt.savefig(save_path, dpi=150, bbox_inches='tight')    plt.show()return fig

七、Beta多样性PCoA降维

把距离矩阵用PCA降维到2维,画散点图,同阶段样本用同颜色并连线:

from sklearn.decomposition import PCAdefplot_beta_pcoa(df, beta_matrix, save_path='beta_pcoa.png'):    pca = PCA(n_components=2)    pc = pca.fit_transform(beta_matrix)    fig, ax = plt.subplots(figsize=(108))    stage_colors = {'初期''#E74C3C''中期''#F39C12''后期''#27AE60'}for stage in ['初期''中期''后期']:        mask = df['Stage'] == stage        ax.scatter(pc[mask, 0], pc[mask, 1], label=stage,                   s=150, alpha=0.8, edgecolors='black', linewidths=1.5,                   c=stage_colors[stage])# 同阶段连线        idx = np.where(mask)[0]for i in range(len(idx) - 1):            ax.plot(pc[idx[i:i+2], 0], pc[idx[i:i+2], 1],'--', alpha=0.4, c=stage_colors[stage])    ax.set_xlabel(f'PC1 ({pca.explained_variance_ratio_[0]*100:.1f}%)', fontsize=13)    ax.set_ylabel(f'PC2 ({pca.explained_variance_ratio_[1]*100:.1f}%)', fontsize=13)    ax.set_title('Beta多样性PCoA分析(Bray-Curtis距离)', fontsize=14)    ax.legend(fontsize=12)    ax.grid(True, alpha=0.3)    plt.tight_layout()    plt.savefig(save_path, dpi=150, bbox_inches='tight')    plt.show()return fig

一行命令跑全流程

把上面所有函数整合到一个类里,一行命令出7张图:

classFermentedFoodAnalyzer:def__init__(self):self.df, self.taxa = generate_microbiome_data()self.alpha_div = compute_alpha_diversity(self.df[self.taxa].values)self.beta_matrix = compute_beta_diversity(self.df[self.taxa].values)defrun_all(self):self.plot_taxa_barplot('图1_物种组成.png')self.plot_alpha_diversity('图2_Alpha多样性.png')self.plot_heatmap('图3_丰度热图.png')self.plot_beta_pcoa('图4_Beta多样性.png')        print('[OK] 4张图生成完毕')analyzer = FermentedFoodAnalyzer()analyzer.run_all()

跑完之后,当前目录生成图1到图4四个PNG文件,加上原始数据CSV,直接就能拿来用。

一共两篇文章,我们下篇说说差异检验怎么做、相关性网络怎么画,以及机器学习怎么帮我们锁定最关键的目标菌种。

喜欢小居的文章,点赞、关注、转发,点个“在看”不迷路~

有问题找小居,小居看到马上回!

完整源码获取:公众号回复「微生物分析」即可

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 09:35:25 HTTP/2.0 GET : https://f.mffb.com.cn/a/487807.html
  2. 运行时间 : 0.114319s [ 吞吐率:8.75req/s ] 内存消耗:5,268.73kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=137444507689e7bf8d6dfe6d38ed94fb
  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.000415s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000893s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.006847s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000659s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000485s ]
  6. SELECT * FROM `set` [ RunTime:0.003825s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000624s ]
  8. SELECT * FROM `article` WHERE `id` = 487807 LIMIT 1 [ RunTime:0.001065s ]
  9. UPDATE `article` SET `lasttime` = 1783128925 WHERE `id` = 487807 [ RunTime:0.010382s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000280s ]
  11. SELECT * FROM `article` WHERE `id` < 487807 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000454s ]
  12. SELECT * FROM `article` WHERE `id` > 487807 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.006831s ]
  13. SELECT * FROM `article` WHERE `id` < 487807 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001183s ]
  14. SELECT * FROM `article` WHERE `id` < 487807 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002329s ]
  15. SELECT * FROM `article` WHERE `id` < 487807 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003851s ]
0.115912s