日期:2026-03-20
目的:定義發票、channel_master、群眾蒐集與既有分類系統,如何匯入
item master 的證據層。 相關文件:
channel_master 與 crowd 都先進證據層,不直接長成
BI / SI。observed_at 或
valid_from / valid_to。mapping_tier;item_tier
在建立 BI / SI 後預設為
銅級,再逐步升級。| 來源 | 主要落點 | 角色 |
|---|---|---|
| 發票 | invoice_lines、invoice_name_clusters、cluster_members |
主輸入 |
channel_master |
evidence_observations |
候選與證據 |
| crowd | review_tasks、review_answers、evidence_observations |
人工輔助證據 |
| 既有品牌與分類系統 | brand_hint、category_hint、未來的 taxonomy
關聯表 |
提示與先驗 |
invoice_linesinvoice_name_clusterscluster_members| 發票欄位 | 目標欄位 |
|---|---|
| 商家 | merchant_code |
| 通路 | channel_code |
| 店名 | store_name |
| 統編 | store_tax_id |
| 發票號碼 | invoice_id |
| 品名 | raw_pn |
| 日期 | invoice_date |
| 數量 | quantity |
| 金額 | amount |
invoice_lines
保留原始字串,不在此層硬做正規化映射。invoice_name_clusters
預設以商家為範圍聚類;必要時再細化到店點。brand_hint、category_hint。channel_master 匯入evidence_observationschannel_master 直接當成
SI。BI / SI。channel_master 欄位 |
evidence_observations 欄位 |
|---|---|
| source channel | source_channel |
| 來源記錄代碼 / 網址 | source_record_id、source_url |
| merchant | merchant_code |
| raw_product_name | raw_name |
| normalized_name | normalized_name |
| barcode | barcode |
| barcode_class | barcode_class |
| risk_flags | risk_flags |
| item_level_hint | item_level_hint |
| item_level_hint_reason | payload.item_level_hint_reason |
| image url | image_url |
| brand | brand_hint |
| category | category_hint |
| package form | package_form |
| 規格 / 容量 | net_content_value、net_content_uom |
| crawl date | observed_at |
item_level_hint 是 evidence-level hint,不是最終
item_level 定案;若與其他證據衝突,應保留於證據層並交由
Silver / review 決定。
restricted_prefixisbn_prefixplaceholder_barcodebundle_textcarton_textname_conflict如果無法判定,不要假設乾淨,請標成待審核風險。
review_tasksreview_answersevidence_observations這套系統的角色不是 BI / SI 真值來源,而是:
brand_hintcategory_hint第一階段建議先接到:
base_items.brandbase_items.categoryinvoice_name_clusters.brand_hintinvoice_name_clusters.category_hintsource_record_id 或
fingerprint。merchant_code + invoice_id + raw_pn + amount
當初始去重鍵。channel_master 可用
source_channel + source_record_id + observed_at::date
當近似去重鍵。review_task_id + answered_by + answered_at::date
做去重參考。mapping_tier在清整與匯入過程中,最值得先標的是 mapping_tier:
銅級銀級金級item_tieritem_tier 建議不要一開始就要求很細:
BI / SI:預設 銅級銀級金級invoice_date:實際購買時間observed_at:證據被收集到的時間valid_from / valid_to:這筆證據或關聯被視為有效的時間區間當條碼有歷史重用時,要用有效期間切開,而不是覆蓋舊關係。
channel_master -> evidence_observations。所有來源都先進證據層,只有通過打分與審核的結果,才往上長成
BI / SI。