当前位置:首页>python>【时间序列机器学习】Python04时间序列季节性自回归综合移动平均模型(SARIMA模型)拟合及可视化

【时间序列机器学习】Python04时间序列季节性自回归综合移动平均模型(SARIMA模型)拟合及可视化

  • 2026-02-06 10:57:25
【时间序列机器学习】Python04时间序列季节性自回归综合移动平均模型(SARIMA模型)拟合及可视化
时间序列机器学习
04时间序列季节性自回归综合移动平均模型(SARIMA模型)拟合及可视化
Python(标准化代码)
01
概念、原理、思想、应用

概念:在ARMA模型的基础上加入季节性成分。

原理:SARIMA(p, d, q)(P, D, Q)_s模型,其中s是季节周期。

思想:考虑时间序列的季节性变化,并进行差分和季节性差分使其平稳。

应用:具有趋势和季节性的非平稳时间序列。

可视化:拟合值与实际值的对比图,残差图,季节分解图。

公共卫生意义:适用于具有明显季节性的疾病(如流感)的预测。

02
操作流程

-数据预处理:

-模型构建:

-训练:

-评估:

-可视化:

-保存结果:

03
代码及操作演示与功能解析

时间序列机器学习模型大致可以分为三类:经典统计模型、传统机器学习模型 和 深度学习模型。

 一、 经典统计模型

这类模型基于序列自身的统计特性(如自相关性、趋势性、季节性)进行建模。

 二、 传统机器学习模型

这类模型将时间序列问题转化为监督学习问题,利用特征工程来捕捉时序模式。

 三、 深度学习模型

这类模型能自动从原始序列数据中学习复杂的时序依赖关系和非线性模式。

时间序列数据的可视化方法

1.  线图: 最基础、最核心的可视化。横轴为时间,纵轴为观测值。用于直观展示趋势、季节性、异常值。

2.  自相关图和偏自相关图:

       ACF: 展示时间序列与其自身各阶滞后之间的相关性。用于识别MA模型的阶数`q`和序列的周期性。

       PACF: 展示在控制中间滞后项后,序列与某阶滞后项之间的纯粹相关性。用于识别AR模型的阶数`p`。

3.  季节图: 将多年的数据按季节周期(如月、周)叠加在一张图上,用于清晰地观察季节性模式以及模式是否随时间变化。

4.  子序列图: 将时间序列分解为多个子序列(如每年的数据),并绘制在同一张图中,便于比较不同周期的模式。

5.  箱线图: 按时间周期(如月份、星期几)对数据进行分组并绘制箱线图,用于观察数据在不同周期内的分布情况(中位数、四分位数、异常值)。

6.  热力图: 常用于展示一天内不同小时、一周内不同天的模式(如网站流量、电力负荷)。

7.  分解图: 将时间序列分解为趋势、季节性 和残差 三个部分,分别进行可视化,帮助我们理解数据的构成。

8.  预测结果对比图: 将历史数据、真实值和模型的预测值绘制在同一张图上,是评估模型性能最直观的方式。

import osimport pandas as pdimport numpy as npfrom datetime import datetime, timedeltaimport matplotlib.pyplot as pltimport seaborn as snsfrom statsmodels.tsa.statespace.sarimax import SARIMAXfrom statsmodels.tsa.seasonal import seasonal_decomposefrom statsmodels.tsa.stattools import adfullerfrom sklearn.metrics import mean_absolute_error, mean_squared_errorimport warningswarnings.filterwarnings('ignore')def get_desktop_path():"""获取桌面路径"""return os.path.join(os.path.expanduser("~"), "Desktop")def create_results_folder():"""创建结果文件夹"""    desktop_path = get_desktop_path()    results_path = os.path.join(desktop_path, "Results时间SARIMA")# 创建主文件夹和子文件夹    folders = [        results_path,        os.path.join(results_path, "Models"),        os.path.join(results_path, "Predictions"),        os.path.join(results_path, "Diagnostics"),        os.path.join(results_path, "Seasonal_Plots"),        os.path.join(results_path, "Summary_Reports")    ]for folder in folders:if not os.path.exists(folder):            os.makedirs(folder)print(f"创建文件夹: {folder}")return results_pathdef load_and_prepare_data(results_path):"""加载和准备数据"""print("正在加载数据...")# 尝试读取R生成的数据    try:        data_path = os.path.join(get_desktop_path(), "Results""combined_weather_disease_data.csv")        combined_data = pd.read_csv(data_path)        combined_data['timestamp'] = pd.to_datetime(combined_data['timestamp'])print(f"成功读取数据,共{len(combined_data)}行")return combined_data    except FileNotFoundError:print("未找到R生成的数据文件,生成模拟数据...")return generate_sample_data()def generate_sample_data():"""生成示例数据(如果R数据不存在)"""    dates = pd.date_range('1981-01-01''2025-12-31', freq='D')# 生成模拟疾病数据    np.random.seed(42)    n = len(dates)    data = {'timestamp': dates,'year': dates.year,'month': dates.month,'day': dates.day,    }# 生成季节性疾病数据    t = np.arange(n)# 流感 - 冬季高发    data['influenza'] = np.round(        50 + 30 * np.sin(2 * np.pi * (t - 10) / 365) +  # 冬季高峰        10 * np.sin(2 * np.pi * (t - 200) / 365) +  # 夏季小高峰        np.random.normal(0, 5, n)    ).clip(0)# 手足口病 - 春夏季高发    data['hand_foot_mouth'] = np.round(        30 + 20 * np.sin(2 * np.pi * (t - 150) / 365) +  # 春夏季高峰        8 * np.sin(2 * np.pi * (t - 330) / 365) +  # 秋季小高峰        np.random.normal(0, 3, n)    ).clip(0)# 细菌性痢疾 - 夏季高发    data['bacillary_dysentery'] = np.round(        25 + 15 * np.sin(2 * np.pi * (t - 180) / 365) +  # 夏季高峰        np.random.normal(0, 4, n)    ).clip(0)# 流行性出血热 - 春秋季高发    data['hemorrhagic_fever'] = np.round(        20 + 12 * np.sin(2 * np.pi * (t - 80) / 365) +  # 春季高峰        10 * np.sin(2 * np.pi * (t - 280) / 365) +  # 秋季高峰        np.random.normal(0, 2, n)    ).clip(0)return pd.DataFrame(data)def prepare_monthly_data(daily_data, disease_columns):"""将日数据转换为月数据"""    monthly_data = daily_data.set_index('timestamp').resample('M')[disease_columns].sum().reset_index()    monthly_data['year'] = monthly_data['timestamp'].dt.year    monthly_data['month'] = monthly_data['timestamp'].dt.monthreturn monthly_data
def forecast_and_evaluate(model, test_data, disease_name):"""进行预测和评估"""if model is None:return None# 预测    forecast_steps = len(test_data)    forecast_result = model.get_forecast(steps=forecast_steps)    forecast_mean = forecast_result.predicted_mean    confidence_intervals = forecast_result.conf_int()# 计算评估指标    actual = test_data[disease_name].values    predicted = forecast_mean.values    mae = mean_absolute_error(actual, predicted)    rmse = np.sqrt(mean_squared_error(actual, predicted))    mape = np.mean(np.abs((actual - predicted) / actual)) * 100    results = {'actual': actual,'predicted': predicted,'lower_95': confidence_intervals.iloc[:, 0].values,'upper_95': confidence_intervals.iloc[:, 1].values,'mae': mae,'rmse': rmse,'mape': mape    }return resultsdef create_forecast_plot(monthly_data, train_data, test_data, results, disease_name, results_path):"""创建预测图"""    plt.figure(figsize=(14, 8))# 完整时间序列    full_dates = monthly_data['timestamp']    full_values = monthly_data[disease_name]# 训练数据    train_mask = full_dates < pd.Timestamp('2016-01-01')    plt.plot(full_dates[train_mask], full_values[train_mask],             color='blue', linewidth=1, label='训练数据')# 测试数据(实际值)    test_mask = full_dates >= pd.Timestamp('2016-01-01')    plt.plot(full_dates[test_mask], full_values[test_mask],             color='darkgreen', linewidth=1, label='实际值')# 预测值    forecast_dates = test_data['timestamp']    plt.plot(forecast_dates, results['predicted'],             color='red', linewidth=1.5, label='预测值')# 预测区间    plt.fill_between(forecast_dates,                     results['lower_95'],                     results['upper_95'],                     color='red', alpha=0.2, label='95%置信区间')# 分割线    plt.axvline(x=pd.Timestamp('2016-01-01'), color='gray', linestyle='--', alpha=0.7)    plt.title(f'{disease_name} SARIMA模型预测结果', fontsize=16, fontweight='bold')    plt.xlabel('日期', fontsize=12)    plt.ylabel('病例数', fontsize=12)    plt.legend()    plt.grid(True, alpha=0.3)    plt.xticks(rotation=45)# 保存图片    plot_path = os.path.join(results_path, "Predictions", f"SARIMA_Forecast_{disease_name}.png")    plt.tight_layout()    plt.savefig(plot_path, dpi=300, bbox_inches='tight')    plt.close()print(f"预测图已保存: {plot_path}")
def create_seasonal_plots(daily_data, disease_name, results_path):"""创建季节性分析图"""# 月度季节性模式    monthly_seasonal = daily_data.groupby('month')[disease_name].mean().reset_index()# 年度对比图(最近5年)    recent_years = range(daily_data['year'].max() - 4, daily_data['year'].max() + 1)    yearly_data = daily_data[daily_data['year'].isin(recent_years)].copy()    yearly_data['day_of_year'] = yearly_data['timestamp'].dt.dayofyear    yearly_avg = yearly_data.groupby(['year''day_of_year'])[disease_name].mean().reset_index()# 创建子图    fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10))# 月度季节性图    ax1.plot(monthly_seasonal['month'], monthly_seasonal[disease_name],             marker='o', linewidth=2, color='steelblue')    ax1.set_title(f'{disease_name} 月度季节性模式', fontsize=14, fontweight='bold')    ax1.set_xlabel('月份')    ax1.set_ylabel('平均病例数')    ax1.grid(True, alpha=0.3)# 年度对比图for year in recent_years:        year_data = yearly_avg[yearly_avg['year'] == year]        ax2.plot(year_data['day_of_year'], year_data[disease_name],                 label=str(year), linewidth=1.5)    ax2.set_title(f'{disease_name} 年度模式对比', fontsize=14, fontweight='bold')    ax2.set_xlabel('一年中的第几天')    ax2.set_ylabel('平均病例数')    ax2.legend()    ax2.grid(True, alpha=0.3)    plt.tight_layout()# 保存图片    plot_path = os.path.join(results_path, "Seasonal_Plots", f"Seasonal_Analysis_{disease_name}.png")    plt.savefig(plot_path, dpi=300, bbox_inches='tight')    plt.close()print(f"季节性分析图已保存: {plot_path}")
def create_diagnostic_plots(model, disease_name, results_path):"""创建模型诊断图"""if model is None:return# 残差分析    residuals = model.resid    fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(12, 10))# 残差时序图    ax1.plot(residuals)    ax1.set_title('残差时序图')    ax1.set_xlabel('时间')    ax1.set_ylabel('残差')    ax1.axhline(y=0, color='r', linestyle='--')# 残差直方图    ax2.hist(residuals, bins=30, density=True, alpha=0.7, color='lightblue')    ax2.set_title('残差分布')    ax2.set_xlabel('残差')    ax2.set_ylabel('密度')# Q-Q图    from scipy import stats    stats.probplot(residuals, dist="norm", plot=ax3)    ax3.set_title('Q-Q图')# ACF图    from statsmodels.graphics.tsaplots import plot_acf    plot_acf(residuals, ax=ax4, lags=40)    ax4.set_title('残差ACF图')    plt.suptitle(f'{disease_name} SARIMA模型诊断', fontsize=16, fontweight='bold')    plt.tight_layout()# 保存图片    plot_path = os.path.join(results_path, "Diagnostics", f"SARIMA_Diagnostics_{disease_name}.png")    plt.savefig(plot_path, dpi=300, bbox_inches='tight')    plt.close()print(f"诊断图已保存: {plot_path}")def main():"""主函数"""print("开始SARIMA建模分析...")# 创建结果文件夹    results_path = create_results_folder()print(f"结果将保存到: {results_path}")# 加载数据    combined_data = load_and_prepare_data(results_path)# 选择分析的疾病    selected_diseases = ["influenza",  # 流感"hand_foot_mouth",  # 手足口病"bacillary_dysentery",  # 细菌性痢疾"hemorrhagic_fever"# 流行性出血热    ]# 准备月度数据    monthly_data = prepare_monthly_data(combined_data, selected_diseases)# 划分训练集和测试集    train_data = monthly_data[monthly_data['timestamp'] < '2016-01-01']    test_data = monthly_data[monthly_data['timestamp'] >= '2016-01-01']print(f"训练集: {len(train_data)} 个月 (1981-2015)")print(f"测试集: {len(test_data)} 个月 (2016-2025)")# 存储结果    all_results = {}    accuracy_summary = []# 为每种疾病拟合模型for disease in selected_diseases:print(f"\n{'=' * 50}")print(f"处理疾病: {disease}")print(f"{'=' * 50}")# 拟合SARIMA模型        model = fit_sarima_model(train_data[disease], disease)if model is not None:# 预测和评估            results = forecast_and_evaluate(model, test_data, disease)if results is not None:                all_results[disease] = {'model': model,'results': results                }# 创建可视化                create_forecast_plot(monthly_data, train_data, test_data, results, disease, results_path)                create_seasonal_plots(combined_data, disease, results_path)                create_diagnostic_plots(model, disease, results_path)# 保存精度结果                accuracy_summary.append({'Disease': disease,'MAE': round(results['mae'], 2),'RMSE': round(results['rmse'], 2),'MAPE': round(results['mape'], 2)                })# 保存预测结果                forecast_df = pd.DataFrame({'date': test_data['timestamp'],'actual': results['actual'],'predicted': results['predicted'],'lower_95': results['lower_95'],'upper_95': results['upper_95']                })                forecast_path = os.path.join(results_path, "Predictions", f"SARIMA_Predictions_{disease}.csv")                forecast_df.to_csv(forecast_path, index=False)print(f"预测结果已保存: {forecast_path}")# 生成汇总报告if accuracy_summary:# 精度汇总        accuracy_df = pd.DataFrame(accuracy_summary)        accuracy_path = os.path.join(results_path, "Summary_Reports""accuracy_summary.csv")        accuracy_df.to_csv(accuracy_path, index=False)# 创建精度比较图        plt.figure(figsize=(10, 6))        bars = plt.bar(accuracy_df['Disease'], accuracy_df['MAPE'], alpha=0.7)        plt.title('SARIMA模型预测精度比较 (MAPE%)', fontsize=14, fontweight='bold')        plt.xlabel('疾病类型')        plt.ylabel('平均绝对百分比误差 (%)')        plt.xticks(rotation=45)# 在柱子上添加数值for bar, mape in zip(bars, accuracy_df['MAPE']):            plt.text(bar.get_x() + bar.get_width() / 2, bar.get_height() + 0.5,                     f'{mape:.1f}%', ha='center', va='bottom')        plt.tight_layout()        accuracy_plot_path = os.path.join(results_path, "Summary_Reports""accuracy_comparison.png")        plt.savefig(accuracy_plot_path, dpi=300, bbox_inches='tight')        plt.close()print(f"\n精度汇总已保存: {accuracy_path}")print(f"精度比较图已保存: {accuracy_plot_path}")# 显示汇总结果print("\n" + "=" * 60)print("SARIMA建模分析完成!")print("=" * 60)print(f"成功分析的疾病: {list(all_results.keys())}")print(f"\n模型性能摘要:")print(accuracy_df.to_string(index=False))else:print("\n警告: 没有成功拟合任何模型!")print(f"\n所有结果已保存到: {results_path}")if __name__ == "__main__":    main()

🔍04-时间序列季节性自回归综合移动平均模型(SARIMA)拟合及可视化

概念:SARIMA模型在ARIMA基础上加入了季节性成分,能够同时捕捉序列的非季节性规律和季节性周期变化。

原理:SARIMA(p,d,q)(P,D,Q)s模型包含非季节性和季节性两部分参数,s为季节周期长度。

思想:"时间序列具有多层次周期规律",既考虑短期依赖关系,也考虑以天、周、月、年为周期的长期循环模式。

应用:具有明显季节性的气象和疾病数据,如流感发病率的年度季节性预测。

可视化:

季节性分解图:展示趋势、季节性和残差三个成分

季节性自相关图:识别季节性模式

多步预测图:展示模型对未来多个周期的预测结果

公共卫生意义:预测传染病的季节性流行规律,为季节性防控措施制定提供科学依据。

医学统计数据分析分享交流SPSS、R语言、Python、ArcGis、Geoda、GraphPad、数据分析图表制作等心得。承接数据分析,论文返修,医学统计,机器学习,生存分析,空间分析,问卷分析业务。若有投稿和数据分析代做需求,可以直接联系我,谢谢!

!!!可加我粉丝群!!!

“医学统计数据分析”公众号右下角;

找到“联系作者”,

可加我微信,邀请入粉丝群!

【医学统计数据分析】工作室“粉丝群”
01
【临床】粉丝群

有临床流行病学数据分析

如(t检验、方差分析、χ2检验、logistic回归)、

(重复测量方差分析与配对T检验、ROC曲线)、

(非参数检验、生存分析、样本含量估计)、

(筛检试验:灵敏度、特异度、约登指数等计算)、

(绘制柱状图、散点图、小提琴图、列线图等)、

机器学习、深度学习、生存分析

等需求的同仁们,加入【临床】粉丝群

02
【公卫】粉丝群

疾控,公卫岗位的同仁,可以加一下【公卫】粉丝群,分享生态学研究、空间分析、时间序列、监测数据分析、时空面板技巧等工作科研自动化内容。

03
【生信】粉丝群

有实验室数据分析需求的同仁们,可以加入【生信】粉丝群,交流NCBI(基因序列)、UniProt(蛋白质)、KEGG(通路)、GEO(公共数据集)等公共数据库、基因组学转录组学蛋白组学代谢组学表型组学等数据分析和可视化内容。

或者可扫码直接加微信进群!!!

精品视频课程-“医学统计数据分析”视频号付费合集

“医学统计数据分析”视频号-付费合集兑换相应课程后,获取课程理论课PPT、代码、基础数据等相关资料,请大家在【医学统计数据分析】公众号右下角,找到“联系作者”,加我微信后打包发送。感谢您的支持!!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 13:35:45 HTTP/2.0 GET : https://f.mffb.com.cn/a/473880.html
  2. 运行时间 : 0.122240s [ 吞吐率:8.18req/s ] 内存消耗:4,840.29kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=147229d094ca8ba31868be9082fd24cd
  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.000571s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000833s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.004006s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.002981s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000505s ]
  6. SELECT * FROM `set` [ RunTime:0.001473s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000607s ]
  8. SELECT * FROM `article` WHERE `id` = 473880 LIMIT 1 [ RunTime:0.002817s ]
  9. UPDATE `article` SET `lasttime` = 1770442545 WHERE `id` = 473880 [ RunTime:0.014354s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.004609s ]
  11. SELECT * FROM `article` WHERE `id` < 473880 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000685s ]
  12. SELECT * FROM `article` WHERE `id` > 473880 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000786s ]
  13. SELECT * FROM `article` WHERE `id` < 473880 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000972s ]
  14. SELECT * FROM `article` WHERE `id` < 473880 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003272s ]
  15. SELECT * FROM `article` WHERE `id` < 473880 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.018165s ]
0.123822s