This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
2020-11-24 16:51:10 +08:00
2020-11-24 16:51:10 +08:00
2020-11-17 17:39:05 +08:00
2020-11-24 09:40:33 +08:00
2020-11-24 16:51:10 +08:00

UaAnalyser

根据user-agent分析ip对应的终端个数情况及相关信息

Input

String inputString = "69765" + "\t" +      // userId
                "192.168.50.13" + "\t" +       // ip
                "1765433230" + "\t" +         // timeStamp
                "'Dalvik/1.6.0 (Linux; U; Android 4.0.3; LG-E612f Build/IML74K)':4, " +
                "'Dalvik/2.1.0 (Linux; U; Android 10; TNYAL00 Build/HUAWEITNY-AL00)':4, " +
                "'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77 ===  iOS/11.4.1 Model/iPhone10,1 BundleID/com.xunmeng.pinduoduo AppVersion/5.32.0 AppBuild/2009212125 pversion/1221 cURL/7.48.0':5, " +
                "'com.apple.trustd/1.0':1, " +
                "'server-bag [iPhone OS,13.6.1,17G80,iPhone10,2]':1, " +
                "'Microsoft-CryptoAPI/10.0':1, " +
                "'Mozilla/5.0 (Linux; Android 10; SM-G9600) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.110 Mobile Safari/537.36':10, " +
                "'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36':1";             // uaCntInfo

Output

// 相关字段:
// osCnt, browserCnt, deviceCnt, terminalCnt, terminalCatCnt, 
// osList, browserList, deviceList, terminalList, terminalCatList
userInfo.getTerminalList(); // 获取terminalList字段值
  • osCnt -操作系统数
  • browserCnt-浏览器数
  • deviceCnt-设备名数(如 "LG E612F"
  • terminalCnt-终端三元组标识数os/browser/device
  • terminalCatCnt-终端类别数类别包括windows, apple, android三种

Usage

UaAnalyser uaAnalyser = new UaAnalyserImpl();
UserInfo userInfo = uaAnalyser.getUserinfo(inputString);
Description
No description provided
Readme 1.1 MiB
Languages
Java 100%