01
Hologres 让图片、语音、视频变成结构化洞察当非结构化数据成为企业的"暗物质"
据 IDC 估算,企业中超过 80% 的数据以非结构化形式存在——监控视频、产品图片、扫描文档、音频录音。这些数据蕴含巨大的业务价值,但传统分析手段对它们束手无策。
数据团队通常面临两难选择:要么花费数周搭建独立的 ML 管道,将非结构化数据"翻译"成可分析的格式;要么干脆放弃,让这些数据继续沉睡在对象存储中。
Hologres 的多模态 AI 分析能力,正在改变这一局面。
02
市面上不乏多模态 AI 能力,但 Hologres 的独特之处在于:将多模态理解直接嵌入 SQL 执行引擎。这意味着——
零迁移成本:数据分析师无需学习 Python、无需部署模型服务、无需维护 ETL 管道,一条 SQL 搞定从"原始图片"到"结构化报表"的全链路。
Schema 级别的输出保证:通过 JSON Schema 约束模型输出,确保每一行结果都是类型安全、可解析的结构化 JSON,可以直接 JOIN 回业务表参与后续分析。
批量处理,数仓级吞吐:避免对多模态数据无效拷贝,而是对整张表的文件列批量推理,充分发挥 Hologres 的并行计算能力。
03
Hologres 提供 ai_gen_structured 的 AI Function,可从多模态数据中提取出结构化的 json 数据。
场景一:批量票据信息提取
财务团队每月收到数千张发票图片,过去靠人工录入或传统 OCR + 规则引擎。现在:
SELECTfile_name,ai_gen_structured(model_name => 'qwen3.7-plus',message => '提取该发票中的关键字段',input_file => invoice_image,response_format => '{"type": "json_schema","schema": {"type": "object","properties": {"invoice_number": {"type": "string"},"issue_date": {"type": ["string", "null"], "format": "date"},"total_amount": {"type": "number"},"vendor_name": {"type": "string"},"tax_amount": {"type": "number"}},"required": ["invoice_number", "issue_date", "total_amount", "vendor_name", "tax_amount"],"additionalProperties": false}}'::json) AS extracted_infoFROM finance.invoice_object_tableWHERE month = '2025-05';
示例输出:
{"invoice_number": "SH-2025-003721", "issue_date": "2025-05-12", "total_amount": 28600.00, "vendor_name": "杭州云端科技有限公司", "tax_amount": 2634.51}
一条 SQL,数千张发票 → 结构化表格,直接灌入财务系统。
场景二:商品图片质检与属性标注
电商平台需要对海量商品主图进行合规检查和属性提取:
SELECTproduct_id,ai_gen_structured(model_name => 'qwen3.7-plus',message => '分析商品图片,判断是否合规并提取视觉属性',input_file => main_image,response_format => '{"type": "json_schema","schema": {"type": "object","properties": {"has_watermark": {"type": "boolean"},"background_color": {"type": "string"},"dominant_color": {"type": "string"},"contains_text_overlay": {"type": "boolean"},"compliance_status": {"type": "string", "enum": ["pass", "warning", "reject"]},"reject_reason": {"type": ["string", "null"]}},"required": ["has_watermark", "background_color", "dominant_color", "contains_text_overlay", "compliance_status", "reject_reason"],"additionalProperties": false}}'::json) AS review_resultFROM catalog.product_imagesWHERE category = 'clothing';
示例输出:
{"has_watermark": false, "background_color": "white", "dominant_color": "navy blue", "contains_text_overlay": true, "compliance_status": "warning", "reject_reason": "图片包含促销文字覆盖,建议使用纯净商品图"}
场景三:视频内容理解与标签生成
安防、零售、制造场景中,视频是最重要的非结构化数据源:
SELECTcamera_id,capture_time,ai_gen_structured(model_name => 'qwen3.7-plus',message => '分析该监控片段,识别场景中的异常事件',input_file => video_clip,response_format => '{"type": "json_schema","schema": {"type": "object","properties": {"person_count": {"type": "integer"},"has_abnormal_event": {"type": "boolean"},"event_type": {"type": ["string", "null"], "enum": ["intrusion", "fall_detection", "crowd_gathering", "equipment_damage", null]},"confidence_score": {"type": "number"},"scene_description": {"type": "string"}},"required": ["person_count", "has_abnormal_event", "event_type", "confidence_score", "scene_description"],"additionalProperties": false}}'::json) AS event_analysisFROM security.video_clipsWHERE capture_date = CURRENT_DATE;
示例输出:
{"person_count": 3, "has_abnormal_event": true, "event_type": "crowd_gathering", "confidence_score": 0.87, "scene_description": "仓库西侧通道有3人聚集,未佩戴安全帽,疑似非授权区域逗留"}
场景四:客服通话录音质检与洞察
客服中心每天产生数万条通话录音,传统质检依赖人工抽检,覆盖率不足 5%。借助 Hologres 多模态分析,可以对全量录音进行自动化质检:
SELECTcall_id,agent_id,call_duration,ai_gen_structured(model_name => 'qwen3.5-omni-plus',message => '分析该客服通话录音,评估服务质量并提取关键信息',input_file => audio_recording,response_format => '{"type": "json_schema","schema": {"type": "object","properties": {"customer_sentiment": {"type": "string", "enum": ["satisfied", "neutral", "frustrated", "angry"]},"agent_politeness_score": {"type": "number"},"issue_category": {"type": "string", "enum": ["billing", "product_defect", "delivery", "refund", "consultation", "complaint"]},"resolved": {"type": "boolean"},"escalation_needed": {"type": "boolean"},"summary": {"type": "string"}},"required": ["customer_sentiment", "agent_politeness_score", "issue_category", "resolved", "escalation_needed", "summary"],"additionalProperties": false}}'::json,on_error => 'skip') AS quality_reviewFROM callcenter.recording_object_tableWHERE call_date = CURRENT_DATE;
示例输出:
{"customer_sentiment": "frustrated", "agent_politeness_score": 8.5, "issue_category": "delivery", "resolved": true, "escalation_needed": false, "summary": "客户反馈快递延迟3天未送达,坐席核实后安排优先补发并赠送运费券,客户接受方案"}
从 5% 抽检到 100% 全覆盖,质检结果直接关联坐席绩效表,异常通话自动触发工单升级——过去需要一整套质检系统才能完成的事,现在一条 SQL 即可。
场景五:文本字段的批量结构化提取
除了图片、视频、音频等多模态文件,企业数据库中还沉淀着大量自由格式的文本字段——工单备注、物流签收记录、医疗病历摘要、用户反馈留言。这些文本蕴含丰富的业务语义,却因为格式不统一而无法直接用于统计分析。
ai_gen_structured 同样支持纯文本输入(无需 input_file 参数),可以直接对表中的 TEXT 列进行批量结构化提取:
SELECTorder_id,customer_id,raw_feedback,ai_gen_structured(model_name => 'qwen3.7-plus',message => prompt('从以下用户反馈文本中提取结构化信息:{0}', raw_feedback)::text,response_format => '{"type": "json_schema","schema": {"type": "object","properties": {"product_mentioned": {"type": ["string", "null"], "description": "提及的商品名称"},"issue_type": {"type": "string", "enum": ["quality_defect", "size_mismatch", "logistics_damage", "description_inconsistency", "other"]},"sentiment": {"type": "string", "enum": ["positive", "neutral", "negative"]},"wants_refund": {"type": "boolean"},"key_complaint": {"type": "string", "description": "一句话总结核心诉求"}},"required": ["product_mentioned", "issue_type", "sentiment", "wants_refund", "key_complaint"],"additionalProperties": false}}'::json) AS structured_feedbackFROM ecommerce.order_feedbackWHERE feedback_date >= '2025-05-01'AND raw_feedback IS NOT NULL;
示例输入(raw_feedback 字段内容):
买的那件亚麻衬衫,洗了一次就缩水严重,袖子短了一大截,和详情页描述的"免烫抗缩"完全不符。要求退货退款,太失望了。
示例输出:
{"product_mentioned": "亚麻衬衫", "issue_type": "description_inconsistency", "sentiment": "negative", "wants_refund": true, "key_complaint": "商品洗后严重缩水,与详情页宣传的免烫抗缩不符,要求退货退款"}
与多模态场景的关键差异:纯文本提取无需 input_file 参数,直接将文本内容拼接到 message 中即可。这使得对已有业务表中的任意 TEXT 列进行批量结构化治理变得极为简单——无需数据导出、无需额外 ETL,原地完成从"自由文本"到"可计算字段"的转化。
典型应用场景包括:
历史工单治理:从数百万条自由文本工单中批量提取故障类型、影响范围、处理结论
地址信息解析:将非标准格式地址拆分为省、市、区、街道、门牌号等标准字段
简历信息提取:从原始简历文本中提取教育经历、工作年限、技能标签等结构化字段
合同条款解析:从合同文本中抽取关键条款(金额、期限、违约责任)供风控分析
04
1. 结构化输出:从"自由文本"到"可计算数据"
大多数 AI 分析工具返回的是自由文本——你需要额外的解析逻辑来提取有用信息。Hologres 的 ai_gen_structured 通过 JSON Schema 强约束,确保模型输出严格遵循预定义的字段、类型和枚举值。这不是"尽力而为",而是"格式保证"。
这意味着 AI 分析的结果可以直接:
与业务表 JOIN 关联
进入 BI 看板展示
触发下游自动化工作流
2. 数据不出仓:安全合规无忧
传统做法是将图片/视频导出到外部 平台处理,再将结果回灌。数据在多个系统间流转,安全审计复杂度呈指数级增长。
Hologres 的方案是 AI 推理在数据仓库内完成——数据不搬家,模型来数据旁边计算。企业无需为多模态分析开辟额外的数据出口通道,天然满足数据安全与合规要求。
3. 企业级容错:不因一张坏图丢掉全部结果
生产环境中,数据质量参差不齐——损坏的图片、格式异常的文件、模型偶发超时。Hologres 提供三级容错策略:
|
|
|
不需要在应用层写 try-catch,数据库引擎替你兜底。
05
传统多模态分析项目的典型路径是:调研模型 → 搭建推理服务 → 开发 ETL → 对接数仓 → 上线监控,周期以月计。
在 Hologres 中,这个路径被压缩为:
写一条 SQL → 验证结果 → 部署为定时任务/dynamic table
数据团队在分钟级内就能验证一个多模态分析想法是否可行,并在同一天将其投入生产。这种从"灵感"到"产出"的极短路径,正是数据驱动型组织真正需要的能力。
06
多模态数据分析不应该是少数 ML 工程师的专属能力。Hologres 将其民主化为每一位懂 SQL 的数据从业者都能使用的工具——无需额外基础设施、无需新技能栈、无需数据搬迁。
让非结构化数据不再沉默,让每一张图片、每一段视频、每一通录音都成为可查询、可计算、可决策的数据资产。
想深入了解更多 Hologres AI 函数能力?
欢迎加入 Hologres 技术交流群,与产品、架构、解决方案专家直接对话!
(扫码入群 👇)

立即免费试用 Hologres:
无需预付费用,按实际查询量付费,新用户还可享免费额度!
(新用户扫码领取 👇)

/ END /

