This commit is contained in:
zhongluofeng committed 2026-11-06 15:07:02 +08:00
1 parent 787544eec1
commit 4ff9146910
81 files changed
+18417 -545

No files matched your search

+173 -56
View File
@@ -2,6 +2,8 @@ import { DatabaseSync } from 'node:sqlite';
import { existsSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';
import { dirname, join } from 'node:path';
if (existsSync('.env')) process.loadEnvFile('.env');
const DB_PATH = process.env.DB_PATH ?? 'data/app.db';
const now = new Date().toISOString();
@@ -38,11 +40,14 @@ const soc = {
},
{
name: '性能核',
cores: [{ microArch: 'Cortex-A720', count: 3, clockMax: '3.15 GHz', l2: '512 KB' }],
cores: [
{ microArch: 'Cortex-A720', count: 3, clockMax: '3.15 GHz', l2: '512 KB' },
{ microArch: 'Cortex-A720', count: 2, clockMax: '2.96 GHz', l2: '512 KB' },
],
},
{
name: '能效核',
cores: [{ microArch: 'Cortex-A520', count: 2, clockMax: '2.27 GHz', l2: '256 KB' }],
cores: [{ microArch: 'Cortex-A520', count: 2, clockMax: '2.27 GHz', l2: '512 KB' }],
},
],
gpuBlock: {
@@ -52,6 +57,7 @@ const soc = {
apis: ['Vulkan 1.3', 'OpenGL ES 3.2', 'OpenCL 2.0'],
},
npuBlock: { name: 'Hexagon NPU', tops: '约 45 TOPS (INT8)' },
systemCache: '6 MB',
ispBlock: 'Spectra 18-bit',
modemBlock: 'Snapdragon X75 5G',
memorySupport: { type: 'LPDDR5X', maxClock: '4800 MHz', bandwidth: '76.8 GB/s' },
@@ -59,9 +65,12 @@ const soc = {
displaySupport: '最高 4K@60Hz / QHD+@144Hz',
videoCodec: { encode: ['H.264', 'H.265', 'AV1'], decode: ['H.264', 'H.265', 'AV1'] },
benchmarks: [
{ name: 'Geekbench 6 单核', score: '2200', unit: 'pts' },
{ name: 'Geekbench 6 多核', score: '6800', unit: 'pts' },
{ name: '安兔兔 V10', score: '2100000', unit: 'pts' },
{ name: 'Geekbench 5 单核', score: '1700', unit: 'pts' },
{ name: 'Geekbench 5 多核', score: '6600', unit: 'pts' },
{ name: 'Geekbench 6 单核', score: '2300', unit: 'pts' },
{ name: 'Geekbench 6 多核', score: '7400', unit: 'pts' },
{ name: '安兔兔 V10', score: '2200000', unit: 'pts' },
{ name: '安兔兔 V11', score: '2300000', unit: 'pts' },
],
extra: {},
},
@@ -90,51 +99,82 @@ const phone = {
chipRefs: { soc: 'snapdragon-8-gen-3' },
specs: {
body: {
dimensions: '152.8 x 71.5 x 8.2 mm',
weight: '188 g',
build: { front: '康宁大猩猩 Victus', back: '玻璃', frame: '铝合金' },
sim: 'Nano-SIM + eSIM',
dimensions: '152.8 x 71.5 x 8.20 mm(玻璃)/ 8.28 mm(科技纳米皮)',
weight: '193 g(玻璃)/ 188 g(科技纳米皮)',
build: { front: '康宁大猩猩 Victus 2', back: '玻璃 / 科技纳米皮', frame: '铝合金边框' },
sim: '2 × Nano-SIM',
ipRating: 'IP68',
colors: ['黑色', '白色', '岩石青', '雪山粉'],
buttons: '右侧电源 + 音量',
cooling: '环形冷泵散热系统',
},
display: {
size: '6.36 英寸',
resolution: '2670 x 1200',
aspectRatio: '20:9',
panel: 'LTPO AMOLED',
refreshRate: '120Hz',
cutout: '中孔',
aspectRatio: '20.0:9',
panel: 'OLED',
vendor: '华星光电(TCL 华星)',
technology: 'C8 发光材质',
refreshRate: '120Hz 自适应',
refreshRange: '1-120Hz',
touchSampling: '300Hz',
refreshNote: 'LTPO 1-120Hz 自适应刷新率',
touchSampling: '240Hz',
touchSamplingInstant: '最高 2160Hz',
colorDepth: '12bit / 687 亿色',
colorGamut: 'DCI-P3',
pixelDensity: '460 PPI',
equivalentPpi: '375 PPI',
screenBodyRatio: '89.3%',
bezel: '侧边 2.64mm,上+下 5.45mm',
width16x9: '5.34 英寸',
brightnessTypical: '600 nit',
brightnessPeak: '3000 nit',
hdr: 'HDR10+ / Dolby Vision',
protection: '康宁大猩猩 Victus',
hdr: 'HDR10+ / HDR Vivid / Dolby Vision',
protection: '康宁大猩猩 Victus 2',
pwmDimming: '1920Hz PWM',
alwaysOn: true,
features: [
'专业原色屏',
'超动态显示',
'柔性直屏',
'前后双光感',
'心率检测',
'莱茵低蓝光认证',
'支持类DC调光',
'支持环境色温调节',
],
},
platform: { os: 'Android 14', skin: 'HyperOS', chipset: 'Snapdragon 8 Gen 3' },
platform: { os: 'Android 14', skin: 'Xiaomi HyperOS', chipset: 'Snapdragon 8 Gen 3' },
memory: {
ram: '8 / 12 / 16 GB',
ramType: 'LPDDR5X',
ramType: 'LPDDR5X 8400 MT/s(4 × 16bit)',
storage: '256 / 512 GB / 1TB',
storageType: 'UFS 4.0',
storageSpeed: '约 4.2 GB/s 顺序读取',
cardSlot: '无',
},
rearCamera: [
{
position: 'wide',
sensorModel: 'OmniVision OV50H',
resolution: '50MP',
sensorAlias: '光影猎人 900',
resolution: '50MP(默认合 1 输出 1250 万像素)',
aperture: 'f/1.6',
focalLength: '23mm',
sensorSize: '1/1.31"',
pixelSize: '1.2µm',
lensElements: '7P',
ois: true,
eis: true,
zoom: '1x',
autofocusType: '双像素 PDAF',
video: { max: '8K@24fps', modes: ['4K@60fps', '1080p@240fps 慢动作'], stabilization: 'OIS + EIS' },
autofocusType: '全像素全向对焦 + 激光对焦',
video: {
max: '8K@24fps',
modes: ['4K@60fps HDR10+ 录像', '1080p@240fps 慢动作', '电影模式'],
stabilization: 'OIS + EIS',
},
flash: '双色温 LED 闪光灯',
extra: {},
},
{
@@ -142,13 +182,13 @@ const phone = {
sensorModel: 'Samsung S5KJN1',
resolution: '50MP',
aperture: 'f/2.0',
focalLength: '75mm',
focalLength: '75mm(60mm 裁切)',
sensorSize: '1/2.76"',
pixelSize: '0.64µm',
lensElements: '6P',
ois: true,
zoom: '3.2x 光学 / 60x 数码',
autofocusType: 'PDAF',
zoom: '2.6x 光学(60mm)/ 3.2x(75mm)',
autofocusType: 'PDAF + 10cm 以上自动对焦',
extra: {},
},
{
@@ -160,6 +200,7 @@ const phone = {
sensorSize: '1/2.76"',
pixelSize: '0.64µm',
lensElements: '6P',
fov: '115°',
ois: false,
zoom: '0.6x',
extra: {},
@@ -168,22 +209,23 @@ const phone = {
frontCamera: [
{
position: 'front',
sensorModel: 'OmniVision OV32C',
sensorModel: 'OmniVision OV32B',
resolution: '32MP',
aperture: 'f/2.0',
focalLength: '22mm',
sensorSize: '1/3.14"',
video: { max: '1080p@30fps', modes: [], stabilization: 'EIS' },
pixelSize: '0.7µm',
video: { max: '4K@60fps', modes: [], stabilization: 'EIS' },
extra: {},
},
],
vibration: { type: 'X 轴线性马达', model: 'AAC 0809', size: '0809' },
vibration: { type: 'X 轴线性马达', model: '瑞声 0809B', size: '0809', volume: '约 1.0 cm³' },
speakers: {
count: 2,
stereo: true,
units: [
{ model: 'AAC 1116', size: '11 x 16 mm' },
{ model: 'AAC 1012', size: '10 x 12 mm' },
{ position: 'top', label: '上', model: 'AAC 1115K', size: '11 × 15 mm' },
{ position: 'bottom', label: '下', model: 'AAC 1014', size: '10 × 14 mm' },
],
dolbyAtmos: true,
hiRes: true,
@@ -191,12 +233,17 @@ const phone = {
headphoneJack: false,
},
connectivity: {
cellular: '5G Sub-6 / mmWave',
wifi: 'Wi-Fi 7 (802.11be)',
bluetooth: '5.4, LDAC / LHDC 5.0',
cellular: '5G 双模双卡双通',
bands: ['n1', 'n3', 'n5', 'n8', 'n28a', 'n38', 'n41', 'n77', 'n78', 'B1', 'B3', 'B5', 'B8', 'B34', 'B38', 'B39', 'B40', 'B41'],
satellite: false,
satelliteBands: [],
wifi: 'Wi-Fi 7(802.11be),2.4 / 5 / 6 GHz,2×2 MIMO,MLO 2.0,8×8 Sounding MU-MIMO,Wi-Fi Direct / Miracast',
bluetooth: '5.4,Dual-Bluetooth,AAC / AptX / AptX HD / AptX Adaptive / LDAC / LHDC 5.0',
nfc: true,
gps: 'L1 + L5 双频',
usb: 'USB 3.2 Gen 1 Type-C',
gps: '北斗 B1I + B1C + B2a,GPS L1 + L5,Galileo E1 + E5a,GLONASS G1,QZSS L1 + L5,NavIC L5,AGNSS',
usb: 'USB 3.2 Gen 1 Type-C(双面椭圆口)',
usbSpeed: '5 Gbps',
usbVideoOut: true,
ir: true,
uwb: false,
},
@@ -206,23 +253,76 @@ const phone = {
wired: '90W',
wireless: '50W',
reverse: '10W',
chargingProtocol: '小米澎湃 P1 + G1',
chargingProtocol: 'QC4 / QC3+ / QC3.0 / QC2.0 / PD3.0 / PD2.0 / 小米 FC 2.0 快充',
},
sensors: {
fingerprint: '屏下光学指纹',
fingerprint: '短焦屏下指纹识别',
fingerprintType: '光学',
fingerprintPosition: '屏下短焦',
gyro: true,
barometer: true,
colorSensor: true,
flickerSensor: true,
list: [
'距离传感器',
'屏下环境光(色温)传感器',
'后置环境光(色温)传感器',
'加速度传感器',
'陀螺仪',
'电子罗盘',
'红外线遥控器',
'flicker 传感器',
'激光对焦传感器',
'气压计',
'NFC',
],
},
software: {
launchVersion: 'Android 14 / HyperOS 1.0',
currentVersion: 'Android 14 / HyperOS 1.0',
launchVersion: 'Xiaomi HyperOS',
currentVersion: 'Android 15 / HyperOS 2.0',
updatePolicy: '4 代大版本 + 5 年安全更新',
updateTimeline: [
'2024-06-01 HyperOS 1.0.12(Android 14)',
'2025-01-15 HyperOS 2.0(Android 15)',
],
},
features: [
'轻薄小屏旗舰',
'5G 双模双卡双通',
'120Hz 自适应刷新率',
'IP68 防尘防水',
'4 麦克风',
'双扬声器(1014 + 1115K)',
'徕卡影像',
],
cameraFeatures: [
'徕卡影像',
'4K@60fps HDR10+ 录像',
'前后双景',
'10bit 色彩',
'13.5EV 高动态范围',
'电影模式',
],
benchmarks: [
'Geekbench 5 单核 1700',
'Geekbench 5 多核 6600',
'Geekbench 6 单核 2300',
'Geekbench 6 多核 7400',
'GFXBench 曼哈顿 3.1 High 95.0 fps',
'GFXBench Aztec Ruins High 95.0 fps',
'综合效能(CPU GB5 + GPU)80550',
'3DMark Wild Life Unlimited 19500',
'3DMark Wild Life Extreme 5250',
'3DMark Solar Bay 8650',
'安兔兔 V10 2200000',
'安兔兔 V11 2300000',
],
pricing: ['8GB+256GB 3999 元', '12GB+256GB 4299 元', '16GB+512GB 4599 元', '16GB+1TB 4999 元'],
officialUrl: 'https://www.mi.com/xiaomi-14',
extra: {
备注: '厚度 8.20mm(玻璃版)/ 8.28mm(科技纳米皮版);重量 193g(玻璃版)/ 188g(科技纳米皮版)',
耳机接口: 'USB Type-C(与充电口共用)',
},
extra: {},
},
meta: [
{
@@ -238,6 +338,19 @@ const phone = {
verified: false,
capturedAt: now,
},
{
path: 'specs.display.vendor',
confidence: 'high',
sourceUrl: 'https://www.mi.com/xiaomi-14/specs',
verified: true,
capturedAt: now,
},
{
path: 'specs.benchmarks',
confidence: 'low',
verified: false,
capturedAt: now,
},
],
};
@@ -250,24 +363,28 @@ const deviceCols = [
'created_at', 'updated_at',
];
const deviceValues = [
phone.slug, phone.category, null, phone.brand, phone.model,
JSON.stringify(phone.aliases), phone.announceDate ?? null, phone.releaseDate ?? null,
phone.lifecycle, null, JSON.stringify(phone.gallery ?? []),
JSON.stringify(phone.tags ?? []), phone.summary ?? null, JSON.stringify(phone.specs),
JSON.stringify(phone.chipRefs ?? {}), JSON.stringify(phone.meta ?? []), now, now,
];
const seedDevices = [phone, ...JSON.parse(readFileSync('scripts/seed-devices.json', 'utf8'))];
db.prepare(
`INSERT INTO devices (${deviceCols.join(', ')}) VALUES (${deviceCols.map(() => '?').join(', ')})
ON CONFLICT(slug) DO UPDATE SET
category = excluded.category, brand = excluded.brand, model = excluded.model,
aliases_json = excluded.aliases_json, announce_date = excluded.announce_date,
release_date = excluded.release_date, lifecycle = excluded.lifecycle,
tags_json = excluded.tags_json, summary = excluded.summary,
specs_json = excluded.specs_json, chip_refs_json = excluded.chip_refs_json,
meta_json = excluded.meta_json, updated_at = excluded.updated_at`,
).run(...deviceValues);
for (const device of seedDevices) {
const deviceValues = [
device.slug, device.category, device.subCategory ?? null, device.brand, device.model,
JSON.stringify(device.aliases ?? []), device.announceDate ?? null, device.releaseDate ?? null,
device.lifecycle, device.cover ?? null, JSON.stringify(device.gallery ?? []),
JSON.stringify(device.tags ?? []), device.summary ?? null, JSON.stringify(device.specs),
JSON.stringify(device.chipRefs ?? {}), JSON.stringify(device.meta ?? []), now, now,
];
db.prepare(
`INSERT INTO devices (${deviceCols.join(', ')}) VALUES (${deviceCols.map(() => '?').join(', ')})
ON CONFLICT(slug) DO UPDATE SET
category = excluded.category, brand = excluded.brand, model = excluded.model,
aliases_json = excluded.aliases_json, announce_date = excluded.announce_date,
release_date = excluded.release_date, lifecycle = excluded.lifecycle,
tags_json = excluded.tags_json, summary = excluded.summary,
specs_json = excluded.specs_json, chip_refs_json = excluded.chip_refs_json,
meta_json = excluded.meta_json, updated_at = excluded.updated_at`,
).run(...deviceValues);
}
const chipCols = [
'slug', 'type', 'brand', 'model', 'codename', 'aliases_json',
@@ -288,5 +405,5 @@ db.prepare(
JSON.stringify(soc.detail), JSON.stringify(soc.meta ?? []), now, now,
);
console.log('种子数据写入完成:xiaomi-14 / snapdragon-8-gen-3');
console.log(`种子数据写入完成:${seedDevices.map((device) => device.slug).join(' / ')} / snapdragon-8-gen-3`);
db.close();