Codeofchina.com is in charge of this English translation. In case of any doubt about the English translation, the Chinese original shall be considered authoritative.
This standard is developed in accordance with the rules given in GB/T 1.1-2009.
This standard was proposed by the GS1 China.
This standard is under the jurisdiction of National Technical Committee on Logistics Information Management of Standardization Administration of China (TC 267).
Two dimensional code for commodity
1 Scope
This standard specifies the data structure, information service and symbol printing quality requirements and other technical requirements of the two dimensional code for commodity.
This standard is applicable to the management, application and service of the two dimensional code for commodity.
2 Normative references
The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition (including any amendments) applies.
GB/T 1988 Information technology—7-bit Coded character set for information interchange
GB 12904 Bar code for commodity—Retail commodity numbering and bar code marking
GB/T 12905-2000 Bar coding terminology
GB/T 14257 Bar code for commodity—Bar code symbol placement guidelines
GB/T 16986-2009 Bar code for commodity—Application identifier
GB/T 18284 QR code
GB/T 21049 Chinese-sensible code
GB/T 23704 Information technology—Automatic identification and data capture techniques—Bar code print quality test specification—Two-dimensional symbols
ISO/IEC 16022 Information technology—Automatic identification and data capture (AIDC) techniques—Data Matrix bar code symbology specification
RFC 1738 Uniform Resource Locators(URL)
RFC 3986 Uniform Resource Identifier (URL): Generic Syntax
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
3.1
two dimensional code
two dimensional bar code
bar code symbol that represents information in both two dimensional direction
[GB/T 12905-2000, Definition 2.54]
3.2
application identifier; AI
character that identifies the meaning and format of data, which shall consist of 2 to 4 digits
[GB/T 16986-2009, Definition 3.1]
3.3
two dimensional code for commodity
two dimensional code used to identify commodity and its characteristic attributes, commodity-related websites and other information
4 Symbols, codes and abbreviations
For the purpose of this document, the following symbols, codes and abbreviations apply.
FNC1 Function 1
GS1 Globe Standard 1
GTIN Global Trade Item Number
OWS Object Web Service
URI Uniform Resource Identifier
URL Uniform Resource Locater
5 Data structure of two dimensional code for commodity
5.1 Data structure type
The data structure of the two dimensional code for commodity is classified into encoded data structure, unified national website data structure and vendor-defined website data structure. See 5.2 for the encoded data structure; 5.3 for the unified national website data structure; 5.4 for the vendor-defined website data structure.
5.2 Encoded data structure
5.2.1 Composition of encoded data structure
The encoded data structure shall consist of one or more element strings taken from Table 1 in sequence. Each element string shall consist of a GS1 application identifier (AI) and a GS1 application identifier (AI) data field. The GS1 application identifier and GS1 application identifier data fields for the extended data item are taken from Table A.1 in Annex A. Among them, the GTIN element string is required, and others are optional. See C.1 and C.2 of Annex C for examples of the two dimensional code for commodity of encoded data structures.
?
Table 1 Element string of two dimensional code for commodity
Name of element string GS1 application identifier (AI) Format of GS1 application identifier (AI) data field Optional/required
Global trade item number (GTIN) 01 N14 a Required
Batch or lot number 10 X..20 b Optional
Serial number 21 X..20 Optional
Expiration date (YYMMDD) 17 N6 Optional
Extended data item c AI (see Table A.1) Format of corresponding AI data field Optional
Extended packaging URL 8200 Follow the provisions of RFC1738 protocol on URL Optional
a N: numeric character, N14: 14 numeric characters, with fixed length.
b X: Any character in Table B.1 in Annex B, X..20: maximum of 20 arbitrary characters in Table B.1, with variable length.
c Extended data items: users can select 1 to 3 element strings from Table A.1 to represent other extended information of products.
5.2.2 Global trade item number (GTIN) element string
The GTIN element string shall consist of the GS1 application identifier "01" and its corresponding data field of the application identifier, which shall appear as the first element string. The GTIN data field shall consist of 14-digit codes, including packaging indicator, vendor identification code, item code and check code, see reference [1] in Bibliography. See GB 12904 for the allocation and calculation of vendor identification code, item code and check code.
5.2.3 Batch or lot number element string
The batch or lot number element string shall consist of the GS1 application identifier "10" and the batch or lot number data field for commodity. The batch or lot number data field is a vendor-defined alphanumeric string, with variable length, up to 20 bytes, including all the characters in Table B.1.
5.2.4 Serial number element string
The serial number element string shall consist of the GS1 application identifier "21" and the serial number data field for commodity. The serial number data field is a vendor-defined alphanumeric string, with variable length, up to 20 bytes, including all the characters in Table B.1.
Foreword i
1 Scope
2 Normative references
3 Terms and definitions
4 Symbols, codes and abbreviations
5 Data structure of two dimensional code for commodity
6 Information service of two dimensional code for commodity
7 Symbol of two dimensional code for commodity
8 Symbol quality requirements of two dimensional code for commodity
Annex A (Normative) Element string and parse query table of the two dimensional code for commodity
Annex B (Informative) Encoded character set of GS1 application identifier data field
Annex C (Informative) Examples of the two dimensional code for commodity
Annex D (Normative) Information service of the two dimensional code for commodity
Annex E (Normative) Symbol position of the two dimensional code for commodity
Annex F (Informative) Graphic position in the two dimensional code for commodity
Bibliography
ICS 35.040
A 24
GB
中華人民共和國國家標準
GB/T 33993—2017
商品二維碼
Two dimensional code for commodity
2017-07-12發布 2018-02-01實施
中華人民共和國國家質量監督檢驗檢疫總局
中國國家標準化管理委員會 發布
前 言
本標準按照GB/T 1.1—2009給出的規則起草。
本標準由中國物品編碼中心提出。
本標準由全國物流信息管理標準化技術委員會(TC 267)歸口。
商品二維碼
1 范圍
本標準規定了商品二維碼的數據結構、信息服務和符號印制質量要求等技術要求。
本標準適用于商品二維碼的管理、應用與服務。
2 規范性引用文件
下列文件對于本文件的應用是必不可少的。凡是注日期的引用文件,僅注日期的版本適用于本文件。凡是不注日期的引用文件,其最新版本(包括所有的修改單)適用于本文件。
GB/T 1988 信息技術 信息交換用七位編碼字符集
GB 12904 商品條碼 零售商品編碼與條碼表示
GB/T 12905—2000 條碼術語
GB/T 14257 商品條碼 條碼符號放置指南
GB/T 16986—2009 商品條碼 應用標識符
GB/T 18284 快速響應矩陣碼
GB/T 21049 漢信碼
GB/T 23704 信息技術 自動識別與數據采集技術 二維條碼符號印制質量的檢驗
ISO/IEC 16022 信息技術 自動識別與數據采集技術 數據矩陣條形碼符號規范(Information technology—Automatic identification and data capture ( AIDC) techniques—Data Matrix bar code symbology specification)
RFC 1738統一資源定位符[Uniform Resource Locators(URL)]
RFC 3986統一資 源標識符 通用語法[Uniform Resource Identifier(URL):Generic Syntax]
3 術語和定義
下列術語和定義適用于本文件。
3.1
二維碼 two dimensional code
二維條碼 two dimensional bar code
在二維方向上都表示信息的條碼符號。
[GB/T 12905—2000,定義2.54]
3.2
應用標識符 application identifier;AI
標識數據含義與格式的字符,由2位~4位數字組成。
[GB/T 16986—2009,定義3.1]
3.3
商品二維碼 two dimensional code for commodity
用于標識商品及商品特征屬性、商品相關網址等信息的二維碼。
4 符號、代號和縮略語
下列符號、代號和縮略語適用于本文件。
FNC1 二維碼碼制中的GS1專用編碼模式(Function 1)。
GS1 全球統一標識系統。
GTIN 全球貿易項目代碼(Global Trade Item Number)。
OWS 對象網絡服務(Object Web Service)。
URI統一資源標識符(Uniform Resource Identifier)。
URL 統一資源定位符(Uniform Resource Locater)。
5 商品二維碼的數據結構
5.1 數據結構類型
商品二維碼的數據結構分為編碼數據結構、國家統一網址數據結構、廠商自定義網址數據結構三種。其中編碼數據結構見5.2;國家統一網址數據結構見5.3;廠商自定義網址數據結構見5.4.
5.2 編碼數據結構
5.2.1 編碼數據結構的組成
編碼數據結構由一個或多個取自表1中的單元數據串按順序組成。每個單元數據串由GS1應用標識符(AI)和GS1應用標識符(AI)數據字段組成。擴展數據項的GS1應用標識符和GS1應用標識符數據字段取自附錄A中表A.1。其中,全球貿易項目代碼單元數據串為必選項,其他單元數據串為可選項。編碼數據結構的商品二維碼示例參見附錄C的C.1和C.2。
表1 商品二維碼的單元數據串
單元數據串名稱 GS1應用標識符(AI) GS1應用標識符(AI)數據字段的格式 可選/必選
全球貿易項目代碼 01 N14a 必選
批號 10 X..20b 可選
系列號 21 X..20 可選
有效期 17 N6 可選
擴展數據項c AI(見表A.1) 對應AI數據字段的格式 可選
包裝擴展信息網址 8200 遵循RFC1738協議中關于URL的規定 可選
a N:數字字符,N14:14個數字字符,定長。
b X:附錄B中表B.1中的任意字符,X..20:最多20個表B.1中的任意字符,變長。
c 擴展數據項:用戶可從表A.1選擇1個~3個單元數據串,表示產品的其他擴展信息。
5.2.2 全球貿易項目代碼單元數據串
全球貿易項目代碼單元數據串由GS1應用標識符“01”以及應用標識符對應的數據字段組成,應作為第一個單元數據串出現。全球貿易項目代碼數據字段由14位數字代碼組成,包含包裝指示符、廠商識別代碼、項目代碼和校驗碼,見參考文獻[1],廠商識別代碼、項目代碼和校驗碼的分配和計算見GB 12904。
5.2.3 批號單元數據串
批號單元數據串由GS1應用標識符“10”以及商品的批號數據字段組成。批號數據字段為廠商定義的字母數字字符串,長度可變,最大長度為20個字節,可包含表B.1的所有字符。
5.2.4 系列號單元數據串
系列號單元數據串由GS1應用標識符“21”以及商品的系列號數據字段組成。系列號數據字段為廠商定義的字母數字字符,長度可變,最大長度為20個字節,可包含表B.1的所有字符。
5.2.5 有效期單元數據串
有效期單元數據串由GS1應用標識符“17”以及商品的有效期數據字段組成。有效期數據字段為6位長度固定的數字,由年(取后2位)、月(2位)和日(2位)按順序組成。
5.2.6 擴展數據項 單元數據串
擴展數據項單元數據串取自表A.1,用戶可從表A.1中選擇1個~3個單元數據串,表示產品的其他擴展信息。
5.2.7 包裝擴展信息網址單元數據串
包裝擴展信息網址單元數據串由GS1應用標識符“8200”以及對應的包裝擴展信息網址數據字段組成。包裝擴展信息網址數據字段為廠商授權的網址,符合RFC1738協議中的相關規定。
5.3 國家統一網址數據結構
國家統一網址數據結構由國家二維碼綜合服務平臺服務地址、全球貿易項目代碼和標識代碼三部分組成。國家二維碼綜合服務平臺地址為http://2dcode.org/和https://2dcode.org/;全球貿易項目代碼為16位數字代碼;標識代碼為國家二維碼綜合服務平臺通過對象網絡服務(OWS)分配的唯一標識商品的代碼,最大長度為16個字節,見表2。數據結構為URI格式。國家統一網址數據結構的商品二維碼示例參見附錄C.3。
表2 國家統一網址數據結構
國家二維碼綜合服務平臺服務地址 全球貿易項目代碼 標識代碼
http://2dcode.org/
https://2dcode.org/ Al+全球貿易項目代碼數據字段如:0106901234567892 長度可變,最長16個字節
5.4 廠商自定義網址數據結構
5.4.1 廠商自定義網址數據結構組成
廠商自定義網址數據結構由廠商或廠商授權的網絡服務地址、必選參數和可選參數三部分依次連接而成,連接方式由廠商確定,應為URI格式,具體定義及有關格式見表3。廠商自定義網址數據結構的商品二維碼示例參見附錄C.4。
表3 廠商自定義網址數據結構
網絡服務地址 必選參數 可選參數
http://example.com
https://example.com 全球貿易項目代碼查詢關鍵字“gtin” 全球貿易項目
代碼數據字段 取自表A.1的一對或多對查詢
關鍵字與對應數據字段的組合
注:example.com僅為示例。
5.4.2 必選參數
必選參數由查詢關鍵字“gtin”以及全球貿易項目代碼兩部分組成,兩部分之間應以URI分隔符分隔,URI分隔符見RFC 3986。
5.4.3 可選參數
可選參數由取自表A.1的一對或多對查詢關鍵字與對應AI數據字段的組合組成,組合之間應以URI分隔符分隔。每對組合由查詢關鍵字和對應的AI數據字段兩部分組成,兩部分之間應以URI分隔符分隔。
6 商品二維碼的信息服務
6.1 編碼數據結構的信息服務
在終端對商品二維碼進行掃描識讀時,應對二維碼承載的信息進行解析,對于商品二維碼數據中包含的每一個單元數據串,根據解析出的AI,查找表A.1獲取單元數據串名稱和對應AI數據字段傳輸給本地的商品信息管理系統,詳見附錄D中D.1,通過網絡獲取商品信息服務的過程見附錄D中D.2。
6.2 國家統一網址數據結構的信息服務
國家二維碼綜合服務平臺為商品分配唯一標識代碼,國家二維碼綜合服務平臺服務地址與標識代碼連接構成商品二維碼,與商品的完整信息服務地址對應。在終端掃描商品二維碼時,訪問國家二維碼綜合服務平臺的OWS信息服務,獲得商品的完整信息服務地址。詳見附錄D.3。
6.3 廠商自定義網址數據結構的信息服務
在終端對商品二維碼進行掃描識讀時,鏈接廠商或廠商授權的商品二維碼網絡服務地址,獲取商品二維碼信息頁面。詳見附錄D.4。
7 商品二維碼的符號
7.1 碼制
商品二維碼應采用漢信碼、快速響應矩陣碼(簡稱QR碼)或數據矩陣碼(Data Matrix碼)等具有GS1或FNC1模式,且具有國家標準或國際ISO標準的二維碼碼制。其中,編碼數據結構在進行二維碼符號表示時,應選用碼制的GS1模式或者FNC1模式進行編碼。
7.2 商品二維碼的尺寸
商品二維碼符號大小應根據編碼內容、糾錯等級、識讀裝置與系統、標簽允許空間等因素綜合確定,如有必要,需要進行相關的適應性實驗確定。最小模塊尺寸不宜小于0.254mm。
7.3 商品二維碼符號位置
商品二維碼符號位置的選擇見附錄E。
7.4 商品二維碼中圖形標識的位置
商品二維碼中圖形標識放置方案參見附錄F。
8 商品二維碼的符號質量要求
8.1 商品二維碼符號質量等級
商品二維碼符號的質量等級不宜低于1.5/XX/660。其中:1.5是符號等級值;XX是測量孔徑的參考號(應用環境不同,測量孔徑大小選擇不同);660是測量光波長,單位為nm,允許偏差±10nm。
8.2 商品二維碼符號的印制質量測試要求
商品二維碼符號的質量等級應依據GB/T 23704、相應碼制標準以及本標準的符號質量要求對商品二維碼符號進行檢測。
附錄A
(規范性附錄)
商品二維碼單元數據串和解析查詢表
表A.1規定了標準中商品二維碼單元數據串和對應的解析查詢關鍵字。
表A.1 商品二維碼單元數據串和解析查詢表
單元數據串名稱 GS1應用標識符(AI) AI格式 AI數據字段格式 查詢關鍵字 單元數據串英文名稱
全球貿易項目代碼 01 N2 N14 gtin Global Trade Item Number (GTIN)
批號 10 N2 X..20 bat Batch or Lot Number
生產日期 11 N2 N6 pro Production Date (YYMMDD)
付款截止日期 12 N2 N6 due Due Date (YYMMDD)
包裝日期 13 N2 N6 pac Packaging Date (YYMMDD)
有效期 17 N2 N6 exp Expiration Date (YYMMDD)
產品變體 20 N2 N2 var Variant Number
系列號 21 N2 X..20 ser Serial Number
附加產品標識 240 N3 X..30 aii Additional Item Identification
客戶方代碼 241 N3 X..30 cpn Customer Part Number
定制產品代碼 242 N3 N..6 mto Made to-Order Variation Number
二級系列號 250 N3 X..30 ssn Secondary Serial Number
源實體參考代碼 251 N3 X..30 rse Reference to Source Entity
可變數量 30 N2 N..8 civ Count of Items (Variable Measure Trade Item)
凈重,千克(變量貿易項目) 310 N4 N6 nwk Net weight,kilograms (Variable Measure Trade Item)
長度或第一尺寸,米(變量貿易項目) 311 N4 N6 lfm Length or first dimension,metres (Varia-ble Measure Trade Item)
寬度、直徑或第二尺寸,米(變量貿易項目) 312 N4 N6 wdsm Width,diameter,or second dimension,metres (Variable Measure Trade Item)
深度、厚度、高度或第三尺寸,米(變量貿易項目) 313 N4 N6 dthtm Depth,thickness,height,or third dimen-sion,metres (Variable Measure Trade Item)
面積,平方米(變量貿易項目) 314 N4 N14 asm Area,square metres (Variable Measure Trade Item)
凈容積或凈體積,升(變量貿易項目) 315 N4 N6 nvl Net volume,litres (Variable Measure Trade Item)
凈容積或凈體積,立方米(變量貿易項目) 316 N4 N6 nvcm Net volume,cubic metres (Variable Measure Trade Item)
貿易項目的原產國(或地區) 422 N3 N3 coti Country of Origin of a Trade Item
貿易項目初始加工的國家(或地區) 423 N3 N3+N..12 cip Country of Initial Processing
貿易項目加工的國家(或地區) 424 N3 N3 cp Country of Processing
貿易項目拆分的國家(或地區) 425 N3 N3 cd Country of Disassembly
全程加工貿易項目的國家(地區) 426 N3 N3 ccpc Country Covering full Process Chain
UN/ECE胴體肉與分割產品分類 7002 N4 X..30 mccc UN/ECE Meat Carcasses and Cuts Classi-fication
產品的有效日期和時間 7003 N4 N10 edt Expiration Date and Time
ISO國家代碼的加工者核準號:屠宰場 7030 N4 N3+X..27 anp0 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第一加工廠 7031 N4 N3+X..27 anpl Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第二加工廠 7032 N4 N3+X..27 anp2 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第三加工廠 7033 N4 N3+X..27 anp3 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第四加工廠 7034 N4 N3+X..27 anp4 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第五加工廠 7035 N4 N3+X..27 anp5 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第六加工廠 7036 N4 N3+X..27 anp6 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第七加工廠 7037 N4 N3+X..27 anp7 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第八加工廠 7038 N4 N3+X..27 anp8 Approval Number of Processor with ISO Country Code
ISO國家代碼的加工者核準號:第九加工廠 7039 N4 N3+X..27 anp9 Approval Number of Processor with ISO Country Code
卷狀產品 8001 N4 N14 rp Roll Products (Width,Length,Core Di-ameter,Direction,Splices)
單價 8005 N4 N6 ppum Price Per Unit of Measure
貿易項目組件的標識 8006 N4 N14+N2+N2 icti Identification of the Components of a Trade Item
產品生產的日期與時間 8008 N4 N8+N..4 dtp Date and Time of Production
包裝擴展信息網址 8200 N4 X..70 無 Extended Packaging URL
貿易伙伴之間相互約定的信息 90 N2 X..30 imabtp Information Mutually Agreed Between Trading Partners
公司內部信息 91-99 N2 X..30 ciil-cii5 Company Internal Information
附錄B
(資料性附錄)
GS1應用標識符數據字段的編碼字符集
表B.1規定了標準中GS1應用標識符數據字段的編碼字符集。
表B.1 GS1的應用標識符數據字段的編碼字符集
!(感嘆號) “(引號) '(撇號) ((左括號) )(右括號) *(星號)
+(加號) ,(逗號) -(連字號) .(句點) 0(數字0) 1(數字1)
2(數字2) 3(數字3) 4(數字4) 5(數字5) 6(數字6) 7(數字7)
8(數字8) 9(數字9) :(冒號) ;(分號) =(等于號) A(大寫字母A)
B(大寫字母B) C(大寫字母C) D(大寫字母D) E(大寫字母E) F(大寫字母F) G(大寫字母G)
H(大寫字母H) I(大寫字母I) J(大寫字母J) K(大寫字母K) L(大寫字母L) M(大寫字母M)
N(大寫字母N) O(大寫字母O) P(大寫字母P) Q(大寫字母Q) R(大寫字母R) S(大寫字母S)
T(大寫字母T) U(大寫字母U) V(大寫字母V) W(大寫字母W) X(大寫字母X) Y(大寫字母Y)
Z(大寫字母Z) _(下劃線) a(小寫字母a) b(小寫字母b) c(大寫字母c) d(大寫字母d)
e(小寫字母e) f(小寫字母f) g(小寫字母g) h(小寫字母h) i(小寫字母i) j(小寫字母j)
k(小寫字母k) l(小寫字母l) m(小寫字母m) n(小寫字母n) o(小寫字母o) p(小寫字母p)
q(小寫字母q) r(小寫字母r) s(小寫字母s) t(小寫字母t) u(小寫字母u) v(小寫字母v)
w(小寫字母w) x(小寫字母x) y(小寫字母y) z(小寫字母z)
注:表中字符及其編碼見GB/T1988.
附錄C
(資料性附錄)
商品二維碼示例
C.1 基于編碼數據結構的商品二維碼示例
假設某商品二維碼的編碼信息字符串為:
(01)06901234567892(10)A1000B0000(21)C51031902101083826
采用Data Matrix碼的GS1模式,得到的商品二維碼符號見圖C.1。采用QR碼的FNC1模式編碼,糾錯等級均設置為L級(7%),得到的商品二維碼符號見圖C.2。
圖C.1 Data Matrix商品二維碼示例1
圖C.2 QR商品二維碼示例1
注:附錄中編碼數據結構示例中的應用標識符(例如“01”“10”“21”等)兩側的括號只便于區分應用標識符,不是標識符的一部分,不存儲在二維碼。
C.2 基于編碼數據結構的商品二維碼示例
假設某一商品有產品變體需要使用編碼數據結構中的擴展數據項進行標識。查詢表A.1獲取產品變體的AI和AI對應的數據格式分別為20和N2。
假設商品二維碼的編碼信息字符串為:
(01)06901234567892(20)01(8200)http://www.2dcode.org
采用Data Matrix碼的GS1模式,得到的商品二維碼符號見圖C.3。采用QR碼的FNC1模式編碼,糾錯等級均設置為L級(7%),得到的商品二維碼符號見圖C.4。
圖C.3 Data Matrix商品二維碼示例2
圖C.4 QR商品二維碼示例2
C.3 基于國家統一網址數據結構的商品二維碼示例
假設某商品的完整信息服務地址為:
http://www.example.com/goods.aspx? base_id=F25F56A9F703ED74E5252A4F154A7C35 19BF58BE64D26882624E28E935292B86BD357045
通過國家二維碼綜合服務平臺OWS服務得到商品二維碼編碼為:
http://2dcode.org/0106901234567892OXjVB3
采用漢信碼編碼,糾錯等級設置為L2(15%),得到的商品二維碼符號見圖C.5。
圖C.5 漢信碼商品二維碼示例1
C.4 基于廠商自定義網址數據結構商品二維碼示例
假設商品二維碼的編碼信息字符串為:
http://www.example.com/gtin/06901234567892/bat/Q4D593/ser/32a
采用漢信碼編碼,糾錯等級設置為L2(15%),得到的商品二維碼符號見圖C.6。
圖C.6 漢信碼商品二維碼示例2
附錄D
(規范性附錄)
商品二維碼的信息服務
D.1 編碼數據結構的信息服務
D.1.1 編碼數據結構的本地信息服務
在終端對商品二維碼進行掃描識讀時,應對二維碼承載的信息進行解析,對于商品二維碼數據中包含的每一個單元數據串,根據解析出的AI,查找表A.1獲取單元數據串名稱和對應AI數據字段傳輸給本地的商品信息管理系統。單元數據串名稱和相應AI數據字段之間用“:”分隔,不同單元數據串的信息分行顯示。
示例:
某商品二維碼中的編碼信息字符串為:
(01)06901234567892(10)A1000B0000(21)C51031902101083826
在終端掃描該商品二維碼后獲得的編碼信息格式為:
全球貿易項目代碼:06901234567892
批號:A1000B0000
系列號:C51031902101083826
D.1.2 編碼數據結構的網絡信息服務
編碼數據結構的網絡信息服務是通過商品二維碼解析出商品完整信息服務地址。商品的完整信息服務地址的查詢參數字符串由商品二維碼中除包裝擴展信息網址以外的數據字段按順序組合形成,構成格式見表D.1.
表D.1 商品的完整信息服務地址的格式
傳輸協議 主機名 查詢路徑 查詢參數字符串
http://
https:// 對應包裝擴展信息網址單元數據串的數據字段,默認服務地址為國家二維碼綜合服務平臺服務地址 Search? 由商品二維碼中除包裝擴展信息網址以外的數據字段按順序組合形成
示例:
某商品二維碼中的編碼信息為:
(01)06901234567892(10)A1000B0000(21)C51031902101083826(8200)www.example.com
具體的構造方法如下:
a)將包裝擴展信息網址的數據字段提取出來作為主機名,即“www.example.com”;
b)將包裝擴展信息網址以外的其他數據串提取出來,并加上各自對應的查詢關鍵字(表A.1)后用“&”符號連接起來組成查詢參數字符串,即“gtin=06901234567892&bat=A1000B0000&ser=C51031902101083826”;
c)按照表D.1將傳輸協議、主機名、查詢路徑以及查詢參數字符串組合成最終的商品的完整信息服務地址,即“http://www.example.com/Search? Gtin=06901234567892&bat=A1000B0000&ser=C51031902101083826”。
D.3 國家統一網址數據結構的信息服務
D.3.1 OWS生成服務
國家二維碼綜合服務平臺的OWS生成服務是為廠商自定義的商品完整信息服務地址分配唯一的標識代碼。具體的生成流程見下面的步驟:
a)用戶指定商品的完整信息服務地址;
b)國家二維碼綜合服務平臺為商品分配標識代碼;
c)服務地址與標識代碼組合成商品二維碼。
示例:
用戶指定商品的完整信息服務地址為:
http://www.example.com/goods.aspx? base_id = F25F56A9F703ED74E5252A4F1 54A7C3519BF58BE64D26882624E28E935292B86BD357045,用戶通過訪問國家二維碼綜合服務平臺調用OWS生成服務,得到唯一標識代碼:0106901234567892OXjVB3,國家二維碼綜合服務平臺將商品二維碼返回用戶,用戶將商品二維碼印制在商品的外包裝上:http://2dcode.org/0106901234567892OXjVB3。
D.3.2 OWS解析服務
國家二維碼綜合服務平臺的OWS解析服務提供以標識代碼為關鍵字獲取商品二維碼完整信息服務地址的目錄服務。在終端掃描商品二維碼訪問國家二維碼綜合服務平臺OWS系統,獲取對應的商品的完整信息服務地址并訪問。OWS解析服務步驟如下:
a)終端掃描二維碼;
b)訪向國家綜合服務平臺OWS服務,獲取商品的完整信息服務地址;
c)訪問商品的完整信息服務地址。
示例:
終端掃描二維碼獲得地址:http://2dcode.org/0106901234567892OXjVB3。訪問國家二維碼綜合服務平臺OWS服務,獲取對應的商品的完整信息服務地址:
http://www.example.com/goods.aspx? base_id=F25F56A9F703ED74E5252A4F154A7 C3519BF58BE64D26882624E28E935292B86BD357045,訪問商品的完整信息服務地址。
D.4 廠商自定義網址數據結構的信息服務
在終端進行商品二維碼的掃描識讀,鏈接商品二維碼網絡服務,獲取商品二維碼信息頁面。具體的解析流程見示例。
示例:
a)終端讀取標簽中的編碼。例如:
http://www.example.com/gtin/06901234567892/bat/Q4D593/ser/32a
b)與服務地址http://www.example.com進行通訊,獲取商品二維碼信息頁面。
附錄E
(規范性附錄)
商品二維碼符號位置
商品二維碼的位置選擇除了符合GB/T 14257的規定之外,還需要遵循以下原則:
a)同一廠家生產的同一種商品的標識位置一致;
b)標識位置的選擇應保證標識符號不變形、不被污損;
c)標識位置的選擇應便于掃描、易于識讀。
附錄F
(資料性附錄)
商品二維碼中圖形位置
商品二維碼圖形標識放置方案參見以下三種。
a)無圖形標識。見圖F.1。
圖F.1 商品二維碼示例1
b)在商品二維碼周圍加上圖形標識,圖形標識由用戶自由選擇,一般選擇與商品相關的品牌圖形標識,參見圖F.2。在保證符號不影響識讀的情況下,建議用戶結合外包裝和放置界面,選擇合適的圖案大小。避免圖案過大,導致符號印制面積過大;圖案過小,消費者無法辨認等情況。
圖F.2 商品二維碼示例2
c)在商品二維碼中間加上圖形標識,圖形標識由用戶自由選擇,一般選擇與商品相關的品牌圖形標識,參見圖F.3。中間圖形標識的大小根據二維碼符號的糾錯等級決定,糾錯等級越高,允許中間圖案占整個二維碼符號的比例越大。
圖F.3 商品二維碼示例3
參考文獻
[1] GS1 General Specifications,Version 16,Jan-2016