ArticleslgStudy

science

Han Xin code

Han Xin code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Han Xin code rather than just read about it. In short: Han Xin code (汉信码 in Chinese, Chinese-sensible code) is two-dimensional (2D) matrix barcode symbology invented in 2007 by Chinese company The Article Numbering Center of China (中国物品编码中心 in Chinese) to break the monopoly of QR code. Han Xin code consists of black squares and white square spaces arranged in a square grid on a white background.

Han Xin code — main illustration
Han Xin code — illustration

Key takeaways

  • Han Xin code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Han Xin code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Han Xin code from memory before moving on to harder problems.

Reference excerpt

Han Xin code (汉信码 in Chinese, Chinese-sensible code) is two-dimensional (2D) matrix barcode symbology invented in 2007 by Chinese company The Article Numbering Center of China (中国物品编码中心 in Chinese) to break the monopoly of QR code. Han Xin code consists of black squares and white square spaces arranged in a square grid on a white background. It has four finder patterns and other markers which allow to recognize it with camera-based readers. Han Xin code contains Reed–Solomon error correction with ability to read corrupted images. At this time, it is issued as ISO/IEC 20830:2021. The main advantage (and invention requirement), comparable to QR code, is an embedded ability to natively encode Chinese characters instead of Japanese in QR code. Han Xin code in maximal 84 version (189×189 size) allows to encode 7827 numeric characters, 4350 English text characters, 3261 bytes and 1044–2174 Chinese characters (it depends on Unicode region). Han Xin code encodes full ISO/IEC 646 Latin characters instead of restricted amount Latin characters which is supported by QR code. It makes Han Xin code more suitable for English text encoding or GS1 Application Identifiers data encoding. Additionally, Han Xin code can encode Unicode characters from other languages with special Unicode mode, which has embedded lossless compression for UTF-8 characters set and Extended Channel Interpretation support. Han Xin code has special compactification mode for URI encoding and can reduce barcode size which encodes links to web pages.

History and standards The Article Numbering Center of China (中国物品编码中心 in Chinese) started research during the 10th Five-year plans of China of a home-grown QR code replacement to replace QR codes, which were considered a Japanese monopoly in 2D barcodes. In 2007, the new barcodes standard, at this time known as Han Xin code, was published as GB/T 21049-2007 with the name Chinese-sensible code. In 2011, USA company Association for Automatic Identification and Mobility (AIM) brought out ISS Han Xin Code symbology as official encoding standard and published it in the own store. In 2015, the ISO/IEC JTC 1/SC 31 group started implementation of Han Xin code as an international standard and published it as ISO/IEC 20830:2021 in 2021. In 2022, the Chinese-sensible code standard was reviewed as GB/T 21049-2022 and renamed as Han Xin code to be compliant with ISO standard. The following patents relating to Han Xin code encoding and decoding are registered in Europe and the United States:

European Patent Office EP3330887B1 by Fujian Landi Commercial Equipment Co Ltd "Chinese-sensitive code feature pattern detection method and system" United States Patent US10095903B2 by Ingenico Fujian Technology Co Ltd "Block decoding method and system for two-dimensional code" United States Patent US10528781B2 by Ingenico Fujian Technology Co Ltd "Detection method and system for characteristic patterns of Han Xin codes"

Application Han Xin code can be used in the same way as QR code. At this time Han Xin code is used mostly in China, because it has embedded encoding ability to encode Chinese characters. However, most of barcode printers and barcode scanners support Han Xin code. Han Xin code can be scanned on iOS and Android mobile devices and many barcode libraries support reading and writing Han Xin code. Main advantages of Han Xin code are:

ability to encode Chinese characters with embedded methods; Extended Channel Interpretation support; embedded method for compact UTF-8 encoding with embedded lossless compression; embedded method for URI compact encoding; compact GS1 Application Identifiers data encoding comparable to QR code; full ISO/IEC 646 support for compact numeric and text encoding.

Barcode design

Han Xin code represents data in black and white square modules, where dark module is a binary one and a light module is a zero. Additionally, Han Xin code can be encoded in inverse colors, but this option in many barcode readers is disabled by default. Black and white modules are arranged into square region with sizes from 23 × 23 modules (Version 1) to 189 × 189 modules (Version 84). As QR code, Han Xin code does not have rectangular versions like DataMatrix has and this restricts usage of Han Xin code in some cases. Han Xin code version size can be calculated with the following formula:

S i z e = 23 + ( V e r s i o n − 1 ) ∗ 2 {\displaystyle Size=23+(Version-1)*2}

Han Xin code symbol is constructed from the following elements:

Quiet Zone – is surrounding the symbol on all four sides with at least 3X size; Finder Pattern – consists from 4 Position Detection Patterns which is placed on all four corners of symbol and used to detect symbol position and area; Alignment Patterns and Assistant Alignment Patterns – is started from Version 4 and helps with the decoding of distorted code; Structural Information Regions – is surrounding all four Finder Patterns and used to encode symbol parameters like version, mask and error correction mode; Data Regions – masked binary data encoded in black and white modules.

Finder pattern

Finder Pattern consists from four Position Detection Patterns located at the four corners of the barcode. The size of Position Detection Pattern is 7×7 modules and it is constructed from 5 elements: dark 7 × 7 modules, light 6 × 6 modules, dark 5 × 5 modules, light 4 × 4 modules, dark 3 × 3 modules respectively. The scanning ratio of each Position Detection Pattern is 1:1:1:1:3 or 3:1:1:1:1 (depends on scanning direction). The four patterns orientation allows to detect unambiguously the barcode location and orientation. Every pattern has Position Detection Pattern separator with Structural Information Region aligned to it.

Alignment pattern The Alignment Patterns are added to the Han Xin code from Version 4 (Versions 1–3 do not have alignment patterns) and used to precise cell position in the distorted barcodes. Alignment Patterns in Han Xin code are split into:

… excerpt ends here. Continue reading the full article.

Illustrations

Han Xin code: Han Xin Code version 22
Han Xin Code version 22
Han Xin code: Barcode structure of Han Xin Code
Barcode structure of Han Xin Code
Han Xin code: Han Xin Code finder pattern
Han Xin Code finder pattern
Han Xin code illustration
Han Xin code illustration

Worked examples

Example 1 — a first encounter with Han Xin code

Start with the simplest possible case. Write down what Han Xin code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Han Xin code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Han Xin code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Han Xin code

In research
Han Xin code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Han Xin code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Han Xin code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Automatic identification and data capture, Barcodes, Encodings, so understanding it makes those chapters shorter.
In everyday life
Look for Han Xin code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Han Xin code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Han Xin code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Han Xin code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Han Xin code in simple terms?

Han Xin code (汉信码 in Chinese, Chinese-sensible code) is two-dimensional (2D) matrix barcode symbology invented in 2007 by Chinese company The Article Numbering Center of China (中国物品编码中心 in Chinese) to break the monopoly of QR code. Han Xin code consists of black squares and white square spaces arra…

Why does Han Xin code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Han Xin code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Han Xin code.

Tags

  • Automatic identification and data capture
  • Barcodes
  • Encodings
  • Information technology in China
  • Science and technology in China

Keep exploring