That thing about QR codes

1. Background

There was an article a few days ago about NFC payment (see: Short-distance wireless communication - NFC ), but NFC payment is still relatively niche after all, mainly because QR codes are too powerful and deeply rooted in the hearts of the people. A big boss said very early on that QR codes are connecting lines. The bridge between online and offline is the most powerful tool to connect reality and virtuality. Today, everyone selling kebabs on the street has a QR code. Today we will take a brief look at it.

2. Concept of QR code

A QR code is a graphic pattern that records data symbols in black and white and is distributed on a plane according to a specific geometric shape and a certain rule.

3. The difference between QR code and one-dimensional code

One-dimensional code is also called barcode. It expresses information in one direction. It can only store numbers or characters. The specific encoding type of one-dimensional code can be seen in  This article is about barcode scanners  .

The QR code consists of multiple lines. Each line has a starting part, a data part and a ending part. It can contain Chinese characters.

4. QR code classification

According to principle

1. Row-type QR code

The row-type QR code is based on the one-dimensional code and is arranged into multiple lines as needed. The representative encoding formats include PDF147, Code49, etc.

2. Matrix QR code

It is encoded through black and white pixels in a matrix space. The presence of a point means "1", and the absence of a point means "0", which represents QRCode, Tianzi code, etc.

By business

1. Read business

The user is read by the identification device during use and used as a transaction or identity credential to support various applications, such as WeChat or Alipay payment codes.

2. Main reading business

Users install a QR code client on their mobile phone (such as the code scanning function of WeChat or Alipay), take a picture of the QR code, obtain the content stored in the QR code and trigger related applications, such as scanning the code on WeChat to pay, scanning the code on WeChat The itinerary code etc. appear.

5. QRCode QR code implementation

QRCode is the most common QR code encoding format. We can refer to Google's ZXing package to generate and identify QR codes during development. Java and Android have corresponding packages. The following examples refer to the two Java packages ZXing-core. and ZXing-j2se.

In addition, I read my WeChat payment code through the code read above, and the reading results are as follows.

wxp://f2f083nJJtO6Ls1ZzuXHj8MvpDgwolqbRPOptT8u61UD2Rw

6. Application scenarios of QR codes

QR codes can be used in every scenario you can imagine. Next time I will introduce the application of QR codes in distribution scenarios.

Guess you like

Origin blog.csdn.net/2301_76787421/article/details/133440698