Application Insights 如何推断客户端的设备型号?

How does Application Insights infer the client's device model?

我想知道 Application Insights 如何推断客户端的 device model,因为 Microsoft 文档没有说明使用的是什么方法。显然,他们必须从客户端的用户代理字符串中提取它,但他们是否使用某种复杂的 ML 算法来 class 化设备模型?或者他们只是应用一些基于正则表达式的逻辑?

我问是因为我不确定这些信息的可靠性,我正在考虑将其用作自己的 multi-class classifier 的标准化输入以对用户代理分为四个 classes(移动、桌面、平板电脑、未知)。

Application Insights 使用名为 UA-Parser 的 OSS 组件。这使用 RegEx 解析 UserAgent 字符串以导出用于 device.model 的设备信息。解析发生在 Application Insight 的摄取服务中。

GitHub 项目如下所示: https://github.com/ua-parser/uap-ref-impl