Skip to main content
QUICK REVIEW

[论文解读] QRtree -- Decision Tree dialect specification of QRscript

Stefano Scanzio, Matteo Rosani|arXiv (Cornell University)|Mar 7, 2024
QR Code Applications and Technologies被引用 4
一句话总结

QRtree 是 QRscript 的一种专用方言,用于使用一种称为 eQRtreebytecode 的紧凑二进制格式,将不含机会节点的决策树编码为可执行 QR 码(eQR 码)。它利用三地址码中间表示形式,并定义了用于 if、goto、print 和引用等指令的二进制编码方案,从而通过扫描 QR 码在移动设备或嵌入式设备上高效执行人类可读的决策逻辑。

ABSTRACT

This specification document specifies the syntax and semantics of QRtree, which is a specific dialect of QRscript particularly suited to represent decision trees without chance nodes. The term dialect identifies one of the possible sub-languages that can be encoded inside of an eQR code via QRscript. This specification will describe an intermediate representation of QRtree, made through a language derived by the three-address code. It will then define the transformation rules from the intermediate representation to a binary code. The latter is a binary representation called eQRtreebytecode. These rules can also be applied inversely to transform the eQRtreeBytecode into the intermediate representation. This specification document will pay particular attention to the creation of a compact eQRtreebytecode, as the maximum number of bits that can be stored in a QR code is, at the time of writing, equal to 2953 bytes (in the case of QR code version 40 with a "low" error correction level).

研究动机与目标

  • 定义一种标准化的、紧凑的 QRscript 专用方言,用于表示不含机会节点的决策树。
  • 实现将决策树逻辑编码为可在移动设备和嵌入式设备上部署的可执行 QR 码(eQR 码)。
  • 建立一种二进制字节码格式(eQRtreebytecode),以支持在 QR 码约束条件下对决策树逻辑进行高效存储和执行。
  • 通过对外部内容的引用支持人类可读的决策逻辑,从而减少 QR 码的有效载荷大小。

提出的方法

  • 为决策树逻辑定义三地址码中间表示形式,以实现标准化转换。
  • 引入一种二进制编码方案(eQRtreebytecode),将中间表示形式转换为紧凑且与 QR 码兼容的格式。
  • 指定 QRtree 头部,包含类型标识符(例如,INT_TYPE、FLOAT_TYPE、DICT_TYPES),以管理数据类型和结构。
  • 支持直接和间接的输入处理,包括对外部数据的引用,以最小化有效载荷大小。
  • 对整数使用指数编码,并对指令(例如,if、goto、print)使用特定的位模式,以优化空间使用。
  • 定义从 eQRtreebytecode 到中间表示形式的可逆转换规则,以便在虚拟机上执行。

实验结果

研究问题

  • RQ1如何使用标准化格式,在 QR 码的存储限制内高效编码决策树逻辑?
  • RQ2何种二进制编码策略可最小化有效载荷大小,同时保持 eQR 码中决策树的可读性和执行效率?
  • RQ3如何在不增加有效载荷大小的前提下,将对外部内容(例如,图像、URL)的引用集成到 QR 码中?
  • RQ4何种机制可确保在不同设备上对编码的决策树逻辑实现向后兼容性和正确解释?
  • RQ5如何将三地址码中间表示形式映射为紧凑的、机器可读的字节码,以实现 QR 码执行?

主要发现

  • QRtree 专用方言通过标准化的紧凑二进制格式(eQRtreebytecode)实现了不含机会节点的决策树表示,该格式适用于 QR 码存储。
  • 该规范支持在 QR 码版本 40 的 2953 字节限制内,高效编码控制流(例如,if、goto)和数据类型(INT16、INT32、FP16、FP32、UTF-8 字符串)。
  • 通过使用引用,可将外部数据(例如,图像、视频)链接到 QR 码而不将其包含在内,从而显著减少有效载荷大小。
  • 该规范定义了从 eQRtreebytecode 到中间三地址码表示形式的可逆转换,以便在虚拟机上执行。
  • 对整数使用指数编码可减少大整数值所需的位数,提高空间效率。
  • 一个示例实现已以 GPL-3.0 许可证发布,验证了该规范的可行性和正确性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。