introduce
With the increasing use of smart phones, more and more applications based on QR code. Today, let's talk about QR code with you.
The two-dimensional code is an extension of one-dimensional code, which has readability. It uses black-and-white rectangular pattern to represent binary data. After being scanned by the device, the information contained in it can be obtained.
One dimensional code records data only horizontally, and ISBN on books is a typical one dimensional code.
ISBN
The QR code records data in both horizontal and vertical directions. We often say that QR code is actually QR code, which is one of many kinds of QR code.
QR code
As shown in the figure, quick response code is usually a square composed of black and white squares. In the upper left, upper right and lower left corner, there is a "back" word like location mark to ensure that the program can correctly identify when reading content.
At the same time, QR code also has a fault-tolerant mechanism, even if the pattern has some damage, it can still ensure that the content can be read correctly. The fault tolerance rate of generated QR code pattern is generally 7%, and the maximum is 30%. The following figure is an example of 30% fault tolerance for the same content.
30% fault tolerance
Common uses
QR code has a wide range of applications, and now it's very common. Here are a few examples:
Wechat QR code
The QR code of wechat adds some beautification elements on the basis of the original two-dimensional code pattern.
Sina micro-blog
Sina micro-blog
Sina Weibo makes good use of the QR code fault tolerance mechanism, adding user's head image to the QR code pattern to enhance recognition.
QQ browser
Website QR code
QQ browser integrates the function of generating QR code from web address. It can generate a QR code picture from the currently visited web address, which can be accessed quickly when scanning with mobile app.
Application method
We must be very familiar with the basic usage of QR Code:
Pick up the mobile phone, open the QR code scanning application, and then point the camera at the QR code pattern on the poster or propaganda page, and you can see the displayed content in a few seconds.
Next, let's talk about some other applications of QR code.
Redesign of pattern
Because QR code has a good fault-tolerant and positioning mechanism, we can completely redesign on the basis of the original black-and-white pattern.
Change colors and lines
Change shape
As long as enough contrast is ensured, the content of the QR code image can be easily read out.
Log in after scanning
Because the content of QR code can be a piece of customized text, we can do many "magic" operations through it. The login of wechat web page is one example.
When we visit wechat webpage, we will have a prompt like this:
WeChat webpage
This QR code actually contains a customized URL https://login.weixin.qq.com/l/ key. When the QR code is scanned by wechat on the mobile terminal, it will automatically access the URL and send the login information to the server. After receiving the login information, the server completes the login operation on the web page.
https://login.weixin.qq.com/l/密匙
Open home page after scanning
Wechat's public platform QR code is similar to personal QR code.
Wechat public platform
They all contain http://weixin.qq.com/r/key of the same format. When wechat is scanned, it will automatically read the information of the user or the public platform and prompt the user to pay attention.
http://weixin.qq.com/r/密匙
Another way
In addition to wechat like processing methods, there is another application mode:
The generated QR code image no longer contains the URL, but a string of formatted text, such as
操作代码+间隔符号+密匙
for example
A:5C73EB9ED98D4ED542F2406C09279FDDBC1CE4BE
[email protected]=
……
When the program reads the content, it performs the corresponding operations according to the built-in judgment conditions, such as a is "visit the specified URL", B is "display the specified text", etc.
summary
In summary, the basic application process of QR code is shown in the figure below:
Simple process
Simply put the content into the QR code - > read the content and display it. The common application process is shown as follows:
将内容放入二维码 -> 读取内容之后显示
Technological process
- Generate a QR code picture of the specified content;
- Scan the picture and read the content contained therein;
- According to the content obtained from the analysis, judge the next operation of the program, such as "visit the specified URL", "display the specified text", "send the specified request", etc. In this process, according to the different settings of the program, the serial number, login information, GPS coordinates and other information may be attached and sent to the server together;
- When the operation is finished, the operation result will be displayed.
Recommend reading more
- Since yesterday I made a QR code design for teacher WuJie, many Jane friends have come to ask how the QR code is designed to look good. Because of the complexity of this course, please set up... Xia NianWei read 2299 comments, 13 likes and 20 likes
Since yesterday I made a two-dimensional code design for teacher WuJie, many Jane friends have come to ask how the two-dimensional code is designed to look good. Because of the complexity of this tutorial, please set
Xia NianWei reads 2299 reviews 13 likes 20
- In recent years, QR code has been popularized all over the world at a very fast speed. If it's a product of a company, it's really amazing. Qrart is also a recent research project
In recent years, QR code has been popularized all over the world at a very fast speed. If it's a product of a company, it's really amazing. Qrart is also a recent research project
- QR code is a kind of special format picture which can store information. From media, product information, discount, social media, real estate information, mobile payment, e-Voucher, APP download
QR code is a kind of special format picture which can store information. From media, product information, discount, social media, real estate information, mobile payment, e-Voucher, APP download
- The more he grows up, the more he finds out that dream and reality are two different things: he is so far away, he wants to carry a dream, but he is afraid of losing it; he wants to strive for it, and he is afraid of his lack
The more he grows up, the more he finds out that dream and reality are two different things: he is so far away, he wants to carry a dream, but he is afraid of losing it; he wants to strive for it, and he is afraid of his lack
- Problem 1: solved exception is java.lang.noclassdeffounderror
Problem 1: solved exception is java.lang.noclassdeffounderror