当前位置:首页>python>《高频交易入门:Python实现毫秒级交易策略》(一)

《高频交易入门:Python实现毫秒级交易策略》(一)

  • 2026-02-26 19:33:31
《高频交易入门:Python实现毫秒级交易策略》(一)

你有没有见过这样的场景:同一只股票,在同一秒内完成了上百笔交易,价格却几乎纹丝不动?或者明明看到买一价挂着大单,但你的订单刚提交,那个大单就突然消失了?这背后就是高频交易的世界——一个以毫秒、甚至微秒为单位进行较量的战场。今天,我们要揭开这个神秘领域的面纱,看看那些顶尖机构是如何在眨眼间的万分之一时间里赚取利润的。

先讲一个真实的故事。2010年5月6日,美国股市发生了著名的“闪电崩盘”。道琼斯指数在短短几分钟内暴跌近1000点,市值蒸发近万亿美元,然后又迅速反弹。事后调查发现,高频交易算法在这次事件中扮演了关键角色。一家大型高频交易公司在市场开始下跌时,每秒提交了数千个卖出订单,加剧了市场的恐慌。而当价格跌到极低水平时,同样的算法又大量买入,在反弹中获利。这个故事揭示了高频交易的双面性:它既能提供流动性,也可能放大市场波动。

今天我们要深入探讨的,就是这个充满争议却又令人着迷的领域。我们将从市场的最微观结构开始,逐步理解高频交易的运作原理,并用Python模拟一些核心策略。虽然真正的毫秒级交易需要庞大的技术基础设施,但理解其背后的逻辑,能让我们对市场有更深刻的认识。

首先,我们必须澄清一个常见的误解:高频交易不仅仅是“更快”的交易。它的核心在于对市场微观结构的深刻理解,以及利用这种理解设计出的精细策略。想象一下,你站在一条湍急的河流边,看到水面上不断泛起涟漪。普通人只看到水在流动,但训练有素的观察者能从涟漪的形态、频率和传播方向,推断出水下的地形、流速甚至鱼群的位置。高频交易者就像这样的观察者,他们从订单簿的细微变化中,读取着市场的“水下信息”。

让我们从一个最基础的微观结构概念开始:订单簿。如果你看过Level-2行情,你会看到买一、买二、卖一、卖二……每个价位上挂了多少手单子。这个看似简单的列表,实际上蕴含了丰富的信息。高频交易者会密切关注订单簿的动态变化:大单的出现和消失、买卖价差的变动、订单在簿子中的位置移动……每一个变化都可能是某种信号的体现。

用Python来看一个简单的例子。虽然我们无法获取真正的毫秒级数据(那需要昂贵的专业数据源),但我们可以用tushare pro获取的Level-2快照数据来理解基本概念:

import tushare as tsimport pandas as pdimport numpy as npimport matplotlib.pyplot as pltfrom datetime import datetime, timedeltaimport time# 设置tokents.set_token('你的token')pro = ts.pro_api()# 获取某只股票某一天的Level-2快照数据(注意:这是收费接口)# 这里我们用日线数据模拟,实际高频策略需要更细粒度数据def get_orderbook_snapshot(symbol, trade_date):    """    获取订单簿快照    实际高频交易中,这可能是每秒多次的快照    """    # 这里简化处理,实际需要调用Level-2接口    # 获取当天分笔数据    df = pro.moneyflow(ts_code=symbol, trade_date=trade_date)    if len(df) == 0:        # 如果没有数据,模拟一些数据        np.random.seed(42)        times = pd.date_range(start=f'{trade_date} 09:30:00'                             end=f'{trade_date} 15:00:00'                             freq='1min')        # 模拟订单簿数据        orderbook_data = []        base_price = 100.0        for i, t in enumerate(times):            # 模拟买卖档位            bid_price = base_price - np.random.random() * 0.1            ask_price = base_price + np.random.random() * 0.1            # 模拟各档位挂单量            bid_volumes = [np.random.randint(1001000for _ in range(5)]            ask_volumes = [np.random.randint(1001000for _ in range(5)]            # 模拟成交            trade_volume = np.random.randint(10100)            trade_price = (bid_price + ask_price) / 2            orderbook_data.append({                'timestamp': t,                'bid_price': bid_price,                'ask_price': ask_price,                'bid_volume'sum(bid_volumes),                'ask_volume'sum(ask_volumes),                'spread': ask_price - bid_price,                'mid_price': (bid_price + ask_price) / 2,                'trade_volume': trade_volume,                'trade_price': trade_price,                'orderbook_imbalance': (sum(bid_volumes) - sum(ask_volumes)) /                                       (sum(bid_volumes) + sum(ask_volumes))            })            # 价格随机游走            base_price += np.random.randn() * 0.01        df_sim = pd.DataFrame(orderbook_data)        return df_sim    return df# 获取模拟数据symbol = '600519.SH'trade_date = '20240601'orderbook_df = get_orderbook_snapshot(symbol, trade_date)print("订单簿快照数据示例:")print(orderbook_df.head())print(f"\n数据时间范围: {orderbook_df['timestamp'].min()} 到 {orderbook_df['timestamp'].max()}")print(f"数据频率: 大约每{(orderbook_df['timestamp'].iloc[1] - orderbook_df['timestamp'].iloc[0]).seconds}秒一次")

在真实的高频交易中,数据频率可能是每毫秒甚至每微秒一次。但即使是我们模拟的每分钟数据,也能揭示一些有趣的现象。比如,我们可以计算买卖价差——这是衡量市场流动性的重要指标,也是高频交易者盈利的主要来源之一。

买卖价差本质上是一个做市商的利润空间。想象你经营一家货币兑换店,你以9.95元的价格买入美元,以10.05元的价格卖出美元,这0.1元的差价就是你的利润。在高频交易中,做市商策略就是在做类似的事情:在买一价挂买单,在卖一价挂卖单,赚取中间的差价。

但这里有个关键问题:如果价格朝不利方向移动怎么办?比如你在100元挂了卖单,在99.9元挂了买单,结果价格突然跌到99.8元,你的买单虽然成交了,但股票价值立即亏损了0.1元。这就是做市商面临的主要风险——存货风险。

高频做市商如何管理这种风险呢?他们依靠的是极快的反应速度和对订单簿动态的精确预测。让我们看一个简化的做市商策略:

class HighFrequencyMarketMaker:    """    高频做市商策略模拟    注意:这是极度简化的版本,真实策略复杂得多    """    def __init__(self, initial_capital=1000000, base_price=100.0):        self.capital = initial_capital        self.inventory = 0  # 持仓股票数量        self.base_price = base_price        self.bid_price = base_price - 0.01  # 初始买单价格        self.ask_price = base_price + 0.01  # 初始卖单价格        self.position_limit = 10000  # 最大持仓限制        self.profit = 0        self.trade_log = []        # 统计信息        self.bid_filled = 0        self.ask_filled = 0        self.inventory_changes = []    def update_quotes(self, market_price, orderbook_imbalance):        """        根据市场情况更新报价        """        # 基础价差        base_spread = 0.02        # 根据库存调整报价        # 如果库存过多,降低卖价,提高买价,鼓励卖出        # 如果库存过少,提高卖价,降低买价,鼓励买入        inventory_adjustment = self.inventory / self.position_limit * 0.01        # 根据订单簿不平衡调整        imbalance_adjustment = orderbook_imbalance * 0.005        # 最终报价        self.bid_price = market_price - base_spread/2 + inventory_adjustment + imbalance_adjustment        self.ask_price = market_price + base_spread/2 + inventory_adjustment + imbalance_adjustment        # 确保买价低于卖价        if self.bid_price >= self.ask_price:            self.bid_price = self.ask_price - 0.01    def process_market_order(self, order_type, volume, price):        """        处理市价单        order_type: 'buy' 或 'sell'        """        if order_type == 'buy' and self.inventory >= volume:            # 有人以市价买入,我们卖出            trade_value = volume * self.ask_price            self.capital += trade_value            self.inventory -= volume            self.profit += (self.ask_price - price) * volume  # 粗略估计利润            self.ask_filled += volume            self.trade_log.append({                'time': datetime.now(),                'type''sell',                'price'self.ask_price,                'volume': volume,                'inventory'self.inventory,                'capital'self.capital            })        elif order_type == 'sell' and self.capital >= volume * self.bid_price:            # 有人以市价卖出,我们买入            trade_value = volume * self.bid_price            self.capital -= trade_value            self.inventory += volume            self.profit += (price - self.bid_price) * volume  # 粗略估计利润            self.bid_filled += volume            self.trade_log.append({                'time': datetime.now(),                'type''buy',                'price'self.bid_price,                'volume': volume,                'inventory'self.inventory,                'capital'self.capital            })    def run_simulation(self, market_data, duration_minutes=60):        """        运行策略模拟        """        start_time = time.time()        for i, row in market_data.iterrows():            current_time = row['timestamp']            market_price = row['mid_price']            orderbook_imbalance = row.get('orderbook_imbalance'0)            # 更新报价            self.update_quotes(market_price, orderbook_imbalance)            # 模拟市价单到达(随机)            if np.random.random() < 0.3:  # 30%的概率有市价单                order_type = 'buy' if np.random.random() > 0.5 else 'sell'                volume = np.random.randint(110) * 100  # 100-1000股                self.process_market_order(order_type, volume, market_price)            # 记录库存变化            self.inventory_changes.append({                'time': current_time,                'inventory'self.inventory,                'bid_price'self.bid_price,                'ask_price'self.ask_price,                'market_price': market_price            })            # 模拟时间流逝            if time.time() - start_time > duration_minutes * 60:                break        # 平仓        if self.inventory > 0:            self.capital += self.inventory * market_price            self.profit += self.inventory * (market_price - self.base_price)            self.inventory = 0        elif self.inventory < 0:            # 如果出现卖空情况(简化模型不允许)            self.inventory = 0        return pd.DataFrame(self.inventory_changes)    def get_performance_report(self):        """生成绩效报告"""        total_trades = self.bid_filled + self.ask_filled        report = {            '初始资金'1000000,            '最终资金'self.capital,            '总利润'self.profit,            '利润率'self.profit / 1000000,            '买入成交'self.bid_filled,            '卖出成交'self.ask_filled,            '总交易量': total_trades,            '平均持仓': np.mean([abs(x['inventory']) for x in self.inventory_changes])                        if self.inventory_changes else 0        }        return report# 运行模拟mm = HighFrequencyMarketMaker(initial_capital=1000000, base_price=100.0)inventory_df = mm.run_simulation(orderbook_df, duration_minutes=30)# 生成报告report = mm.get_performance_report()print("\n做市商策略绩效报告:")for key, value in report.items():    if isinstance(value, float):        print(f"{key}{value:.2f}" if '率' in key else f"{key}{value:.0f}")    else:        print(f"{key}{value}")# 可视化结果fig, (ax1, ax2, ax3) = plt.subplots(31, figsize=(1412))# 价格和报价ax1.plot(inventory_df['time'], inventory_df['market_price'],         label='市场价格', linewidth=2, alpha=0.7)ax1.plot(inventory_df['time'], inventory_df['bid_price'],         label='买报价', linewidth=1, alpha=0.7)ax1.plot(inventory_df['time'], inventory_df['ask_price'],         label='卖报价', linewidth=1, alpha=0.7)ax1.fill_between(inventory_df['time'],                 inventory_df['bid_price'],                 inventory_df['ask_price'],                alpha=0.2, color='gray', label='报价区间')ax1.set_ylabel('价格')ax1.set_title('市场价格与做市商报价', fontsize=14)ax1.legend()ax1.grid(True, alpha=0.3)# 库存变化ax2.plot(inventory_df['time'], inventory_df['inventory'],         label='库存', linewidth=2, color='orange')ax2.axhline(y=0, color='red', linestyle='--', alpha=0.5)ax2.set_ylabel('库存数量')ax2.set_title('做市商库存变化', fontsize=14)ax2.legend()ax2.grid(True, alpha=0.3)# 价差spread = inventory_df['ask_price'] - inventory_df['bid_price']ax3.plot(inventory_df['time'], spread, label='买卖价差', linewidth=2, color='green')ax3.set_xlabel('时间')ax3.set_ylabel('价差')ax3.set_title('买卖价差变化', fontsize=14)ax3.legend()ax3.grid(True, alpha=0.3)plt.tight_layout()plt.show()

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-01 06:43:43 HTTP/2.0 GET : https://f.mffb.com.cn/a/475940.html
  2. 运行时间 : 0.182786s [ 吞吐率:5.47req/s ] 内存消耗:4,447.35kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9f95d71db80fe2b9ef02dafe6e645321
  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.001014s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001651s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000746s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000709s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001337s ]
  6. SELECT * FROM `set` [ RunTime:0.000595s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001434s ]
  8. SELECT * FROM `article` WHERE `id` = 475940 LIMIT 1 [ RunTime:0.001140s ]
  9. UPDATE `article` SET `lasttime` = 1772318623 WHERE `id` = 475940 [ RunTime:0.002202s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000675s ]
  11. SELECT * FROM `article` WHERE `id` < 475940 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001004s ]
  12. SELECT * FROM `article` WHERE `id` > 475940 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001067s ]
  13. SELECT * FROM `article` WHERE `id` < 475940 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001742s ]
  14. SELECT * FROM `article` WHERE `id` < 475940 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002276s ]
  15. SELECT * FROM `article` WHERE `id` < 475940 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002044s ]
0.186489s