当前位置:网站首页>[vernacular technology] QR code

[vernacular technology] QR code

2022-06-23 20:03:00 Yuankeng Hao

Last article , I have written “ How to customize a QR code with a background ”. For QR code , Tell the truth , I don't know the principle behind it . Just like everyone , I only know that it is used for sweeping . One thing you may know more than others is , I know the reason why scanning can jump out some content , Because these contents are stored in the QR code . But there are still some doubts in my heart :

  • How did the QR code come from ?
  • How to store things with QR code ?

Today I will tell you about these two points , I just learned it recently .

QR code history

I believe you are familiar with one-dimensional codes , Bar code . On the packing bags of various commodities , Will bring a bar code . When shopping in the supermarket , Using a special instrument to scan the bar code, you can enter the purchased goods . The reason why you can enter , It is because the commodity number is stored in the one-dimensional code .

With the rapid development of economy , People find that one-dimensional codes can store only a limited amount of content , It can only store 30 Letters or numbers . It's enough for the commodity , But for web sites , It's not enough . and , One dimensional codes also occupy a large space . Although it is one-dimensional , But to ensure the scanning speed , You need to stretch one dimension . I don't know if you have any such experience , Sometimes goods can't be swept out , Just level the bar code a little .

Since one dimension is not enough , Smart people think of adding a dimension , That is, two-dimensional . There are many types of QR codes : Stacked / Row by row 、 Matrix, etc , Just take a simple look :

Stacked QR code
Matrix QR code

Different types of QR codes are coded differently , There are many kinds of . Interested students can search by themselves . The two-dimensional code we often use today is :QR Code( Quick response code ), It's in 1994 Born in Toyota, Japan (Toyota) A subsidiary that produces auto parts Denso-Wave. It can store 7000 Multiple numbers 、4000 Multiple letters 、900 Multiple Chinese characters ( Enough for one article 800 Word composition ), It can be seen that the amount of information is several orders of magnitude larger than the one-dimensional code .

At home , QR code first emerged in the payment industry , I.e. code scanning payment . And then , QR code is widely used to store identity information , For example, the official account. 、 Applet 、 Video number, etc . Today to see , Two dimensional code has been widely used ,“ scan ” It has become an easy to understand word .

Two dimensional code principle

Next , Let's briefly talk about how QR codes store content . Reference link :https://www.pudn.com/news/628f83e1bf399b7f351ebf7d.html.

QR code can store contents , The key lies in two points :

  • Define the graphic area , Standardize the role of each area
  • Encode the information to be stored , Save to the data area of the QR code

Let's first look at the various areas of the QR code , Here's the picture :

QR code area definition

QR code passed Three boundary points delineate the range of the QR code picture . Why not four ? Because the QR code is a rectangle , Three points can delineate the range , Save more information in the saved area .

After the area is demarcated , Encode the information to be stored , Turn into 01 Byte stream , Then it is stored in blocks in the data area of the QR code . As shown in the figure below :

QR code data storage

Final ,0 It means blank ,1 It means black dot , It forms the black and white pattern in the two-dimensional code . Code scanning time , Read the information from the QR code data area according to the same standard , After decoding, the information stored in the two-dimensional code can be obtained . What is used APP After reading the information , Proceed to the next step according to the information type , For example, read the web address , Jump to the corresponding page .

summary

Today is the first time to use vernacular speaking technology , There may be some unclear points , Welcome to leave a message and make suggestions . Come on , With all of you .


The article was first published in “ Yuankeng HAOSI trace ” official account , Welcome to your attention , Learn more about yuankeng Hao's thoughts .

Yuankeng Haosiji official account
原网站

版权声明
本文为[Yuankeng Hao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206231941491894.html